STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::chemistry::BondedNode Class Reference

A struct to serve as a tracker of progress through a molecule in the search for loops. Proceeding forward in the search, every link will have come from one and only one previous link, but could go in multiple directions thereafter. More...

#include <chemical_features.h>

Public Member Functions

 BondedNode ()
 Basic constructor simply initializes the members to blank values.
 
void setBranchPointer (std::vector< int > *vi, size_t pos, size_t max_branches)
 Take a pre-existing std::vector<int> in order to set the object's own next_links pointer. This is in the interest of not repeatedly allocating and freeing many tiny std::vector<int> objects as BondedNodes are created and destroyed to grow a chain of atoms.
 
void addToTree (int previous_in, int current_atom, int current_layer, const NonbondedKit< double > &nbk, const std::vector< bool > &valid_atom_mask)
 Set this as the next link in the chain, or as the chain initiator.
 
void addToTree (int previous_in, int current_atom, int current_layer, int previous_node_in, const NonbondedKit< double > &nbk, const std::vector< bool > &valid_atom_mask)
 
void addBondOrder (const ValenceKit< double > &vk, const Hybrid< double > &bond_orders)
 Add the bond order between this atom and its previous atom.
 
int getPreviousAtom () const
 Get the previous atom index.
 
int getPreviousNode () const
 Get the previous node's list index.
 
int getAtom () const
 Get the central atom for this BondedNode.
 
int getLayer () const
 Get the layer of which this BondedNode is a part.
 
int getBranchCount () const
 Get the number of branches associated with this BondedNode's central atom (this is the total number of other atoms that it bonds to, less the previous atom in the chain)
 
int getBranchAtom (int index) const
 Get the topological atom index of a specific branch that can come off of this BondedNode.
 
int findBranchAtom (int search_index) const
 Get the branch index of a specific atom in a BondedNode.
 
uint getRingCompletion (int branch_index) const
 Get the ring completion status for a particular node.
 
double getRootBondOrder () const
 Get the bond order of the bond between this atom and the previous atom in the tree.
 
void setRingCompletion (int partner_index)
 Set the ring completion for this object (this relies on no atom having more bonds than the number of bits in an unsigned int)
 
void wipeRingCompletion ()
 Wipe clean the ring completion for this object.
 

Detailed Description

A struct to serve as a tracker of progress through a molecule in the search for loops. Proceeding forward in the search, every link will have come from one and only one previous link, but could go in multiple directions thereafter.

Member Function Documentation

◆ addBondOrder()

void stormm::chemistry::BondedNode::addBondOrder ( const ValenceKit< double > & vk,
const Hybrid< double > & bond_orders )

Add the bond order between this atom and its previous atom.

Parameters
vkValence interactions abstract from the original topology
bond_ordersOrders of bonds determined by Lewis structure drawing

◆ addToTree()

void stormm::chemistry::BondedNode::addToTree ( int previous_in,
int current_atom,
int current_layer,
const NonbondedKit< double > & nbk,
const std::vector< bool > & valid_atom_mask )

Set this as the next link in the chain, or as the chain initiator.

Overloaded:

  • Optionally accept the index of the previous node for traceback purposes.
Parameters
previous_inIndex of the previous BondedNode leading to this one, or -1 if this is intended to be the chain initiator
current_atomTopological index of the current atom this BondedNode describes
current_layerThe current layer in the growing tree
nbkNonbonded interactions abstract for the overarching topology (needed for list of 1:2 exclusions, which indicate bonds)
valid_atom_maskReference table of which atoms are valid to include in the tree

◆ findBranchAtom()

int stormm::chemistry::BondedNode::findBranchAtom ( int search_index) const

Get the branch index of a specific atom in a BondedNode.

Parameters
search_indexThe topological atom index to search for within the node's branches

◆ getBranchAtom()

int stormm::chemistry::BondedNode::getBranchAtom ( int index) const

Get the topological atom index of a specific branch that can come off of this BondedNode.

Parameters
indexThe branch index of interest (could be any topological atom)

◆ getRingCompletion()

uint stormm::chemistry::BondedNode::getRingCompletion ( int branch_index) const

Get the ring completion status for a particular node.

Parameters
branch_indexThe branch index of the partner atom with which this node forms a ring (this index is not a topological index, and must be ascertained in advance by findBranchAtom() above)

◆ setBranchPointer()

void stormm::chemistry::BondedNode::setBranchPointer ( std::vector< int > * vi,
size_t pos,
size_t max_branches )

Take a pre-existing std::vector<int> in order to set the object's own next_links pointer. This is in the interest of not repeatedly allocating and freeing many tiny std::vector<int> objects as BondedNodes are created and destroyed to grow a chain of atoms.

Parameters
viVector of integers in which this BondedNode will store some of its data
posIndicator of the space in the storage vector allocate to this object
max_branchesThe maximum number of branches that this chain link shall support

◆ setRingCompletion()

void stormm::chemistry::BondedNode::setRingCompletion ( int partner_index)

Set the ring completion for this object (this relies on no atom having more bonds than the number of bits in an unsigned int)

Parameters
partner_indexTopological index of the atom to which a ring has been formed

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