A custom force field for the implementation of reactive, directional bonds in Molecular Dynamics. Force field encompasses Tersoff potentials, Coulombic potentials, and Lennard-Jones potentials. This codebase includes three main codes:
- LAMMPs code adjustment for implementing MCSMRFF
- Training set generator
- Automatic parameterization method
The MCSMRFF force field works as follows:
- All atoms within some cutoff are described by Lennard-Jones (LJ) and Coulomb potentials
- Those atoms for which it is defined, will also have the Tersoff potential applied to it.
- All remaining atomic interactions will be described by the Optimized Potential for Liquid Simulation (OPLS-AA) forcefield.
Using the pair_style hybrid/overlay command, we can specify the pair styles of all atoms to be a function of both Tersoff and a custom pair style: lj/cut/coul/inout. This is simply:
pair_style hybrid/overlay lj/cut/coul/inout alpha R_cut_inner R_cut_outer tersoff
Where α is a damping parameter (in inverse distance units), Rcut, inner is an inner cutoff, and Rcut, outer is an outer cutoff. The distinction between the two cutoffs is that it allows for a smooth transition between the pair style being completely "on" (r < Rcut, inner) and "off" (r > Rcut, outer). When specifying pair coefficients, use the following syntax:
pair_coeff i j lj/cut/coul/inout epsilon_ij sigma_ij R_cut_inner
Where
The Tersoff Potential (1, 2, 3) is well described on the LAMMPs website, but in short describes 3-body atomic interactions as follows:
Note, this is not the "pure" original implementaion by Tersoff, but instead a generalization to accomodate updates to the method. Fundamentally, the Tersoff potential works by describing potential as a function of fR(r), the repulsive term, and fA(r), the attractive term. A smoothing function, fC(r), is applied so as to maintatain a continuous transition for a cutoff distance. bij is included to account for the bond-order, and is assumed to be a monotonically decreasing function of the coordination of atoms i and j. That is,
To accomodate variations of this potential, m and γijk are used. γijk scales the angular contribution to bij, and m changes from 3 to 1 depending on whether the Nord et al. variation is to be used.
Looking through these equations, the following are all terms that we must parameterize (note, we follow the trend of setting aij = 1):
R - The cutoff distance at which 50% of the potential is in effect.
D - The buffer distance before and after R for the smoothing function fC(rij).
A - The constant scalar for the repulsive function fR(rij).
λ1 - The exponential decay of the repulsive function fR(rij).
B - The constant scalar for the repulsive function fA(rij).
λ2 - The exponential decay of the attractive function fA(rij).
n - An exponential to decay factor of bij to accomodate for the change in decay rate of low and high coordinations ξij.
beta - A scalar for the impact of the coordination contribution ξij.
m - An exponential to accomodate the Tersoff potential (3) or the Nord variation (1).
λ3 - The exponential factor of the bond coordination term ξij.
γijk - Scaling term for the impact of the angular contribution to the bond coordination.
c - How strong the angular contribution is to the bond coordination.
d - How sharp the angular contribution is to the bond coordination.
cosθ0 - The minimum angle for which this contribution is minimized.
- Download LAMMPS (older versions here). Some versions will not work - the 7 Dec 2015 is the one we've tested the most, so use that one.
- Open a terminal in the src directory in your lammps folder
- In your LAMMPS src directory run make yes-manybody
-
If you don't have an SSH key, generate one like this (if you do, skip to step 8):
When prompted to "Enter a file in which to save the key," press Enter
If asked to Overwrite, enter 'y'
At the prompt, type a secure passphrase
Retype your secure passphrase
-
Add the new SSH key to your GitHub account
In the top right corner of any GitHub page in your browser, click on your profile photo, then click 'Settings'
In the user settings sidebar, click 'SSH keys'
Click 'New SSH key'
In the "Title" field, add a descriptive label for the new key
Copy and Paste the contents from the 'id_rsa.pub' file into the "Key" field
Click 'Add SSH key'
-
Load your keys into your SSH agent
Enter passphrase
-
Test your SSH connection
You should see the message "Hi 'username'! You've successfully authenicated, but GitHub does not provide shell access."
-
Clone repository wherever
- Copy over contents of Grad-MCSMRFF/LAMMPS to your lammps src folder. Note, this overwrites the min.h and pair_tersoff.h files.
-
Make using the new Makefile.mcsmrff
-
Add the path of Grad-MCSMRFF/MCSMRFF/pys to your PYTHONPATH variable:
- You're done! Now you can use lammps with the lmp_mcsmrff file in your lammps/src directory.