STORMM Source Documentation
|
An atom selection within a system. Internally, this stores a bitmask, one bit for every particle, to denote whether it is in the mask. The object also stores the original string upon which the mask was constructed and a description of the mask, as it is a significant computation to build. More...
#include <atommask.h>
Public Member Functions | |
MaskTraversalMode | getRecommendation () const |
Get the recommendation for scanning this mask. | |
const std::vector< uint > & | getRawMask () const |
Get the raw mask as a vector of unsigned long integers (bit strings storing whether each atom is masked at one atom per bit) | |
int | getMaskedAtomCount () const |
Get a count of the number of masked atoms. | |
std::vector< bool > | getMask () const |
Get the mask as a vector of boolean values (not just a bit mask as the object stores privately) | |
std::vector< int > | getMaskedAtomList () const |
std::vector< int2 > | getSegments () const |
Get the segments of atoms over which the mask applies (only filled out if the recommended scanning method is by segment) | |
std::string | getInputText () const |
Get the input text used to generate this atom mask. | |
MaskInputMode | getInputKind () const |
Get the input text mode, e.g. AMBMASK to indicate that an Amber-style atom mask string was used to make this mask. | |
std::string | getDescription () const |
Get the description of the mask, if provided. | |
const AtomGraph * | getTopologyPointer () const |
Get a pointer to the topology that this mask describes. | |
AtomMask (const AtomGraph *ag_in=nullptr) | |
Constructor takes a mask string, topology, and coordinates. | |
AtomMask (const std::string &input_text_in, const AtomGraph *ag_in, const ChemicalFeatures &chemfe, const CoordinateFrameReader &cfr, MaskInputMode mode=MaskInputMode::AMBMASK, const std::string &description_in=std::string("No description provided")) | |
AtomMask (const std::string &input_text_in, const AtomGraph *ag_in, const ChemicalFeatures &chemfe, const CoordinateFrame &cf, MaskInputMode mode=MaskInputMode::AMBMASK, const std::string &description_in=std::string("No description provided")) | |
AtomMask (const std::string &input_text_in, const AtomGraph *ag_in, const ChemicalFeatures &chemfe, const PhaseSpace &ps, MaskInputMode mode=MaskInputMode::AMBMASK, const std::string &description_in=std::string("No description provided")) | |
AtomMask (const AtomMask &original)=default | |
AtomMask (AtomMask &&original)=default | |
bool | isAtomInMask (const char4 atom_name) const |
Answer whether an atom is in the mask. | |
bool | isAtomInMask (const char4 res_name, const char4 atom_name) const |
bool | isAtomInMask (int atom_index) const |
void | addAtoms (const std::vector< int > &new_indices, ExceptionResponse policy=ExceptionResponse::DIE) |
Add atoms to the atom mask. | |
void | addAtoms (const std::vector< char4 > &new_names) |
void | addAtoms (const AtomMask &new_mask, const CoordinateFrame &cf, const ChemicalFeatures &chemfe) |
void | addAtoms (const std::string &new_mask, const CoordinateFrame &cf, const ChemicalFeatures &chemfe) |
void | addAtoms (const AtomMask &new_mask, const CoordinateFrame &cf) |
void | addAtoms (const std::string &new_mask, const CoordinateFrame &cf) |
An atom selection within a system. Internally, this stores a bitmask, one bit for every particle, to denote whether it is in the mask. The object also stores the original string upon which the mask was constructed and a description of the mask, as it is a significant computation to build.
stormm::chemistry::AtomMask::AtomMask | ( | const AtomGraph * | ag_in = nullptr | ) |
Constructor takes a mask string, topology, and coordinates.
Overloaded:
input_text_in | The mask string |
ag_in | System topology |
chemfe | Chemical features computed for the topology |
crd | Coordinates obtained from a CoordinateFrame object |
xcrd | Cartesian X coordinates of all atoms |
ycrd | Cartesian Y coordinates of all atoms |
zcrd | Cartesian Z coordinates of all atoms |
description | [Optional] description of the mask and its purpose |
|
default |
The standard copy and move constructors will be effective for this object, which has no pointers to repair. Because there is a const member, the copy and move assignment operators will be implicitly deleted.
void stormm::chemistry::AtomMask::addAtoms | ( | const std::vector< int > & | new_indices, |
ExceptionResponse | policy = ExceptionResponse::DIE ) |
Add atoms to the atom mask.
Overloaded:
new_indices | The atom indices to add to the current mask |
new_names | The names of atoms to add to the current mask |
new_mask | Another atom mask (or mask string) to add to the current mask |
policy | The policy to take in the event that an error is encountered |
bool stormm::chemistry::AtomMask::isAtomInMask | ( | const char4 | atom_name | ) | const |
Answer whether an atom is in the mask.
Overloaded:
atom_name | Name of the atom of interest |
res_name | Name of the residue of interest |
atom_index | Topological index number of the atom of interest |