pymatgen.io.lammps.force_field module¶
-
class
ForceField(atoms, bonds, angles, dihedrals=None, imdihedrals=None, pairs=None)[source]¶ Bases:
monty.json.MSONableStores force field information.
Parameters: - atoms (Dict) – store atomic mass for each atom name. { “custom atom name”: atom name, … }
- bonds (Dict) – store the bond distance and spring constant for each bond. { (“atom name1”, “atom name2”): [spring const, distance], … }
- angles (Dict) – store the bond angle and spring constant. { (“atom name1”, “atom name2”, “atom name3”): [spring const, angle], … }
- dihedrals (Dict) – store dihedral paramters. { (“atom name1”, “atom name2”, “atom name3”, “atom name4”): [val1, val2, …], … }
- imdihedrals (Dict) – store improper dihedral information. Similar to dihedrals.
- pairs (Dict) – store pair coefficient info. { (“atom name1”, “atom name2”): [val1, val2, ..], … }
-
static
from_file(filename)[source]¶ Read in forcefield parameters from yaml file and return Forcefield object. Basically read in atom name mappings(key=’Atoms’), bond coefficients(key=’Bond Coeffs’), angle coefficients(key=’Angle Coeffs’), pair coefficients(key=’Pair Coeffs’), dihedral coefficients(key=’Dihedral Coeffs’) and the improper dihedral coefficients(key=’Improper Coeffs’).
Parameters: filename (string) – Returns: ForceField object