pysimm.forcefield
¶
Submodules¶
Package Contents¶
Classes¶
pysimm.forcefield.Forcefield |
|
pysimm.forcefield.Dreiding |
|
pysimm.forcefield.Charmm |
|
pysimm.forcefield.Gaff |
|
pysimm.forcefield.Gaff2 |
|
pysimm.forcefield.Pcff |
|
pysimm.forcefield.Tip3p |
Functions¶
Private method to read/convert CHARMM specific FF parameters from the form of GROMACS input format (.atp, .itp) |
- class pysimm.forcefield.Forcefield(file_=None, format=None)[source]¶
Bases:
object
pysimm.forcefield.Forcefield
Base Forcefield class definition. Initialize with force field xml file.
- ff_class¶
force field class (1 or 2)
- ff_name¶
force field name
- particle_types¶
ItemContainer
for particle_types
- bond_types¶
ItemContainer
for bond_types
- angle_types¶
ItemContainer
for angle_types
- dihedral_types¶
ItemContainer
for dihedral_types
- improper_types¶
ItemContainer
for improper_types
- from_xml(self, file_)¶
- from_json(self, json_file)¶
- write_json(self, out)¶
- write_xml(self, out)¶
pysimm.forcefield.Forcefield.write
Write Forcefield object to xml format.
- Parameters
out – file name to write
- Returns
None
- class pysimm.forcefield.Dreiding(db_file=None)[source]¶
Bases:
pysimm.forcefield.forcefield.Forcefield
pysimm.forcefield.Dreiding
Forcefield object with typing rules for Dreiding model. By default reads data file in forcefields subdirectory.
- ff_name¶
dreiding
- pair_style¶
lj
- ff_class¶
1
- assign_ptypes(self, s)¶
pysimm.forcefield.Dreiding.assign_ptypes
Dreiding specific particle typing rules. Requires
System
objectParticle
objects have bonds defined. * use System.add_particle_bonding() to ensure this *- Parameters
s –
System
- Returns
None
- assign_btypes(self, s)¶
pysimm.forcefield.Dreiding.assign_btypes
Dreiding specific bond typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_atypes(self, s)¶
pysimm.forcefield.Dreiding.assign_atypes
Dreiding specific angle typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_dtypes(self, s)¶
pysimm.forcefield.Dreiding.assign_dtypes
Dreiding specific dihedral typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- class pysimm.forcefield.Charmm(db_file=None)[source]¶
Bases:
pysimm.forcefield.forcefield.Forcefield
pysimm.forcefield.Charmm
Forcefield object with typing rules for CHARMM model. By default reads data file in forcefields subdirectory.
- ff_name¶
charmm
- pair_style¶
lj/charmm
- ff_class¶
1
- assign_ptypes(self, s)¶
pysimm.forcefield.Charmm.assign_ptypes
Charmm specific particle typing rules. Requires
System
objectParticle
objects have bonds defined. * use System.add_particle_bonding() to ensure this ** Not entirely inclusive - some atom types not used *
- Parameters
s –
System
- Returns
None
- assign_extra_ljtypes(self, s)¶
pysimm.forcefield.Charmm.assign_extra_ljtypes
Addition to normal force field setup: filling up the non-diagonal interaction pair coefficients (coefficients for interaction of particles of different type).
Assumes that all
ParticleType
are defined for all particles in s- Parameters
s –
System
- Returns
None
- assign_btypes(self, s)¶
pysimm.forcefield.Charmm.assign_btypes
Gaff specific bond typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_atypes(self, s)¶
pysimm.forcefield.Charmm.assign_atypes
Gaff specific boanglend typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_dtypes(self, s)¶
pysimm.forcefield.Charmm.assign_dtypes
CHARMM specific dihedral typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_itypes(self, s)¶
pysimm.forcefield.Charmm.assign_itypes
Gaff specific improper typing rules. There are none.
- Parameters
s –
System
- Returns
None
- assign_charges(self, s, charges='gasteiger')¶
pysimm.forcefield.Charmm.assign_charges
Charge assignment. Gasteiger is default for now.
- Parameters
s –
System
charges – gasteiger
- Returns
None
- __parse_add_file__(self, file)¶
Private method to read/convert CHARMM specific FF parameters from the native format (.prm) to add on top of currentely existing library of FF parameters. Will update this ForceField object with data from the file and will write the output ‘charmm_mod.json’ DB file
- Parameters
file – (string) full (absolute or relative) path to an .prm file
- Returns
none
- pysimm.forcefield.__parse_charmm__()[source]¶
Private method to read/convert CHARMM specific FF parameters from the form of GROMACS input format (.atp, .itp) to the PySIMM input format (.json).
Note: Because of the format specification, there are no sigma_{14} or epsilon_{14} parameters in the file as well as explicit non-diagonal LJ parameters (NBFIXes). They are read from a different file types (see charmm.__parse_add_file__())
- Returns
None
- class pysimm.forcefield.Gaff(db_file=None)[source]¶
Bases:
pysimm.forcefield.forcefield.Forcefield
pysimm.forcefield.Gaff
Forcefield object with typing rules for Gaff model. By default reads data file in forcefields subdirectory.
- ff_name¶
gaff
- pair_style¶
lj
- ff_class¶
1
- assign_ptypes(self, s)¶
pysimm.forcefield.Gaff.assign_ptypes
Gaff specific particle typing rules. Requires
System
objectParticle
objects have bonds defined. * use System.add_particle_bonding() to ensure this ** Not entirely inclusive - some atom types not used *
- Parameters
s –
System
- Returns
None
- assign_btypes(self, s)¶
pysimm.forcefield.Gaff.assign_btypes
Gaff specific bond typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_atypes(self, s)¶
pysimm.forcefield.Gaff.assign_atypes
Gaff specific boanglend typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_dtypes(self, s)¶
pysimm.forcefield.Gaff.assign_dtypes
Gaff specific dihedral typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- class pysimm.forcefield.Gaff2(db_file=None)[source]¶
Bases:
pysimm.forcefield.forcefield.Forcefield
pysimm.forcefield.Gaff2
Forcefield object with typing rules for Gaff2 model. By default reads data file in forcefields subdirectory.
- ff_name¶
gaff2
- pair_style¶
lj
- bond_style¶
harmonic
- angle_style¶
harmonic
- dihedral_style¶
fourier
- improper_style¶
cvff
- ff_class¶
1
- assign_ptypes(self, s)¶
pysimm.forcefield.Gaff2.assign_ptypes
Gaff2 specific particle typing rules. Requires
System
objectParticle
objects have bonds defined. * use System.add_particle_bonding() to ensure this ** Not entirely inclusive - some atom types not used *
- Parameters
s –
System
- Returns
None
- assign_btypes(self, s)¶
pysimm.forcefield.Gaff2.assign_btypes
Gaff2 specific bond typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_atypes(self, s)¶
pysimm.forcefield.Gaff2.assign_atypes
Gaff2 specific angle typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_dtypes(self, s)¶
pysimm.forcefield.Gaff2.assign_dtypes
Gaff2 specific dihedral typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- class pysimm.forcefield.Pcff(db_file=None)[source]¶
Bases:
pysimm.forcefield.forcefield.Forcefield
pysimm.forcefield.Pcff
Forcefield object with typing rules for Pcff model. By default reads data file in forcefields subdirectory.
- ff_name¶
pcff
- pair_style¶
class2
- ff_class¶
2
- nb_mixing¶
sixth
- assign_ptypes(self, s)¶
pysimm.forcefield.Pcff.assign_ptypes
Pcff specific particle typing rules. Requires
System
objectParticle
objects have bonds defined. * use System.add_particle_bonding() to ensure this *- Parameters
s –
System
- Returns
None
- assign_btypes(self, s)¶
pysimm.forcefield.Pcff.assign_btypes
Pcff specific bond typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_atypes(self, s)¶
pysimm.forcefield.Pcff.assign_atypes
Pcff specific angle typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_dtypes(self, s)¶
pysimm.forcefield.Pcff.assign_dtypes
Pcff specific dihedral typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- class pysimm.forcefield.Tip3p(db_file=None)[source]¶
Bases:
pysimm.forcefield.forcefield.Forcefield
pysimm.forcefield.Tip3p
Forcefield object with typing rules for Tip3p model. By default reads data file in forcefields subdirectory.
- ff_name¶
tip3p
- pair_style¶
lj
- ff_class¶
1
- assign_ptypes(self, s)¶
pysimm.forcefield.Tip3p.assign_ptypes
Tip3p specific particle typing rules. Requires
System
objectParticle
objects have bonds defined. * use System.add_particle_bonding() to ensure this *- Parameters
s –
System
- Returns
None
- assign_btypes(self, s)¶
pysimm.forcefield.Tip3p.assign_btypes
Tip3p specific bond typing rules. Requires
System
objectParticle
objects have type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_atypes(self, s)¶
pysimm.forcefield.Tip3p.assign_atypes
Tip3p specific angle typing rules. Requires
System
objectParticle
objects have bonds, type and type.name defined. * use after assign_ptypes *- Parameters
s –
System
- Returns
None
- assign_dtypes(self, s)¶
pysimm.forcefield.Tip3p.assign_dtypes
Tip3p specific dihedral typing rules. There are none.
- Parameters
s –
System
- Returns
None