Molmodel
|
The base class for atoms, molecules, and chemical groups. More...
#include <Compound.h>
Classes | |
class | SingleAtom |
Base class for single-atom Compound building blocks. More... | |
Public Types | |
enum | MatchStratagem { Match_Exact, Match_Idealized, Match_TopologyOnly } |
Public Member Functions | |
Compound & | setTopLevelTransform (const Transform &transform) |
Set the orientation and location of this Compound. | |
const Transform & | getTopLevelTransform () const |
Molecular topology methods | |
Compound () | |
default Compound constructor. | |
Compound (const Name &name) | |
Construct a Compound with a type name. | |
int | getNumAtoms () const |
size_t | getNumBondCenters () const |
size_t | getNumBondCenters (Compound::AtomIndex atomIndex) const |
size_t | getNumBonds () const |
bool | hasAtom (const AtomPathName &name) const |
bool | hasBondCenter (const BondCenterPathName &bondCenter) const |
Compound::AtomIndex | getBondAtomIndex (Compound::BondIndex bondIndex, int which) const |
Compound & | setBaseAtom (const Compound::AtomName &name, const Element &element, const Transform &location=Vec3(0)) |
Add the first atom unconnected to anything else (yet). | |
Compound & | setBaseAtom (const Compound::AtomName &name, const Biotype &biotype, const Transform &location=Vec3(0)) |
Add the first atom unconnected to anything else (yet). | |
Compound & | setBaseAtom (const Compound::SingleAtom &c, const Transform &=Transform()) |
Add a first subcompound containing exactly one atom, so the Compound::AtomName can be reused for the Compound::Name. | |
Compound & | setBaseCompound (const Compound::Name &n, const Compound &c, const Transform &location=Transform()) |
Add a first subcompound without attaching it to anything. | |
Compound & | bondAtom (const Compound::SingleAtom &c, const BondCenterPathName &parentBondName, mdunits::Length distance, Angle dihedral=0, BondMobility::Mobility=BondMobility::Default) |
Add a subcompound containing exactly one atom, so the Compound::AtomName can be reused for the Compound::Name. | |
Compound & | bondAtom (const Compound::SingleAtom &c, const BondCenterPathName &parentBondName) |
Bond atom using default bond length and dihedral angle. | |
Compound & | bondCompound (const Compound::Name &n, const Compound &c, const BondCenterPathName &parentBondName, mdunits::Length distance, Angle dihedral=180 *Deg2Rad, BondMobility::Mobility mobility=BondMobility::Default) |
Add a subcompound attached by its inboard bond to an existing bond center. | |
Compound & | bondCompound (const Compound::Name &n, const Compound &c, const BondCenterPathName &parentBondName) |
Add a subcompound attached by its inboard bond to an existing bond center. | |
Compound & | bondCompound (const Compound::Name &n, const Compound &c, const BondCenterPathName &parentBondName, BondMobility::Mobility mobility) |
Add a subcompound attached by its inboard bond to an existing bond center. | |
Compound & | setInboardBondCenter (const Compound::BondCenterName ¢erName) |
setInboardBondCenter assigns special status to a bond center. | |
Compound & | convertInboardBondCenterToOutboard () |
Make so that this compound can no longer be a child to the geometry of another compound Raises an error if the inboard bond center is already bonded. | |
Compound & | addFirstBondCenter (const Compound::BondCenterName ¢erName, const Compound::AtomPathName &atomName) |
Assign the very first bond center on a particular atom. | |
Compound & | addSecondBondCenter (const Compound::BondCenterName ¢erName, const Compound::AtomName &atomName, Angle bondAngle1) |
Place a second bond center on an atom, placed a particular angle away from the first bond center. | |
Compound & | addPlanarBondCenter (const Compound::BondCenterName ¢erName, const Compound::AtomName &atomName, Angle bondAngle1, Angle bondAngle2) |
Places a third or later bond center on an atom, in the same plane as the first two bond centers. | |
Compound & | addRightHandedBondCenter (const Compound::BondCenterName ¢erName, const Compound::AtomName &atomName, Angle bondAngle1, Angle bondAngle2) |
Place a third or later bond center on an atom, defined by two angular displacements from the first and second bond centers, respectively. | |
Compound & | addLeftHandedBondCenter (const Compound::BondCenterName ¢erName, const Compound::AtomName &atomName, Angle bondAngle1, Angle bondAngle2) |
Place a third or later bond center on an atom, defined by two angular displacements from the first and second bond centers, respectively. | |
Compound & | addRingClosingBond (const Compound::BondCenterPathName ¢erName1, const Compound::BondCenterPathName ¢erName2, mdunits::Length bondLength, Angle dihedral=180 *Deg2Rad, BondMobility::Mobility mobility=BondMobility::Default) |
Adds a covalent bond that is not part of the main tree-topology of bonds in a Compound. | |
Compound & | addRingClosingBond (const Compound::BondCenterPathName ¢erName1, const Compound::BondCenterPathName ¢erName2) |
Adds a covalent bond that is not part of the main tree-topology of bonds in a molecule. | |
const Compound & | getSubcompound (const Compound::Name &subcompoundName) const |
Compound & | updSubcompound (const Compound::Name &subcompoundName) |
Compound nomenclature methods | |
Compound & | setCompoundName (const Name &) |
Name a type of Compound. | |
const Name & | getCompoundName () const |
Compound & | addCompoundSynonym (const Name &) |
Add an additional name for this class of compound. | |
const AtomPathName | getAtomName (Compound::AtomIndex) const |
Returns the most recently assigned name, if any, given to an atom in this compound. | |
const Element & | getAtomElement (Compound::AtomIndex) const |
const Element & | getAtomElement (const Compound::AtomName &) const |
Name a type of Compound. | |
Compound & | nameAtom (const Compound::AtomName &newName, const AtomPathName &oldName) |
Compound & | nameAtom (const Compound::AtomName &newName, const AtomPathName &oldName, BiotypeIndex biotype) |
Compound & | defineDihedralAngle (const Compound::DihedralName &angleName, const Compound::AtomPathName &atom1, const Compound::AtomPathName &atom2, const Compound::AtomPathName &atom3, const Compound::AtomPathName &atom4, Angle offset=0 *Deg2Rad) |
Define a named dihedral angle using four atoms. | |
Compound & | defineDihedralAngle (const Compound::DihedralName &angleName, const Compound::BondCenterPathName &bond1, const Compound::BondCenterPathName &bond2, Angle offset=0 *Deg2Rad) |
Define a named dihedral in terms of two bond centers. | |
Compound & | setPdbResidueNumber (int resNum) |
Set value to populate "residue number" field for PDB file output. | |
int | getPdbResidueNumber () const |
Compound & | setPdbResidueName (const String &resName) |
Set string to populate "residue type" field for PDB file output. | |
const String & | getPdbResidueName () const |
Compound & | setPdbChainId (char chainId) |
Set character to populate "chain id" field for PDB file output. | |
char | getPdbChainId () const |
Compound & | nameBondCenter (const Compound::BondCenterName &newName, const BondCenterPathName &oldName) |
Define a local name for a particular BondCenter in this Compound. | |
Compound & | inheritAtomNames (const Compound::Name &) |
Convenience method to locally import all of the atom names that a particular subcompound uses. | |
Compound & | inheritCompoundSynonyms (const Compound &otherCompound) |
Name a type of Compound. | |
Compound & | inheritBondCenterNames (const Compound::Name &) |
Convenience method to locally import all of the BondCenter names that a particular subcompound uses. | |
Compound::AtomIndex | getAtomIndex (const Compound::AtomPathName &) const |
Compound simulation methods | |
void | setMultibodySystem (MultibodySystem &system) |
Add this Compound, including all of its subcompounds, to a CompoundSystem, for simulation etc. | |
Compound & | setBondMobility (BondMobility::Mobility mobility, const AtomPathName &atom1, const AtomPathName &atom2) |
Override the default rotatability of a bond. | |
Compound & | setBondMobility (BondMobility::Mobility mobility, Compound::BondIndex bondIndex) |
Override the default rotatability of a bond. | |
Compound & | setCompoundBondMobility (BondMobility::Mobility mobility) |
Set BondMobility for every bond in the Compound. | |
MobilizedBodyIndex | getAtomMobilizedBodyIndex (Compound::AtomIndex) const |
get the simbody MobilizedBody to which a particular atom is attached | |
Vec3 | getAtomLocationInMobilizedBodyFrame (Compound::AtomIndex) const |
get the location of an Atom in the frame of the simbody MobilizedBody to which the Atom is attached | |
Compound & | setBiotypeIndex (const Compound::AtomPathName &atomName, BiotypeIndex biotype) |
define the Biotype for an Atom in this Compound | |
Compound & | setAtomBiotype (const Compound::AtomPathName &atomName, const String &biotypeResidueName, const String &biotypeAtomName, SimTK::Ordinality::Residue ordinality=SimTK::Ordinality::Any) |
Add this Compound, including all of its subcompounds, to a CompoundSystem, for simulation etc. | |
BiotypeIndex | getAtomBiotypeIndex (Compound::AtomIndex) const |
DuMM::AtomIndex | getDuMMAtomIndex (Compound::AtomIndex) const |
get DuMMForceFieldSubsystem atom index corresponding to an atom in this Compound | |
Protected Member Functions | |
void | setDuMMAtomIndex (Compound::AtomIndex, DuMM::AtomIndex) |
Stores relationship between a Compound Atom and an Atom defined in a DuMMForcefieldSubsystem. | |
Compound (CompoundRep *ip) | |
Friends | |
class | CompoundSystem |
Data types that identify subcomponents of molecular compounds | |
typedef String | Name |
Type for name of a particular subcompound within a Compound. | |
typedef String | AtomName |
Type for name of a particular atom within a Compound. | |
typedef String | BondCenterName |
Type for name of a particular bond center within a Compound or atom. | |
typedef String | DihedralName |
Type for name of a particular named dihedral angle within a Compound. | |
typedef String | BondCenterPathName |
Type for name of a particular bond center within a Compound, possibly including subcompound indirection. | |
typedef String | AtomPathName |
Type for name of a particular atom within a Compound, possibly including subcompound path. | |
typedef std::map< AtomIndex, Vec3 > | AtomTargetLocations |
Type for set of target atom locations to be used for structure matching. | |
SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE (Compound, AtomIndex) | |
Compound::Index type is an integer index into subcompounds of a Compound. | |
SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE (Compound, LocalAtomIndex) | |
Compound::LocalAtomIndex type is an integer index into atoms directly attached to a Compound, that is to say that the atom does not belong to any subcompounds of the Compound. | |
SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE (Compound, BondCenterIndex) | |
Compound::BondCenterIndex type is an integer index into BondCenters of a Compound. | |
SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE (Compound, BondIndex) | |
Compound::BondIndex type is an integer index into Bonds of a Compound. | |
Molecular geometry methods | |
enum | PlanarBondMatchingPolicy { KeepPlanarBonds, DistortPlanarBonds, FlipPlanarBonds } |
Compute atom location in local Compound frame. More... | |
Vec3 | calcDefaultAtomLocationInGroundFrame (const AtomPathName &atomName) const |
Compute atom location in local Compound frame. | |
Vec3 | calcDefaultAtomLocationInCompoundFrame (const AtomPathName &atomName) const |
Compute atom location in local Compound frame. | |
Compound & | setDefaultInboardBondLength (mdunits::Length) |
Sets default (initial) bond length of current or future Bond using this Compound's inboard BondCenter. | |
Compound & | setDefaultInboardDihedralAngle (Angle) |
Stores a default (initial) dihedral angle in the inboard BondCenter of this Compound. | |
Compound & | setDefaultBondAngle (Angle angle, const AtomPathName &atom1, const AtomPathName &atom2, const AtomPathName &atom3) |
Sets a default(initial) bond angle defined by three atoms. | |
Compound & | setDefaultBondLength (mdunits::Length length, const AtomPathName &atom1, const AtomPathName &atom2) |
Sets a default (inital) bond length defined by two atoms. | |
Compound & | setDefaultDihedralAngle (const DihedralName &dihedralName, Angle angleInRadians) |
Sets a default (initial) dihedral angle of a previously named dihedral. | |
Compound & | setDefaultDihedralAngle (Angle angle, Compound::AtomIndex atom1, Compound::AtomIndex atom2, Compound::AtomIndex atom3, Compound::AtomIndex atom4) |
Compute atom location in local Compound frame. | |
Compound & | setDefaultDihedralAngle (Angle angle, const Compound::AtomName &atom1, const Compound::AtomName &atom2, const Compound::AtomName &atom3, const Compound::AtomName &atom4) |
Compute atom location in local Compound frame. | |
Angle | calcDefaultDihedralAngle (const DihedralName &dihedralName) const |
Computes default (initial) dihedral angle of a previously named dihedral. | |
Compound & | setDihedralAngle (State &state, const DihedralName &dihedralName, Angle) |
Sets dynamic dihedral angle of a previously named dihedral. | |
Angle | calcDihedralAngle (const State &state, const DihedralName &dihedralName) const |
Computes dynamic dihedral angle of a previously named dihedral. | |
Transform | calcDefaultAtomFrameInCompoundFrame (Compound::AtomIndex) const |
Vec3 | calcAtomLocationInGroundFrame (const State &state, Compound::AtomIndex atomId) const |
Vec3 | calcAtomLocationInCompoundFrame (const State &state, Compound::AtomIndex atomId) const |
Compute atom location in local Compound frame. | |
Vec3 | calcAtomVelocityInGroundFrame (const State &state, Compound::AtomIndex atomId) const |
Vec3 | calcAtomAccelerationInGroundFrame (const State &state, Compound::AtomIndex atomId) const |
Transform | getSubcompoundFrameInParentFrame (const Compound::Name &subcompoundName) const |
virtual AtomTargetLocations | createAtomTargets (const class PdbStructure &targetStructure) const |
Create a mapping between this Compound and atom locations in a PdbStructure. | |
virtual AtomTargetLocations | createAtomTargets (const class PdbChain &targetChain) const |
Compute atom location in local Compound frame. | |
virtual AtomTargetLocations | createAtomTargets (const class PdbResidue &targetResidue) const |
Compute atom location in local Compound frame. | |
Compound & | matchDefaultAtomChirality (const AtomTargetLocations &atomTargets, Angle planarityTolerance=90.0 *Deg2Rad, bool flipAll=true) |
Adjust stereochemistry about chiral atoms to match that seen in a set of atomic locations. | |
Compound & | matchDefaultBondLengths (const AtomTargetLocations &atomTargets) |
Compute atom location in local Compound frame. | |
Compound & | matchDefaultBondAngles (const AtomTargetLocations &atomTargets) |
Compute atom location in local Compound frame. | |
Compound & | matchDefaultDihedralAngles (const AtomTargetLocations &atomTargets, PlanarBondMatchingPolicy policy=FlipPlanarBonds) |
Compute atom location in local Compound frame. | |
Compound & | matchDefaultTopLevelTransform (const AtomTargetLocations &atomTargets) |
Compute atom location in local Compound frame. | |
TransformAndResidual | getTransformAndResidual (const Compound::AtomTargetLocations &atomTargets) const |
Compute atom location in local Compound frame. | |
Compound & | matchDefaultConfiguration (const AtomTargetLocations &atomTargets, MatchStratagem matchStratagem=Match_Exact) |
Adjust internal coordinates to match a collection of atom targets. | |
Compound & | fitDefaultConfiguration (const AtomTargetLocations &atomTargets, SimTK::Real targetRms) |
Optimize adjustable degrees of freedom to best match atom targets. | |
const Compound & | populateDefaultPdbChain (class PdbChain &, int &defaultNextResidueNumber, const Transform &transform=Transform()) const |
Write current default(initial) Compound configuration into a PdbChain object. | |
const Compound & | populatePdbChain (const State &state, class PdbChain &, int &defaultNextResidueNumber, const Transform &transform=Transform()) const |
Write dynamic Compound configuration into a PdbChain object. | |
std::ostream & | writeDefaultPdb (std::ostream &os, const Transform &transform=Transform()) const |
Write the default (initial) configuration in Protein Data Bank (PDB) format. | |
void | writeDefaultPdb (const char *outFileName, const Transform &transform) const |
/brief This polymorphism takes a char* file name rather than ostream, to save the user a couple of lines of code. | |
std::ostream & | writeDefaultPdb (std::ostream &os, int &nextAtomSerialNumber, const Transform &transform=Transform()) const |
Write the default (initial) configuration in Protein Data Bank (PDB) format. | |
std::ostream & | writePdb (const State &state, std::ostream &os, const Transform &transform=Transform()) const |
Write the dynamic Compound configuration in Protein Data Bank (PDB) format. | |
std::ostream & | writePdb (const State &state, std::ostream &os, int &nextAtomSerialNumber, const Transform &transform=Transform()) const |
Write the dynamic Compound configuration in Protein Data Bank (PDB) format. |
The base class for atoms, molecules, and chemical groups.
The Compound class is the base for all molecular entities in the SimTK Molmodel API.
typedef String SimTK::Compound::Name |
Type for name of a particular subcompound within a Compound.
Compound::Name is used as an index to subcompounds of a parent compound, e.g. "methyl group gamma"
typedef String SimTK::Compound::AtomName |
Type for name of a particular atom within a Compound.
Compound::AtomName is not intrinsic to the atom itself, but rather the relationship between an atom and a particular Compound. A particular atom may have different names in a compound and its subcompounds. For example, a particular atom might have the name "methyl H1" in a Compound, and have the name "H1" within a subcompound of that Compound. Unlike AtomPathNames, AtomNames must not be qualified by subcompound indirection. e.g. "H1" is a valid AtomName and a valid AtomPathName, while "methyl/H1" (because of the "/" character) is not a valid AtomName, but is a valid AtomPathName.
Type for name of a particular bond center within a Compound or atom.
Compound::BondCenterName is not intrinsic to the bond center itself, but rather the relationship between a bond center and a particular atom or Compound. BondCenterNames are local to a particular compound. In contrast, BondCenterPathNames may be qualified by subcompound indirection. e.g. "bond1" is a valid BondCenterName and a valid BondCenterPathName, while "methyl gamma/bond1" is not a valid BondCenterName, but is a valid BondCenterPathName.
typedef String SimTK::Compound::DihedralName |
Type for name of a particular named dihedral angle within a Compound.
Compound::DihedralName is not intrinsic to the dihedral angle itself, but rather the relationship between a dihedral angle and a particular Compound.
Type for name of a particular bond center within a Compound, possibly including subcompound indirection.
Compound::BondCenterPathName is not intrinsic to the bond center itself, but rather the relationship between a bond center and a particular Compound. BondCenterPathNames may be qualified by subcompound indirection, in contrast to BondCenterNames. e.g. "bond1" is a valid BondCenterName and a valid BondCenterPathName, while "methyl gamma/bond1" is not a valid BondCenterName, but is a valid BondCenterPathName.
typedef String SimTK::Compound::AtomPathName |
Type for name of a particular atom within a Compound, possibly including subcompound path.
Compound::AtomPathName is not intrinsic to the atom itself, but rather the relationship between an atom and a particular Compound. A particular atom may have different names in a compound and its subcompounds. For example, a particular atom might have the name "methyl H1" in a Compound, and have the name "H1" within a subcompound of that Compound. AtomPathNames may be qualified by subcompound indirection, in contrast to AtomNames. e.g. "H1" is a valid AtomName and a valid AtomPathName, while "methyl/H1" (because of the "/" character) is not a valid AtomName, but is a valid AtomPathName.
typedef std::map<AtomIndex, Vec3> SimTK::Compound::AtomTargetLocations |
Type for set of target atom locations to be used for structure matching.
Compute atom location in local Compound frame.
SimTK::Compound::Compound | ( | ) |
default Compound constructor.
Create an empty compound object representing a simulatable molecular structure.
SimTK::Compound::Compound | ( | const Name & | name | ) | [explicit] |
Construct a Compound with a type name.
Create an empty compound object representing a simulatable molecular structure. The name is intended to represent the class of molecule being represented. e.g. "ethane", not "ethane number 3"
name | name of the compound type, not the compound instance |
SimTK::Compound::Compound | ( | CompoundRep * | ip | ) | [explicit, protected] |
SimTK::Compound::SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE | ( | Compound | , |
AtomIndex | |||
) |
Compound::Index type is an integer index into subcompounds of a Compound.
It is NOT instrinsic to the subcompound, but represents the relationship between a subcompound and precisely one of its parent compounds. Compound::AtomIndex type is an integer index into atoms of a Compound. It is NOT instrinsic to the atom, but represents the relationship between an atom and precisely one of its parent compounds.
SimTK::Compound::SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE | ( | Compound | , |
LocalAtomIndex | |||
) |
SimTK::Compound::SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE | ( | Compound | , |
BondCenterIndex | |||
) |
Compound::BondCenterIndex type is an integer index into BondCenters of a Compound.
It is NOT instrinsic to the BondCenter, but represents the relationship between a BondCenter and precisely one of its parent compounds.
SimTK::Compound::SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE | ( | Compound | , |
BondIndex | |||
) |
Compound::BondIndex type is an integer index into Bonds of a Compound.
It is NOT instrinsic to the Bond, but represents the relationship between a Bond and precisely one of its parent compounds.
int SimTK::Compound::getNumAtoms | ( | ) | const |
size_t SimTK::Compound::getNumBondCenters | ( | ) | const |
size_t SimTK::Compound::getNumBondCenters | ( | Compound::AtomIndex | atomIndex | ) | const |
size_t SimTK::Compound::getNumBonds | ( | ) | const |
bool SimTK::Compound::hasAtom | ( | const AtomPathName & | name | ) | const |
bool SimTK::Compound::hasBondCenter | ( | const BondCenterPathName & | bondCenter | ) | const |
Compound::AtomIndex SimTK::Compound::getBondAtomIndex | ( | Compound::BondIndex | bondIndex, |
int | which | ||
) | const |
bondIndex | integer index of a bond in this Compound |
which | zero(0) for parent-side (rootward) atom of bond, one(1) for child-side (leafward) atom |
Compound& SimTK::Compound::setBaseAtom | ( | const Compound::AtomName & | name, |
const Element & | element, | ||
const Transform & | location = Vec3(0) |
||
) |
Add the first atom unconnected to anything else (yet).
name | name of the new atom being created |
element | chemical element of the new atom being created |
location | default location of the new atom being created in orthogonal nanometers. Defaults to (0,0,0) |
Compound& SimTK::Compound::setBaseAtom | ( | const Compound::AtomName & | name, |
const Biotype & | biotype, | ||
const Transform & | location = Vec3(0) |
||
) |
Add the first atom unconnected to anything else (yet).
name | name of the new atom being created |
biotype | Biotype of the new atom being created |
location | default location of the new atom being created in orthogonal nanometers. Defaults to (0,0,0) |
Compound& SimTK::Compound::setBaseAtom | ( | const Compound::SingleAtom & | c, |
const Transform & | = Transform() |
||
) |
Add a first subcompound containing exactly one atom, so the Compound::AtomName can be reused for the Compound::Name.
This atom is not connected to anything else (yet).
Compound& SimTK::Compound::setBaseCompound | ( | const Compound::Name & | n, |
const Compound & | c, | ||
const Transform & | location = Transform() |
||
) |
Add a first subcompound without attaching it to anything.
n | name for new subcompound, from viewpoint of parent |
c | new subcompound to be copied and attached to parent Compound |
location | default location of the new atom being created in orthogonal nanometers. Defaults to (0,0,0) |
Compound& SimTK::Compound::bondAtom | ( | const Compound::SingleAtom & | c, |
const BondCenterPathName & | parentBondName, | ||
mdunits::Length | distance, | ||
Angle | dihedral = 0 , |
||
BondMobility::Mobility | = BondMobility::Default |
||
) |
Add a subcompound containing exactly one atom, so the Compound::AtomName can be reused for the Compound::Name.
This atom is connected to existing material.
c | the new subcompound to attach to this compound (a copy of the subcompound will be attached) |
parentBondName | name of the bond center on the parent Compound to which the new subcompound will be attached |
distance | default bond length in nanometers of new bond connecting new subcompound to parent Compound |
dihedral | default dihedral angle about new bond, with respect to the first bond center on each atom |
Compound& SimTK::Compound::bondAtom | ( | const Compound::SingleAtom & | c, |
const BondCenterPathName & | parentBondName | ||
) |
Bond atom using default bond length and dihedral angle.
Bond length and dihedral angle must have already been predefined in the parent *or* the child BondCenter, but not both
c | the new subcompound to attach to this compound (a copy of the subcompound will be attached) |
parentBondName | name of the bond center on the parent Compound to which the new subcompound will be attached |
Compound& SimTK::Compound::bondCompound | ( | const Compound::Name & | n, |
const Compound & | c, | ||
const BondCenterPathName & | parentBondName, | ||
mdunits::Length | distance, | ||
Angle | dihedral = 180 *Deg2Rad , |
||
BondMobility::Mobility | mobility = BondMobility::Default |
||
) |
Add a subcompound attached by its inboard bond to an existing bond center.
n | name for the new subcompound from the viewpoint of the parent Compound |
c | the new subcompound to attach to this compound (a copy of the subcompound will be attached) |
parentBondName | name of the bond center on the parent Compound to which the new subcompound will be attached |
distance | default bond length in nanometers of new bond connecting new subcompound to parent Compound |
dihedral | default dihedral angle about new bond, with respect to the first other bond center on each atom |
mobility | allowed motion in new bond |
Compound& SimTK::Compound::bondCompound | ( | const Compound::Name & | n, |
const Compound & | c, | ||
const BondCenterPathName & | parentBondName | ||
) |
Add a subcompound attached by its inboard bond to an existing bond center.
Shorter version uses default bond length and dihedral angle, which must have been predefined in the parent *or* the child BondCenter, but not both.
Compound& SimTK::Compound::bondCompound | ( | const Compound::Name & | n, |
const Compound & | c, | ||
const BondCenterPathName & | parentBondName, | ||
BondMobility::Mobility | mobility | ||
) |
Add a subcompound attached by its inboard bond to an existing bond center.
Shorter version uses default bond length and dihedral angle, which must have been predefined in the parent *or* the child BondCenter, but not both.
n | name for the new subcompound from the viewpoint of the parent Compound |
c | the new subcompound to attach to this compound (a copy of the subcompound will be attached) |
parentBondName | name of the bond center on the parent Compound to which the new subcompound will be attached |
mobility | type of motion permitted in the bond connecting parent to new subcompound |
Compound& SimTK::Compound::setInboardBondCenter | ( | const Compound::BondCenterName & | centerName | ) |
setInboardBondCenter assigns special status to a bond center.
There can be at most one inboard bond center in a Compound. Only an inboard bond center can be used to bond to a parent compound
centerName | name of existing BondCenter to use as inboard BondCenter |
Compound& SimTK::Compound::convertInboardBondCenterToOutboard | ( | ) |
Make so that this compound can no longer be a child to the geometry of another compound Raises an error if the inboard bond center is already bonded.
Compound& SimTK::Compound::addFirstBondCenter | ( | const Compound::BondCenterName & | centerName, |
const Compound::AtomPathName & | atomName | ||
) |
Compound& SimTK::Compound::addSecondBondCenter | ( | const Compound::BondCenterName & | centerName, |
const Compound::AtomName & | atomName, | ||
Angle | bondAngle1 | ||
) |
Place a second bond center on an atom, placed a particular angle away from the first bond center.
centerName | name for the new BondCenter, must be unique within the Compound |
atomName | name of the Atom to attach the bond center to |
bondAngle1 | default bond bend angle relating the first two bond centers of the atom |
Compound& SimTK::Compound::addPlanarBondCenter | ( | const Compound::BondCenterName & | centerName, |
const Compound::AtomName & | atomName, | ||
Angle | bondAngle1, | ||
Angle | bondAngle2 | ||
) |
Places a third or later bond center on an atom, in the same plane as the first two bond centers.
The angle represents the angular distance from the first bond center on the atom. The second angle is used to determine whether the new bond center is on the same side of the plane as the second bond center.
centerName | name for the new BondCenter, must be unique within the Compound |
atomName | name of the Atom to attach the bond center to |
bondAngle1 | default bond bend angle relating the first bond center to the new bond center |
bondAngle2 | APPROXIMATE default bond bend angle relating the second bond center to the new bond center |
Compound& SimTK::Compound::addRightHandedBondCenter | ( | const Compound::BondCenterName & | centerName, |
const Compound::AtomName & | atomName, | ||
Angle | bondAngle1, | ||
Angle | bondAngle2 | ||
) |
Place a third or later bond center on an atom, defined by two angular displacements from the first and second bond centers, respectively.
Placed the new bond center such that the directions of the first, second, and new bond centers form a right-handed geometry.
centerName | name for the new BondCenter, must be unique within the Compound |
atomName | name of the Atom to attach the bond center to |
bondAngle1 | default bond bend angle relating the first bond center to the new bond center |
bondAngle2 | default bond bend angle relating the second bond center to the new bond center |
Compound& SimTK::Compound::addLeftHandedBondCenter | ( | const Compound::BondCenterName & | centerName, |
const Compound::AtomName & | atomName, | ||
Angle | bondAngle1, | ||
Angle | bondAngle2 | ||
) |
Place a third or later bond center on an atom, defined by two angular displacements from the first and second bond centers, respectively.
Placed the new bond center such that the directions of the first, second, and new bond centers form a left-handed geometry.
centerName | name for the new BondCenter, must be unique within the Compound |
atomName | name of the Atom to attach the bond center to |
bondAngle1 | default bond bend angle relating the first bond center to the new bond center |
bondAngle2 | default bond bend angle relating the second bond center to the new bond center |
Compound& SimTK::Compound::addRingClosingBond | ( | const Compound::BondCenterPathName & | centerName1, |
const Compound::BondCenterPathName & | centerName2, | ||
mdunits::Length | bondLength, | ||
Angle | dihedral = 180 *Deg2Rad , |
||
BondMobility::Mobility | mobility = BondMobility::Default |
||
) |
Adds a covalent bond that is not part of the main tree-topology of bonds in a Compound.
Such bonds are necessary when there are ring structures. These bonds will not correspond to MobilizedBodies when the molecule is realized as a simbody multibody model, and thus the bond lengths, bond angles, dihedral angles, and mobility for a ring closing bond might not be enforced in the simulation.
centerName1 | name of the first existing bond center in the new bond |
centerName2 | name of the other existing bond center in the new bond |
bondLength | default bond length in nanometers of the new bond (might have no effect) |
dihedral | default dihedral angle about new bond, with respect to the first other bond center on each atom |
mobility | type of motion permitted in the bond connecting parent to new subcompound |
Compound& SimTK::Compound::addRingClosingBond | ( | const Compound::BondCenterPathName & | centerName1, |
const Compound::BondCenterPathName & | centerName2 | ||
) |
Adds a covalent bond that is not part of the main tree-topology of bonds in a molecule.
Such bonds are necessary when there are ring structures. These bonds will not correspond to MobilizedBodies when the molecule is realized as a simbody multibody model, and thus the bond lengths, bond angles, and dihedral angles for a ring closing bond might not be enforced in the simulation.
centerName1 | name of the first existing bond center in the new bond |
centerName2 | name of the other existing bond center in the new bond |
const Compound& SimTK::Compound::getSubcompound | ( | const Compound::Name & | subcompoundName | ) | const |
Compound& SimTK::Compound::updSubcompound | ( | const Compound::Name & | subcompoundName | ) |
subcompoundName | name of subcompound |
Vec3 SimTK::Compound::calcDefaultAtomLocationInGroundFrame | ( | const AtomPathName & | atomName | ) | const |
Vec3 SimTK::Compound::calcDefaultAtomLocationInCompoundFrame | ( | const AtomPathName & | atomName | ) | const |
Compound& SimTK::Compound::setDefaultInboardBondLength | ( | mdunits::Length | ) |
Sets default (initial) bond length of current or future Bond using this Compound's inboard BondCenter.
Default inboard bond length and dihedral should only be set when the future bonding partners of this compound are restricted to a particular atom type
Compound& SimTK::Compound::setDefaultInboardDihedralAngle | ( | Angle | ) |
Stores a default (initial) dihedral angle in the inboard BondCenter of this Compound.
If exactly one of the two BondCenters that are joined to form a Bond has default geometry set, then the bondCompound() lacking explicit geometry arguments may be used to create the Bond.
Compound& SimTK::Compound::setDefaultBondAngle | ( | Angle | angle, |
const AtomPathName & | atom1, | ||
const AtomPathName & | atom2, | ||
const AtomPathName & | atom3 | ||
) |
Sets a default(initial) bond angle defined by three atoms.
angle | new default bond angle in radians |
atom1 | name of first atom defining bond angle |
atom2 | name of middle atom defining bond angle |
atom3 | name of third atom defining bond angle |
Compound& SimTK::Compound::setDefaultBondLength | ( | mdunits::Length | length, |
const AtomPathName & | atom1, | ||
const AtomPathName & | atom2 | ||
) |
Sets a default (inital) bond length defined by two atoms.
length | default bond length in nanometers |
atom1 | name of first atom in bond |
atom2 | name of second atom in bond |
Compound& SimTK::Compound::setDefaultDihedralAngle | ( | const DihedralName & | dihedralName, |
Angle | angleInRadians | ||
) |
Sets a default (initial) dihedral angle of a previously named dihedral.
dihedralName | name of predefined dihedral angle with respect to this Compound |
angleInRadians | new dihedral angle in radians |
Compound& SimTK::Compound::setDefaultDihedralAngle | ( | Angle | angle, |
Compound::AtomIndex | atom1, | ||
Compound::AtomIndex | atom2, | ||
Compound::AtomIndex | atom3, | ||
Compound::AtomIndex | atom4 | ||
) |
Compute atom location in local Compound frame.
Compound& SimTK::Compound::setDefaultDihedralAngle | ( | Angle | angle, |
const Compound::AtomName & | atom1, | ||
const Compound::AtomName & | atom2, | ||
const Compound::AtomName & | atom3, | ||
const Compound::AtomName & | atom4 | ||
) |
Compute atom location in local Compound frame.
Angle SimTK::Compound::calcDefaultDihedralAngle | ( | const DihedralName & | dihedralName | ) | const |
Computes default (initial) dihedral angle of a previously named dihedral.
dihedralName | name of predefined dihedral angle with respect to this Compound |
Compound& SimTK::Compound::setDihedralAngle | ( | State & | state, |
const DihedralName & | dihedralName, | ||
Angle | |||
) |
Sets dynamic dihedral angle of a previously named dihedral.
The dihedral angle must be an adjustable parameter of the dynamic model.
Angle SimTK::Compound::calcDihedralAngle | ( | const State & | state, |
const DihedralName & | dihedralName | ||
) | const |
Computes dynamic dihedral angle of a previously named dihedral.
Transform SimTK::Compound::calcDefaultAtomFrameInCompoundFrame | ( | Compound::AtomIndex | ) | const |
Transform SimTK::Compound::getSubcompoundFrameInParentFrame | ( | const Compound::Name & | subcompoundName | ) | const |
virtual AtomTargetLocations SimTK::Compound::createAtomTargets | ( | const class PdbStructure & | targetStructure | ) | const [virtual] |
Create a mapping between this Compound and atom locations in a PdbStructure.
For use in the process of importing a configuration from a PDB file
Reimplemented in SimTK::Biopolymer.
virtual AtomTargetLocations SimTK::Compound::createAtomTargets | ( | const class PdbChain & | targetChain | ) | const [virtual] |
Compute atom location in local Compound frame.
Reimplemented in SimTK::Biopolymer.
virtual AtomTargetLocations SimTK::Compound::createAtomTargets | ( | const class PdbResidue & | targetResidue | ) | const [virtual] |
Compute atom location in local Compound frame.
Compound& SimTK::Compound::matchDefaultAtomChirality | ( | const AtomTargetLocations & | atomTargets, |
Angle | planarityTolerance = 90.0 *Deg2Rad , |
||
bool | flipAll = true |
||
) |
Adjust stereochemistry about chiral atoms to match that seen in a set of atomic locations.
Choose a small value of planarityTolerance parameter to break the planarity of out-of-plane atoms from the target set
atomTargets | another set of atom locations to match chirality of |
planarityTolerance | break planarity of BondCenters more than this angle out of plane (radians) |
flipAll | whether to invert each mismatched BondCenter, or all at once |
Compound& SimTK::Compound::matchDefaultBondLengths | ( | const AtomTargetLocations & | atomTargets | ) |
Compute atom location in local Compound frame.
Compound& SimTK::Compound::matchDefaultBondAngles | ( | const AtomTargetLocations & | atomTargets | ) |
Compute atom location in local Compound frame.
Compound& SimTK::Compound::matchDefaultDihedralAngles | ( | const AtomTargetLocations & | atomTargets, |
PlanarBondMatchingPolicy | policy = FlipPlanarBonds |
||
) |
Compute atom location in local Compound frame.
atomTargets | set of atom locations to match dihedrals of |
policy | whether to keep ideal torsions on bonds between planar atoms |
Compound& SimTK::Compound::matchDefaultTopLevelTransform | ( | const AtomTargetLocations & | atomTargets | ) |
Compute atom location in local Compound frame.
TransformAndResidual SimTK::Compound::getTransformAndResidual | ( | const Compound::AtomTargetLocations & | atomTargets | ) | const |
Compute atom location in local Compound frame.
Compound& SimTK::Compound::matchDefaultConfiguration | ( | const AtomTargetLocations & | atomTargets, |
MatchStratagem | matchStratagem = Match_Exact |
||
) | [inline] |
Adjust internal coordinates to match a collection of atom targets.
Compound& SimTK::Compound::fitDefaultConfiguration | ( | const AtomTargetLocations & | atomTargets, |
SimTK::Real | targetRms | ||
) |
Optimize adjustable degrees of freedom to best match atom targets.
std::ostream& SimTK::Compound::writeDefaultPdb | ( | std::ostream & | os, |
const Transform & | transform = Transform() |
||
) | const |
Write the default (initial) configuration in Protein Data Bank (PDB) format.
Starting with the first atom's serial number as one(1).
os | output stream to write PDB coordinates to |
transform | optional change to location and orientation of molecule |
void SimTK::Compound::writeDefaultPdb | ( | const char * | outFileName, |
const Transform & | transform | ||
) | const |
/brief This polymorphism takes a char* file name rather than ostream, to save the user a couple of lines of code.
std::ostream& SimTK::Compound::writeDefaultPdb | ( | std::ostream & | os, |
int & | nextAtomSerialNumber, | ||
const Transform & | transform = Transform() |
||
) | const |
Write the default (initial) configuration in Protein Data Bank (PDB) format.
integer nextAtomSerialNumber reference is incremented within writeDefaultPdb method, so that subsequent calls to this method using the same integer variable will continue numbering atoms where the previous call left off.
os | output stream to write PDB coordinates to |
nextAtomSerialNumber | mutable integer reference containing the next desired atom serial number |
transform | optional change to location and orientation of molecule |
std::ostream& SimTK::Compound::writePdb | ( | const State & | state, |
std::ostream & | os, | ||
const Transform & | transform = Transform() |
||
) | const |
Write the dynamic Compound configuration in Protein Data Bank (PDB) format.
Starting with the first atom's serial number as one(1).
state | simbody state representing the current configuration of the molecule |
os | output stream to write PDB coordinates to |
transform | optional change to location and orientation of molecule |
std::ostream& SimTK::Compound::writePdb | ( | const State & | state, |
std::ostream & | os, | ||
int & | nextAtomSerialNumber, | ||
const Transform & | transform = Transform() |
||
) | const |
Write the dynamic Compound configuration in Protein Data Bank (PDB) format.
integer nextAtomSerialNumber reference is incremented within writePdb method, so that subsequent calls to this method using the same integer variable will continue numbering atoms where the previous call left off.
state | simbody state representing the current configuration of the molecule |
os | output stream to write PDB coordinates to |
nextAtomSerialNumber | mutable integer reference containing the next desired atom serial number |
transform | optional change to location and orientation of molecule |
Name a type of Compound.
Sets the name for this class of compound, e.g. "ethane", not "ethane number 3". The compound name can be important for automatic resolution of atom types for during force field resolution.
Add an additional name for this class of compound.
Adding synonyms can be useful for automatically resolving biotypes, if the compound name in the force field parameter file differs from that used to define the compound. See also setCompoundName()
const AtomPathName SimTK::Compound::getAtomName | ( | Compound::AtomIndex | ) | const |
Returns the most recently assigned name, if any, given to an atom in this compound.
const Element& SimTK::Compound::getAtomElement | ( | Compound::AtomIndex | ) | const |
const Element& SimTK::Compound::getAtomElement | ( | const Compound::AtomName & | ) | const |
Name a type of Compound.
Sets the name for this class of compound, e.g. "ethane", not "ethane number 3". The compound name can be important for automatic resolution of atom types for during force field resolution.
Compound& SimTK::Compound::nameAtom | ( | const Compound::AtomName & | newName, |
const AtomPathName & | oldName | ||
) |
newName | new name for this atom; name is local to this Compound |
oldName | previous name; can be a subcompound-qualified Atom name |
Compound& SimTK::Compound::nameAtom | ( | const Compound::AtomName & | newName, |
const AtomPathName & | oldName, | ||
BiotypeIndex | biotype | ||
) |
Compound& SimTK::Compound::defineDihedralAngle | ( | const Compound::DihedralName & | angleName, |
const Compound::AtomPathName & | atom1, | ||
const Compound::AtomPathName & | atom2, | ||
const Compound::AtomPathName & | atom3, | ||
const Compound::AtomPathName & | atom4, | ||
Angle | offset = 0 *Deg2Rad |
||
) |
Define a named dihedral angle using four atoms.
The offset parameter is used in cases where the dihedral angle definition differs from the IUPAC definition of dihedral angles using four atoms. For example the definition of protein phi and psi angles is 180 degrees offset from the standard four-atom dihedral angle definition.
angleName | unique name for new dihedral angle definition |
atom1 | first atom name |
atom2 | second atom name |
atom3 | third atom name |
atom4 | fourth atom name |
offset | nomenclature offset |
Compound& SimTK::Compound::defineDihedralAngle | ( | const Compound::DihedralName & | angleName, |
const Compound::BondCenterPathName & | bond1, | ||
const Compound::BondCenterPathName & | bond2, | ||
Angle | offset = 0 *Deg2Rad |
||
) |
Define a named dihedral in terms of two bond centers.
Useful in cases where not all four atoms have been placed yet. The bond centers must be from two atoms that are bonded (atoms 2 and 3 of 4) But are NOT the bond centers that connect the two middle atoms.
The offset parameter is used in cases where the dihedral angle definition differs from the IUPAC definition of dihedral angles using four atoms. For example the definition of protein phi and psi angles is 180 degrees offset from the standard four-atom dihedral angle definition.
angleName | unique name for new dihedral angle definition |
bond1 | first bond center, connecting atom 2 to atom 1 |
bond2 | second bond center, connecting atom 3 to atom 4 |
offset | nomenclature offset |
Compound& SimTK::Compound::setPdbResidueNumber | ( | int | resNum | ) |
Set value to populate "residue number" field for PDB file output.
int SimTK::Compound::getPdbResidueNumber | ( | ) | const |
Set string to populate "residue type" field for PDB file output.
const String& SimTK::Compound::getPdbResidueName | ( | ) | const |
Compound& SimTK::Compound::setPdbChainId | ( | char | chainId | ) |
char SimTK::Compound::getPdbChainId | ( | ) | const |
Compound& SimTK::Compound::nameBondCenter | ( | const Compound::BondCenterName & | newName, |
const BondCenterPathName & | oldName | ||
) |
Define a local name for a particular BondCenter in this Compound.
newName | new local name for bond center |
oldName | previous name, can be a subcompound-qualified name |
Compound& SimTK::Compound::inheritAtomNames | ( | const Compound::Name & | ) |
Convenience method to locally import all of the atom names that a particular subcompound uses.
Name a type of Compound.
Sets the name for this class of compound, e.g. "ethane", not "ethane number 3". The compound name can be important for automatic resolution of atom types for during force field resolution.
Compound& SimTK::Compound::inheritBondCenterNames | ( | const Compound::Name & | ) |
Convenience method to locally import all of the BondCenter names that a particular subcompound uses.
Compound::AtomIndex SimTK::Compound::getAtomIndex | ( | const Compound::AtomPathName & | ) | const |
void SimTK::Compound::setMultibodySystem | ( | MultibodySystem & | system | ) |
Add this Compound, including all of its subcompounds, to a CompoundSystem, for simulation etc.
This Compound will become a top-level object with the CompoundSystem.
Compound& SimTK::Compound::setBondMobility | ( | BondMobility::Mobility | mobility, |
const AtomPathName & | atom1, | ||
const AtomPathName & | atom2 | ||
) |
Override the default rotatability of a bond.
mobility | the new allowed motion of the bond |
atom1 | the name of the first atom defining the Bond |
atom2 | the name of the second atom defining the Bond |
Compound& SimTK::Compound::setBondMobility | ( | BondMobility::Mobility | mobility, |
Compound::BondIndex | bondIndex | ||
) |
Override the default rotatability of a bond.
mobility | the new allowed motion of the bond |
bondIndex | the integer index of the Bond in the context of this Compound |
Compound& SimTK::Compound::setCompoundBondMobility | ( | BondMobility::Mobility | mobility | ) |
Set BondMobility for every bond in the Compound.
MobilizedBodyIndex SimTK::Compound::getAtomMobilizedBodyIndex | ( | Compound::AtomIndex | ) | const |
get the simbody MobilizedBody to which a particular atom is attached
Requires that this Compound has already been modeled in a CompoundSystem
Vec3 SimTK::Compound::getAtomLocationInMobilizedBodyFrame | ( | Compound::AtomIndex | ) | const |
get the location of an Atom in the frame of the simbody MobilizedBody to which the Atom is attached
Requires that this Compound has already been modeled in a CompoundSystem
Compound& SimTK::Compound::setBiotypeIndex | ( | const Compound::AtomPathName & | atomName, |
BiotypeIndex | biotype | ||
) |
Compound& SimTK::Compound::setAtomBiotype | ( | const Compound::AtomPathName & | atomName, |
const String & | biotypeResidueName, | ||
const String & | biotypeAtomName, | ||
SimTK::Ordinality::Residue | ordinality = SimTK::Ordinality::Any |
||
) | [inline] |
Add this Compound, including all of its subcompounds, to a CompoundSystem, for simulation etc.
This Compound will become a top-level object with the CompoundSystem.
BiotypeIndex SimTK::Compound::getAtomBiotypeIndex | ( | Compound::AtomIndex | ) | const |
DuMM::AtomIndex SimTK::Compound::getDuMMAtomIndex | ( | Compound::AtomIndex | ) | const |
get DuMMForceFieldSubsystem atom index corresponding to an atom in this Compound
Requires that this Compound has already been modeled in a CompoundSystem
Set the orientation and location of this Compound.
const Transform& SimTK::Compound::getTopLevelTransform | ( | ) | const |
void SimTK::Compound::setDuMMAtomIndex | ( | Compound::AtomIndex | , |
DuMM::AtomIndex | |||
) | [protected] |
Stores relationship between a Compound Atom and an Atom defined in a DuMMForcefieldSubsystem.
friend class CompoundSystem [friend] |