/computational_chemistry

Files used in TMP Chem videos on computational chemistry

Primary LanguagePython

TMP Chem Computational Chemistry Source Code

This repository contains scripts, programs, and data files used with the "Computational Chemistry" playlist on the TMP Chem YouTube channel. Primary language is Python3, with toy programs to demonstrate modeling and analysis methods. Repository is always subject to change, and no guarantees are made of the correctness of output.

Table of contents

Getting started

Most recent version of project is located in TMP Chem GitHub account. Download by following instructions for Git clone from GitHub. Requires a terminal, IDE, etc. to execute Python scripts and ability to write to file system within project directories.

Prerequisites

Requires Python 3.5 or greater for script execution. Requires access to numpy and matplotlib modules. All prerequisites can be met by downloading and using Python from most recent Anaconda distribution.

Installation

No additional installation necessary after cloning the repository.

Running the tests

WARNING: Test suite is incomplete and subject to change without notice.

To run tests for a project, go to the script directory for that project, [top_level_path]/scripts/[project]. If present, execute run_tests.py for the project.

python run_tests.py

This command executes a test suite of unit tests from each test module present in the mmlib directory. Each test module contains a set of unit tests of methods within the module, confirming proper behavior and protecting against regression errors and system misconfigurations.

Once executed, standard output will indicate success with an 'OK' message and the number of executed unit tests as well as total run time. Any other message indicates failure and will include the nature of the failing tests.

Open an issue to give feedback or report bugs.

Running the scripts

As of 16 Feb 2017, repository contains two projects: geometry_analysis, and molecular_mechanics.

Geometry analysis

The geometry_analysis project contains scripts which take an xyz-format molecular geometry file as input, and output to screen associated geometry data, including bond lengths, bond angles, torsion angles, out-of-plane angles, center of mass, and/or moment of inertia, etc. Sample xyz files are located in [top_level_path]/geom/xyz directory.

Molecular mechanics

The molecular_mechanics project contains scripts to compute molecular mechanics energy of a system (mm.py), molecular dynamics trajectories (md.py), Metropolis Monte Carlo ensembles (mc.py), and optimize molecular coordinates to potential energy minima (opt.py).

The energy function and parameters in all cases is based on AMBER FF94.

Cornell et. al, 
J. Am. Chem. Soc. 1995, 117, 5179-5197.
doi.org/10.1021/ja00124a002

Energy function in Equation 1. Atom types in Table 1. Parameter values in Table 14. Download AmberTools15 from here. After unzipping, parameters located in amber14/dat/leap/parm/parm94.dat.

Sample input files for mm are located in [top_level_path]/geom/[file_type] directories, where file_type] is xyzq or prm. Sample input files for md and mc are located in [top_level_path]/geom/sim directory. Output files for each are demonstrated in samples, and may be written to any accessible file name.

Author

The sole author of this package is Trent M. Parker.

Acknowledgments

The author wishes to thank the following individuals: Dr. Michael S. Marshall, for encouraging him to learn the Python language; Dr. Lori S. Burns, for encouraging him to conform to style guidelines for readable Python code; Dr. Michael A. Lewis, for providing the inspiration for the author to initiate studies in this field; and Dr. C. David Sherrill, for providing an enormous number of opportunities to continue to learn and grow as a scientist and a person.