| 
    PAPRECA hybrid off-lattice kMC/MD simulator
    2.0.0 (17 September 2024)
    
   | 
 
Custom bond class (not to be confused with a LAMMPS bond). More...
#include <bond.h>
Public Member Functions | |
| Bond () | |
| Bond (const LAMMPS_NS::tagint &bond_atom_in, const int &bond_type_in, const bool &head_parent_atom_in) | |
| ~Bond () | |
| const LAMMPS_NS::tagint & | getBondAtom () const | 
| const int & | getBondType () const | 
| bool | parentAtomIsHead () const | 
| For each bond in the system a tail and a head atom are (randomly) defined. This prevents the discovery of identical (i.e., defined twice) PAPRECA::BondBreak events.  More... | |
| void | assignBondAtom (const LAMMPS_NS::tagint &bond_atom_in) | 
| void | assignBondType (const int &bond_type_in) | 
Static Public Member Functions | |
| static const bool | atomIDIsMapped (LAMMPS_NS::tagint &parent_atomID, ATOM2BONDS_MAP &atomID2bonds) | 
| static void | addBond2BondVector (int &bond_type, LAMMPS_NS::tagint &parent_atomID, LAMMPS_NS::tagint &bond_atomID, const bool &head_atom_parent, ATOM2BONDS_MAP &atomID2bonds) | 
| static void | fillAtomID2BondsContainer (ATOM2BONDS_MAP &atomID2bonds, LAMMPS_NS::tagint *bonds_list, const LAMMPS_NS::bigint &bonds_num) | 
| static void | initAtomID2BondsMap (LAMMPS_NS::LAMMPS *lmp, const int &proc_id, ATOM2BONDS_MAP &atomID2bonds) | 
| static bool | atomHasBonds (const LAMMPS_NS::tagint &iatom_id, ATOM2BONDS_MAP &atomID2bonds) | 
| static void | recursiveCollectBondedAtoms (LAMMPS_NS::tagint &atom_id, std::vector< LAMMPS_NS::tagint > &delids_local, TAGINT_SET &delids_set, ATOM2BONDS_MAP &atomID2bonds) | 
Private Attributes | |
| LAMMPS_NS::tagint | bond_atom = -1 | 
| int | bond_type = -1 | 
| bool | head_parent_atom = false | 
Custom bond class (not to be confused with a LAMMPS bond).
Every atom in the system is associated with a vector of bond objects. The bonds vector of objects provides easy access to bonded atom IDs and bond types. PAPRECA::Bond objects enable bond formation, bond breaking, and custom diffusion events (e.g., the Fe_4PO4neib diffusion style deploys the bond vectors of the neighbors of the candidate Fe atom to determine whether or not there are 4 PO4 in the parent Fe neighborhood). The unordered_map PAPRECA::ATOM2BONDS_MAP can be used to retrieve the relevant vector of bond objects using a LAMMPS atom ID.
| PAPRECA::Bond::Bond | ( | ) | 
| PAPRECA::Bond::Bond | ( | const LAMMPS_NS::tagint & | bond_atom_in, | 
| const int & | bond_type_in, | ||
| const bool & | head_parent_atom_in | ||
| ) | 
| PAPRECA::Bond::~Bond | ( | ) | 
      
  | 
  static | 
Receives the bond type and atom IDs of a bond. Then, initializes a PAPRECA::Bond and inserts it in the relevant std::vector< PAPRECA::Bond > containers. The std::vector< PAPRECA::Bond > containers are stored in the atomID2bonds map.
| [in] | bond_type | type of bond. | 
| [in] | parent_atomID | ID of the first atom ID of the bond. | 
| [in] | bond_atomID | ID of the second atom ID of the bond. | 
| [in] | head_atom_parent | boolean dictating whether the parent_atomID is the head atom of the current bond | 
| [in,out] | atomID2bonds | PAPRECA::ATOM2BONDS_MAP container (i.e., std::unordered_map< LAMMPS_NS::tagint parent_atomID , std::vector< PAPRECA::Bond > >). The atomID2bonds container provides direct access to all the bonds of the parent atom. | 
| void PAPRECA::Bond::assignBondAtom | ( | const LAMMPS_NS::tagint & | bond_atom_in | ) | 
| void PAPRECA::Bond::assignBondType | ( | const int & | bond_type_in | ) | 
      
  | 
  static | 
      
  | 
  static | 
Checks if the parent_atomID is contained in the atomID2bonds map
| [in] | parent_atomID | ID of parent atom. | 
| [in] | atomID2bonds | PAPRECA::ATOM2BONDS_MAP container (i.e., std::unordered_map< LAMMPS_NS::tagint parent_atomID , std::vector< PAPRECA::Bond > >). The atomID2bonds container provides direct access to all the bonds of the parent atom. | 
      
  | 
  static | 
Fills atomID2bonds container with bonds gathered from LAMMPS and stored in the bonds_list array.
| [in,out] | atomID2bonds | PAPRECA::ATOM2BONDS_MAP container (i.e., std::unordered_map< LAMMPS_NS::tagint parent_atomID , std::vector< PAPRECA::Bond > >). The atomID2bonds container provides direct access to all the bonds of the parent atom. | 
| [in] | bonds_list | array containing the IDs of bonds. | 
| [in] | bonds_num | number of bonds in the bonds_list array. | 
| const LAMMPS_NS::tagint & PAPRECA::Bond::getBondAtom | ( | ) | const | 
| const int & PAPRECA::Bond::getBondType | ( | ) | const | 
      
  | 
  static | 
Initializes/fills atomID2bonds map. This is done by 1) gathering all bonds from the LAMMPS instance, 2) creating a std::vector< PAPRECA::Bond > container for each atomID, 3) filling the std::vector< PAPRECA::Bond > container with the IDs of bonded atoms.
| [in] | lmp | pointer to LAMMPS object. | 
| [in] | proc_id | ID of current MPI process. | 
| [in,out] | atomID2bonds | PAPRECA::ATOM2BONDS_MAP container (i.e., std::unordered_map< LAMMPS_NS::tagint parent_atomID , std::vector< PAPRECA::Bond > >). The atomID2bonds container provides direct access to all the bonds of the parent atom. | 
| bool PAPRECA::Bond::parentAtomIsHead | ( | ) | const | 
For each bond in the system a tail and a head atom are (randomly) defined. This prevents the discovery of identical (i.e., defined twice) PAPRECA::BondBreak events.
      
  | 
  static | 
Recursively collects all bonded atoms of an atom. The IDs of collected atoms are inserted in the std::vector< tagint > container (delids_local). The vector of PAPRECA::Bond objects is retrieved for the atom_id from the atomID2bonds map. The function uses an atom tagint to start adding bonded atoms and returns when all bonded atoms are recursively collected (uses an std::unordered_set to decide that).
| [in] | atom_id | ID of atom. | 
| [in,out] | delids_local | vector of collected atom IDs. | 
| [in,out] | delids_set | std::unordered_set< LAMMPS_NS::tagint > containing atom IDs marked for deletion. Used to avoid duplicate deletion of atoms. | 
| [in] | atomID2bonds | PAPRECA::ATOM2BONDS_MAP container (i.e., std::unordered_map< LAMMPS_NS::tagint parent_atomID , std::vector< PAPRECA::Bond > >). The atomID2bonds container provides direct access to all the bonds of the parent atom. | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private |