peleffy.template.Impact¶
-
class
peleffy.template.
Impact
(topology, for_amber=False)[source]¶ It is in charge of writing a Molecule object as a PELE’s Impact template.
-
__init__
(topology, for_amber=False)[source]¶ Initializes an Impact object.
- Parameters
topology (a peleffy.topology.Topology object) – The molecular topology representation to write as a Impact template
for_amber (bool) – Whether to save an Impact file compatible with PELE’s Amber force field implementation or not. Default is False which will create an Impact file compatible with OPLS2005
Examples
Write the Impact template of a peleffy’s molecule
>>> from peleffy.topology import Molecule
>>> molecule = Molecule('molecule.pdb')
>>> from peleffy.forcefield import OpenForceField
>>> openff = OpenForceField('openff_unconstrained-2.0.0.offxml') >>> parameters = openff.parameterize(molecule)
>>> from peleffy.topology import Topology
>>> topology = Topology(molecule, parameters)
>>> from peleffy.template import Impact
>>> impact = Impact(topology) >>> impact.to_file('molz')
Write the Impact template of a peleffy’s molecule compatible with PELE’s Amber forcefield implementation
>>> from peleffy.topology import Molecule
>>> molecule = Molecule('molecule.pdb')
>>> from peleffy.forcefield import OpenForceField
>>> openff = OpenForceField('openff_unconstrained-2.0.0.offxml') >>> parameters = openff.parameterize(molecule)
>>> from peleffy.topology import Topology
>>> topology = Topology(molecule, parameters)
>>> from peleffy.template import Impact
>>> impact = Impact(topology, for_amber=True) >>> impact.to_file('molz')
Attributes
H_6R_OF_2
molecule
The peleffy’s Molecule.
topology
The peleffy’s Topology.
-