|
OpenMM
|
A ForceField constructs OpenMM System objects based on a Topology. More...
Inheritance diagram for ForceField:Public Member Functions | |
| def | __init__ |
| Load one or more XML files and create a ForceField object based on them. More... | |
| def | loadFile |
| Load an XML file and add the definitions from it to this FieldField. More... | |
| def | getGenerators |
| Get the list of all registered generators. More... | |
| def | registerGenerator |
| Register a new generator. More... | |
| def | registerAtomType |
| Register a new atom type. More... | |
| def | registerResidueTemplate |
| Register a new residue template. More... | |
| def | registerScript |
| Register a new script to be executed after building the System. More... | |
| def | createSystem |
| Construct an OpenMM System representing a Topology with this force field. More... | |
A ForceField constructs OpenMM System objects based on a Topology.
| def __init__ | ( | self, | |
| files | |||
| ) |
Load one or more XML files and create a ForceField object based on them.
| files | (list) A list of XML files defining the force field. Each entry may be an absolute file path, a path relative to the current working directory, a path relative to this module's data subdirectory (for built in force fields), or an open file-like object with a read() method from which the forcefield XML data can be loaded. |
References ForceField._atomClasses, ForceField._atomTypes, ForceField._forces, ForceField._scripts, ForceField._templates, ForceField._templateSignatures, and ForceField.loadFile().
Referenced by ForceField.createSystem(), and ForceField.registerScript().
| def createSystem | ( | self, | |
| topology, | |||
nonbondedMethod = NoCutoff, |
|||
nonbondedCutoff = 1.0*unit.nanometer, |
|||
constraints = None, |
|||
rigidWater = True, |
|||
removeCMMotion = True, |
|||
hydrogenMass = None, |
|||
| args | |||
| ) |
Construct an OpenMM System representing a Topology with this force field.
| topology | (Topology) The Topology for which to create a System |
| nonbondedMethod | (object=NoCutoff) The method to use for nonbonded interactions. Allowed values are NoCutoff, CutoffNonPeriodic, CutoffPeriodic, Ewald, or PME. |
| nonbondedCutoff | (distance=1*nanometer) The cutoff distance to use for nonbonded interactions |
| constraints | (object=None) Specifies which bonds and angles should be implemented with constraints. Allowed values are None, HBonds, AllBonds, or HAngles. |
| rigidWater | (boolean=True) If true, water molecules will be fully rigid regardless of the value passed for the constraints argument |
| removeCMMotion | (boolean=True) If true, a CMMotionRemover will be added to the System |
| hydrogenMass | (mass=None) The mass to use for hydrogen atoms bound to heavy atoms. Any mass added to a hydrogen is subtracted from the heavy atom to keep their total mass the same. |
| args | Arbitrary additional keyword arguments may also be specified. This allows extra parameters to be specified that are specific to particular force fields. |
References ForceField.__init__(), ForceField._atomTypes, ForceField._forces, ForceField._scripts, ForceField._templateSignatures, HarmonicAngleGenerator.angle, AmoebaAngleGenerator.angle, CustomNonbondedGenerator.bondCutoff, CustomManyParticleGenerator.bondCutoff, RBTorsion.c, CustomGBGenerator.computedValues, NonbondedGenerator.coulomb14scale, CustomNonbondedGenerator.energy, CustomManyParticleGenerator.energy, CustomGBGenerator.energyTerms, HarmonicBondGenerator.ff, HarmonicAngleGenerator.ff, PeriodicTorsionGenerator.ff, RBTorsionGenerator.ff, CMAPTorsionGenerator.ff, NonbondedGenerator.ff, GBSAOBCGenerator.ff, GBVIGenerator.ff, CustomBondGenerator.ff, CustomAngleGenerator.ff, CustomTorsionGenerator.ff, CustomNonbondedGenerator.ff, CustomGBGenerator.ff, CustomManyParticleGenerator.ff, DrudeGenerator.ff, GBVIGenerator.fixedParameters, CustomNonbondedGenerator.functions, CustomGBGenerator.functions, CustomManyParticleGenerator.functions, CustomBondGenerator.globalParams, CustomAngleGenerator.globalParams, CustomTorsionGenerator.globalParams, CustomNonbondedGenerator.globalParams, CustomGBGenerator.globalParams, CustomManyParticleGenerator.globalParams, PeriodicTorsionGenerator.improper, RBTorsionGenerator.improper, CustomTorsionGenerator.improper, HarmonicBondGenerator.k, HarmonicAngleGenerator.k, PeriodicTorsion.k, AmoebaBondGenerator.k, AmoebaAngleGenerator.k, AmoebaPiTorsionGenerator.k, AmoebaUreyBradleyGenerator.k, ForceField._BondData.length, HarmonicBondGenerator.length, AmoebaBondGenerator.length, AmoebaUreyBradleyGenerator.length, NonbondedGenerator.lj14scale, CMAPTorsion.map, CMAPTorsionGenerator.maps, CustomBondGenerator.paramValues, CustomAngleGenerator.paramValues, CustomTorsion.paramValues, CustomManyParticleGenerator.particlesPerSet, CustomAngleGenerator.perAngleParams, CustomBondGenerator.perBondParams, PeriodicTorsion.periodicity, CustomManyParticleGenerator.permutationMode, CustomNonbondedGenerator.perParticleParams, CustomGBGenerator.perParticleParams, CustomManyParticleGenerator.perParticleParams, CustomTorsionGenerator.perTorsionParams, PeriodicTorsion.phase, PeriodicTorsionGenerator.proper, RBTorsionGenerator.proper, CustomTorsionGenerator.proper, CMAPTorsionGenerator.torsions, CustomManyParticleGenerator.typeFilters, NonbondedGenerator.typeMap, GBSAOBCGenerator.typeMap, GBVIGenerator.typeMap, CustomNonbondedGenerator.typeMap, CustomGBGenerator.typeMap, CustomManyParticleGenerator.typeMap, AmoebaVdwGenerator.typeMap, AmoebaMultipoleGenerator.typeMap, AmoebaWcaDispersionGenerator.typeMap, DrudeGenerator.typeMap, HarmonicBondGenerator.types1, HarmonicAngleGenerator.types1, PeriodicTorsion.types1, RBTorsion.types1, CMAPTorsion.types1, CustomBondGenerator.types1, CustomAngleGenerator.types1, CustomTorsion.types1, AmoebaBondGenerator.types1, AmoebaAngleGenerator.types1, AmoebaOutOfPlaneBendGenerator.types1, AmoebaTorsionGenerator.types1, AmoebaPiTorsionGenerator.types1, AmoebaTorsionTorsionGenerator.types1, AmoebaStretchBendGenerator.types1, AmoebaUreyBradleyGenerator.types1, HarmonicBondGenerator.types2, HarmonicAngleGenerator.types2, PeriodicTorsion.types2, RBTorsion.types2, CMAPTorsion.types2, CustomBondGenerator.types2, CustomAngleGenerator.types2, CustomTorsion.types2, AmoebaBondGenerator.types2, AmoebaAngleGenerator.types2, AmoebaOutOfPlaneBendGenerator.types2, AmoebaTorsionGenerator.types2, AmoebaPiTorsionGenerator.types2, AmoebaTorsionTorsionGenerator.types2, AmoebaStretchBendGenerator.types2, AmoebaUreyBradleyGenerator.types2, HarmonicAngleGenerator.types3, PeriodicTorsion.types3, RBTorsion.types3, CMAPTorsion.types3, CustomAngleGenerator.types3, CustomTorsion.types3, AmoebaAngleGenerator.types3, AmoebaOutOfPlaneBendGenerator.types3, AmoebaTorsionGenerator.types3, AmoebaTorsionTorsionGenerator.types3, AmoebaStretchBendGenerator.types3, AmoebaUreyBradleyGenerator.types3, PeriodicTorsion.types4, RBTorsion.types4, CMAPTorsion.types4, CustomTorsion.types4, AmoebaOutOfPlaneBendGenerator.types4, AmoebaTorsionGenerator.types4, AmoebaTorsionTorsionGenerator.types4, CMAPTorsion.types5, and AmoebaTorsionTorsionGenerator.types5.
Referenced by ForceField.registerScript().
| def getGenerators | ( | self | ) |
Get the list of all registered generators.
References ForceField._forces.
| def loadFile | ( | self, | |
| file | |||
| ) |
Load an XML file and add the definitions from it to this FieldField.
| file | (string or file) An XML file containing force field definitions. It may be either an absolute file path, a path relative to the current working directory, a path relative to this module's data subdirectory (for built in force fields), or an open file-like object with a read() method from which the forcefield XML data can be loaded. |
References ForceField._atomTypes, ForceField.registerAtomType(), ForceField.registerResidueTemplate(), and ForceField.registerScript().
Referenced by ForceField.__init__().
| def registerAtomType | ( | self, | |
| parameters | |||
| ) |
Register a new atom type.
References ForceField._atomClasses, and ForceField._atomTypes.
Referenced by ForceField.loadFile().
| def registerGenerator | ( | self, | |
| generator | |||
| ) |
Register a new generator.
| def registerResidueTemplate | ( | self, | |
| template | |||
| ) |
Register a new residue template.
References ForceField._templates, and ForceField._templateSignatures.
Referenced by ForceField.loadFile().
| def registerScript | ( | self, | |
| script | |||
| ) |
Register a new script to be executed after building the System.
References ForceField.__init__(), ForceField._atomClasses, ForceField._atomTypes, ForceField._findAtomTypes(), GromacsTopFile._MoleculeType.angles, ForceField._SystemData.angles, ForceField._BondData.atom1, ForceField._BondData.atom2, ForceField._SystemData.atomBonds, GromacsTopFile._MoleculeType.atoms, Topology.atoms(), ForceField._SystemData.atoms, Chain.atoms(), ForceField._TemplateData.atoms, Residue.atoms(), ForceField._VirtualSiteData.atoms, ForceField._SystemData.atomType, ForceField._TemplateAtomData.bondedTo, GromacsTopFile._MoleculeType.bonds, Topology.bonds(), ForceField._SystemData.bonds, ForceField._TemplateData.bonds, ForceField.createSystem(), ForceField._TemplateAtomData.element, Atom.element, ForceField._SystemData.excludeAtomWith, ForceField._VirtualSiteData.excludeWith, ForceField._TemplateData.externalBonds, ForceField._TemplateAtomData.externalBonds, ForceField._SystemData.impropers, Chain.index, Residue.index, ForceField._VirtualSiteData.index, Atom.index, ForceField._SystemData.isAngleConstrained, ForceField._BondData.isConstrained, ForceField._BondData.length, HarmonicBondGenerator.length, AmoebaBondGenerator.length, AmoebaUreyBradleyGenerator.length, ForceField._VirtualSiteData.localPos, Element.name(), ForceField._TemplateData.name, Residue.name, ForceField._TemplateAtomData.name, Atom.name, Modeller._ResidueData.name, Modeller._Hydrogen.name, ForceField._VirtualSiteData.originWeights, ForceField._SystemData.propers, ForceField._TemplateAtomData.type, ForceField._VirtualSiteData.type, AmoebaOutOfPlaneBendGenerator.type, AmoebaVdwGenerator.type, ForceField._SystemData.virtualSites, ForceField._TemplateData.virtualSites, ForceField._VirtualSiteData.weights, ForceField._VirtualSiteData.xWeights, and ForceField._VirtualSiteData.yWeights.
Referenced by ForceField.loadFile().