peleffy.forcefield.OpenForceField¶
-
class
peleffy.forcefield.
OpenForceField
(forcefield_name)[source]¶ It defines an OpenFF force field.
-
__init__
(forcefield_name)¶ It initializes the base force field class.
- Parameters
forcefield_name (str) – The name of the forcefield
Examples
Load a molecule and generate its parameters with an OpenFF force field
>>> from peleffy.topology import Molecule
>>> molecule = Molecule('molecule.pdb')
>>> from peleffy.forcefield import OpenForceField
>>> openff = OpenForceField('openff_unconstrained-1.2.1.offxml') >>> parameters = openff.parameterize(molecule)
Load a molecule and generate its parameters with an OpenFF force field and ‘gasteiger’ partial charges
>>> from peleffy.topology import Molecule
>>> molecule = Molecule('molecule.pdb')
>>> from peleffy.forcefield import OpenForceField
>>> openff = OpenForceField('openff_unconstrained-1.2.1.offxml') >>> parameters = openff.parameterize(molecule, charge_method='gasteiger')
-
parameterize
(molecule, charge_method=None)¶ It parameterizes the supplied molecule.
- Parameters
molecule (a peleffy.topology.Molecule) – The peleffy’s Molecule object to parameterize
charge_method (str) – The name of the charge method to employ
- Returns
parameters – The parameter wrapper containing the parameters generated with the current force field
- Return type
a peleffy.forcefield.parameters.BaseParameterWrapper object
Attributes
name
It returns the name of the force field.
parameters
It returns the parameters obtained with the force field.
type
It returns the type of the force field.
-