STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::restraints::ChemicalFeatures Class Reference

An object to store information about chemical motifs: participation in rings, planarity, chirality, aromaticity, conjugation, planarity, and bonds with different rotatability. More...

#include <chemical_features.h>

Public Member Functions

int getAtomCount () const
 Get the total number of atoms.
 
int getPlanarAtomCount () const
 Get the number of planar atoms.
 
int getRingCount () const
 Get the number of rings in the system.
 
int getFusedRingCount () const
 Get the number of fused rings in the system.
 
int getMutableRingCount () const
 Get the number of malleable, non-aromatic twistable rings in the system.
 
int getAromaticGroupCount () const
 Get the number of aromatic groups in the system.
 
int getPolarHydrogenCount () const
 Get the number of polar hydrogens in the system.
 
int getHydrogenBondDonorCount () const
 Get the number of hydrogen bond donors in the system.
 
int getHydrogenBondAcceptorCount () const
 Get the number of hydrogen bond acceptors in the system.
 
int getChiralCenterCount () const
 Get the number of chiral centers in the system.
 
int getRotatableBondCount () const
 Get the number of rotatable bonds in the system.
 
int getCisTransBondCount () const
 Get the number of bonds involved in cis-trans isomerization.
 
bool rotatableGroupsMapped () const
 Indicate whether the rotatable groups (including rotatable bonds as well as cis-trans bonds) have been computed.
 
bool chiralitiesComputed () const
 Indicate whether chiralities have been determined for this set of chemical features.
 
std::vector< uint > getRingMask (int min_ring_size, int max_ring_size) const
 Return a mask of rings within a given size range for this system.
 
std::vector< uint > getAromaticMask (int min_pi_electrons, int max_pi_electrons) const
 Return a mask of atomatic atoms in the system.
 
std::vector< int > getPolarHydrogenList () const
 Get a list of all polar hydrogen atoms.
 
std::vector< int > getHydrogenBondDonorList () const
 Get a list of all hydrogen bond donor atoms.
 
std::vector< int > getHydrogenBondAcceptorList () const
 Get a list of all hydrogen bond acceptor atoms.
 
std::vector< uint > getPolarHydrogenMask () const
 Get a bit mask of all polar hydrogen atoms in the system, acceptable for inputs to creating new atom masks.
 
std::vector< uint > getHydrogenBondDonorMask () const
 Get a bit mask of all hydrogen bond donors in the system, acceptable for inputs to creating new atom masks.
 
std::vector< uint > getHydrogenBondAcceptorMask () const
 Get a bit mask of all hydrogen bond acceptors in the system, acceptable for inputs to creating new atom masks.
 
std::vector< int > getChiralCenters (ChiralOrientation direction=ChiralOrientation::NONE) const
 List the chiral centers in a system, using topological indices.
 
std::vector< int4getChiralArmBaseAtoms () const
 Get the bases of each arm for all chiral centers. The result returns the lowest priority arm in the "x" member, the highest in the "y" member, and the second- and third-highest priority arms in the "z" and "w" members of each tuple, respectively.
 
std::vector< uint > getChiralityMask (ChiralOrientation direction) const
 Return a mask of chiral centers in the system.
 
std::vector< double > getFormalCharges () const
 Return a vector containing the formal charges on all particles in the system (this includes virtual sites, which will have formal charges of zero since they are not real atoms).
 
std::vector< double > getBondOrders () const
 Return a vector containing the orders of all bonds in the system (this includes bonds to virtual sites only if they are defined in the topology's connectivity, and such bonds will have order zero).
 
const std::vector< int > & getZeroKelvinFormalCharges () const
 Return the formal charges for a representative Lewis structure of the molecules in this topology.
 
const std::vector< int > & getZeroKelvinBondOrders () const
 Return the bond orders for a representative Lewis structure of the molecules in this topology.
 
const std::vector< int > & getZeroKelvinFreeElectrons () const
 Return the free electron content of atoms in a representative Lewis structure of the molecules in this topology.
 
std::vector< IsomerPlan > getCisTransIsomerizationGroups () const
 Get the moving atom groups and bond endpoints involved in cis-trans isomerization. This function clones the simple form of getRotatableBondGroups but the reliance on so many different arrays and counters makes it fruitless to abstract.
 
std::vector< IsomerPlan > getChiralInversionGroups () const
 Get the group of atoms that can invert a chiral center by a C2 symmetry rotation. This re-uses the IsomerPlan struct, this time casting the root and pivot atoms as the origins of the heaviest and second-heaviest branches, respectively, which will again not move even as the rest of the atoms rotate.
 
const AtomGraphgetTopologyPointer () const
 Get a pointer to the AtomGraph which built this object.
 
const ChemicalFeaturesgetSelfPointer () const
 Get a const pointer to the object itself in host memory.
 
ChemicalFeaturesReader data (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the abstract.
 
void findChiralOrientations (const CoordinateFrameReader &cfr)
 Find the chiral orientations of the system's chiral centers. This function will be called once by the constructor but can be called additional times if the coordinates of the system change. It will update the object's internal array of chiral centers, which combines orientational information with the centers' topological indices.
 
void findRotatableBondGroups (StopWatch *timer=nullptr)
 Find the rotatable (and cis-trans invertible, and chiral invertible) atom groups in the topology based on rotatable bonds or chiral centers found by the rest of the chemical perception calculations.
 
 ChemicalFeatures (const AtomGraph *ag_in=nullptr, MapRotatableGroups map_groups_in=MapRotatableGroups::NO, double temperature_in=300.0, StopWatch *timer_in=nullptr)
 The constructor requires a topology and some coordinate set.
 
 ChemicalFeatures (const AtomGraph &ag_in, MapRotatableGroups map_groups_in=MapRotatableGroups::NO, double temperature_in=300.0, StopWatch *timer_in=nullptr)
 
 ChemicalFeatures (const AtomGraph *ag_in, const CoordinateFrameReader &cfr, MapRotatableGroups map_groups_in=MapRotatableGroups::NO, double temperature_in=300.0, StopWatch *timer_in=nullptr)
 
 ChemicalFeatures (const AtomGraph *ag_in, const CoordinateFrame &cf, MapRotatableGroups map_groups_in=MapRotatableGroups::NO, double temperature_in=300.0, StopWatch *timer_in=nullptr)
 
 ChemicalFeatures (const AtomGraph *ag_in, const PhaseSpace &ps, MapRotatableGroups map_groups_in=MapRotatableGroups::NO, double temperature_in=300.0, StopWatch *timer_in=nullptr)
 
 ChemicalFeatures (const AtomGraph &ag_in, const CoordinateFrame &cf, MapRotatableGroups map_groups_in=MapRotatableGroups::NO, double temperature_in=300.0, StopWatch *timer_in=nullptr)
 
 ChemicalFeatures (const AtomGraph &ag_in, const PhaseSpace &ps, MapRotatableGroups map_groups_in=MapRotatableGroups::NO, double temperature_in=300.0, StopWatch *timer_in=nullptr)
 
 ChemicalFeatures (const ChemicalFeatures &original)
 Copy and move constructors.
 
 ChemicalFeatures (ChemicalFeatures &&original)
 
ChemicalFeaturesoperator= (const ChemicalFeatures &other)
 Copy assignment and move assignment operators.
 
ChemicalFeaturesoperator= (ChemicalFeatures &&other)
 
ChiralOrientation getAtomChirality (int atom_index) const
 Return the chiral orientations for one or more atoms in the system.
 
std::vector< ChiralOrientation > getAtomChirality (int low_index, int high_index) const
 
std::vector< ChiralOrientation > getAtomChirality () const
 
double getFreeElectrons (int atom_index) const
 Return the (resonance-averaged) free electron content for one or more atoms in the system.
 
std::vector< double > getFreeElectrons (int low_index, int high_index) const
 
std::vector< double > getFreeElectrons () const
 
ullint getRingInclusion (int atom_index) const
 Return the ring inclusion specifications for one or more atoms in the system.
 
std::vector< ullint > getRingInclusion (int low_index, int high_index) const
 
std::vector< ullint > getRingInclusion () const
 
bool bondIsInRing (int atom_i, int atom_j) const
 Return whether a bond in the system is in a ring group or not.
 
bool bondIsInRing (int bond_index) const
 
std::vector< IsomerPlan > getRotatableBondGroups () const
 Get the atom endpoints of a rotatable bond. The bond root atom is returned in the x member of the tuple, the pivot atom (the second atom, closest to atoms that will turn) is listed in the y member.
 
std::vector< IsomerPlan > getRotatableBondGroups (int cutoff, int mol_index=0) const
 
std::vector< ChiralInversionProtocol > getChiralInversionMethods () const
 Get the means for inverting one or more chiral centers.
 
ChiralInversionProtocol getChiralInversionMethods (int index) const
 

Detailed Description

An object to store information about chemical motifs: participation in rings, planarity, chirality, aromaticity, conjugation, planarity, and bonds with different rotatability.

Constructor & Destructor Documentation

◆ ChemicalFeatures() [1/2]

stormm::chemistry::ChemicalFeatures::ChemicalFeatures ( const AtomGraph * ag_in = nullptr,
MapRotatableGroups map_groups_in = MapRotatableGroups::NO,
double temperature_in = 300.0,
StopWatch * timer_in = nullptr )

The constructor requires a topology and some coordinate set.

Overloaded:

  • Create a blank object
  • Create a with a topology only (provided by const pointer or by const reference)
  • Create with a topology and one of the basic (single-system) coordinate objects
Parameters
ag_inPointer to the system topology. This topology will not be modified by submitting it to this constructor, but it is needed as a constant pointer so that the object itself can store a valid pointer to the original topology (passing by const reference would not create a valid pointer).
cfrCoordinates of the system
psCoordinates of the system (a CoordinateFrameReader will be extracted)
map_groups_inIndicator of whether to map rotatable groups (this is an O(N^2) algorithm in memory as well as computation, as larger structures will have more rotatable bonds and the entirety of the structure must be traced in relation to each of them)
temperature_inTemperature at which to take Boltzmann weights of different resonance states

◆ ChemicalFeatures() [2/2]

stormm::chemistry::ChemicalFeatures::ChemicalFeatures ( const ChemicalFeatures & original)

Copy and move constructors.

Parameters
originalThe ChemicalFeatures object to copy

Member Function Documentation

◆ bondIsInRing()

bool stormm::chemistry::ChemicalFeatures::bondIsInRing ( int atom_i,
int atom_j ) const

Return whether a bond in the system is in a ring group or not.

Overloaded:

  • Provide the two atoms at either endpoint of the bond (checked for existence of an actual bond)
  • Provide the topological index of the bond (faster method if a means of interpreting the context of each bond is prepared)
Parameters
atom_iTopological index of the first atom in the bond
atom_jTopological index of the second atom in the bond
bond_indexTopological index of the bond of interest

◆ data()

ChemicalFeaturesReader stormm::chemistry::ChemicalFeatures::data ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the abstract.

Parameters
tierExtract pointers to data on either the CPU host or GPU device

◆ findChiralOrientations()

void stormm::chemistry::ChemicalFeatures::findChiralOrientations ( const CoordinateFrameReader & cfr)

Find the chiral orientations of the system's chiral centers. This function will be called once by the constructor but can be called additional times if the coordinates of the system change. It will update the object's internal array of chiral centers, which combines orientational information with the centers' topological indices.

Parameters
cfrPresent coordinates of the system

◆ findRotatableBondGroups()

void stormm::chemistry::ChemicalFeatures::findRotatableBondGroups ( StopWatch * timer = nullptr)

Find the rotatable (and cis-trans invertible, and chiral invertible) atom groups in the topology based on rotatable bonds or chiral centers found by the rest of the chemical perception calculations.

Parameters
timerTimekeeping object for performance profiling

◆ getAromaticMask()

std::vector< uint > stormm::chemistry::ChemicalFeatures::getAromaticMask ( int min_pi_electrons,
int max_pi_electrons ) const

Return a mask of atomatic atoms in the system.

Parameters
min_pi_electronsMinimum number of electrons in the aromatic ring system to report
max_pi_electronsMaximum number of electrons in the aromatic ring system to report

◆ getAtomChirality()

ChiralOrientation stormm::chemistry::ChemicalFeatures::getAtomChirality ( int atom_index) const

Return the chiral orientations for one or more atoms in the system.

Overloaded:

  • Get the chiral orientation for a specific atom
  • Get the chiral orientations for a range of atoms
  • Get the chiral orientations for all atoms
Parameters
atom_indexThe one atom of interest, based on the topological ordering
low_indexThe start of a series of atoms for which to get ring inclusions
high_indexThe upper limit of a series of atoms for which to get ring inclusions

◆ getChiralCenters()

std::vector< int > stormm::chemistry::ChemicalFeatures::getChiralCenters ( ChiralOrientation direction = ChiralOrientation::NONE) const

List the chiral centers in a system, using topological indices.

Parameters
directionPreferred chiral orientation of the centers to return (D-, L-, or both)

◆ getChiralInversionMethods()

std::vector< ChiralInversionProtocol > stormm::chemistry::ChemicalFeatures::getChiralInversionMethods ( ) const

Get the means for inverting one or more chiral centers.

Overloaded:

  • Get all chiral inversion instructions
  • Get the instruction for a specific center, numbered according to the list of all chiral centers in the molecule.
Parameters
indexThe index of the chiral center of interest

◆ getChiralityMask()

std::vector< uint > stormm::chemistry::ChemicalFeatures::getChiralityMask ( ChiralOrientation direction) const

Return a mask of chiral centers in the system.

Parameters
directionAllows one to select R- (D-), S- (L-), or both chiralities for the mask

◆ getFreeElectrons()

double stormm::chemistry::ChemicalFeatures::getFreeElectrons ( int atom_index) const

Return the (resonance-averaged) free electron content for one or more atoms in the system.

Overloaded:

  • Get the free electron content for a specific atom
  • Get the free electron content for a range of atoms
  • Get the free electron content for all atoms
Parameters
atom_indexThe one atom of interest
low_indexThe start of a series of atoms for which to get ring inclusions
high_indexThe upper limit of a series of atoms for which to get ring inclusions

◆ getRingInclusion()

ullint stormm::chemistry::ChemicalFeatures::getRingInclusion ( int atom_index) const

Return the ring inclusion specifications for one or more atoms in the system.

Overloaded:

  • Get the ring inclusion for a specific atom
  • Get the ring inclusion for a range of atoms
  • Get the ring inclusion for all atoms
Parameters
atom_indexThe one atom of interest
low_indexThe start of a series of atoms for which to get ring inclusions
high_indexThe upper limit of a series of atoms for which to get ring inclusions

◆ getRingMask()

std::vector< uint > stormm::chemistry::ChemicalFeatures::getRingMask ( int min_ring_size,
int max_ring_size ) const

Return a mask of rings within a given size range for this system.

Parameters
min_ring_sizeThe minimum number of atoms in the rings that will be reported
max_ring_sizeThe maximum number of atoms in the rings that will be reported

◆ getRotatableBondGroups()

std::vector< IsomerPlan > stormm::chemistry::ChemicalFeatures::getRotatableBondGroups ( ) const

Get the atom endpoints of a rotatable bond. The bond root atom is returned in the x member of the tuple, the pivot atom (the second atom, closest to atoms that will turn) is listed in the y member.

Overloaded:

  • Get all rotatable bonds without re-ordering the list.
  • Get a list of all rotatable bonds upon which a minimum number of atoms turn.
  • Get a list of rotatable bonds for which the pivot is within a specific cutoff of the current conformation's center of mass.
  • Get a list of rotatable bonds for which the pivot is within a specific cutoff of the center of mass of some atom mask (the mask must be supplied as a raw bitmask of the entire system, a std::vector of unsigned ints, to prevent making a circular dependency whereby the AtomMask object depends on ChemicalFeatures and vice-versa).
  • Get a list of the N largest rotatable groups of atoms.
Parameters
cutoffThe threshold at which to accept rotatable bond groups. The meaning depends on the value of the choice enumeration (see below). If the choice is COM_PROXIMITY, then cutoff is a distance with units of Angstroms. If the choice is GROUP_SIZE, then cutoff is a minimium number of rotating atoms.
mol_indexThe molecule of interest (the system may have multiple molecules).

◆ operator=()

ChemicalFeatures & stormm::chemistry::ChemicalFeatures::operator= ( const ChemicalFeatures & other)

Copy assignment and move assignment operators.

Parameters
otherThe ChemicalFeatures object to copy (a different name for a better semantic fit in the context of the = sign)

The documentation for this class was generated from the following files: