STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::synthesis::Pdb Class Reference

Public Member Functions

int getAtomCount () const
 Get the number of atoms in the structure (the number of atoms per model).
 
int getModelCount () const
 Get the number of models in the object.
 
bool getFormalChargePrinting () const
 Get the object's current directive on whether to print formal charges to any output files.
 
CoordinateFrame exportCoordinateFrame (int model_index, HybridFormat layout=default_hpc_format) const
 Produce a CoordinateFrame object from a specific model index.
 
PhaseSpace exportPhaseSpace (int model_index, HybridFormat layout=default_hpc_format) const
 Produce a PhaseSpace object (with zero velocity and force components) based on the particle positions in a specific model index. Descriptions of input parameters follow from getCoordinateFrame(), above.
 
template<typename T>
CoordinateSeries< T > getCoordinateSeries (const std::vector< int > model_sequence={}) const
 Produce a CoordinateSeries object based on the particle positions in a sequence of models.
 
void writeToFile (const std::string &file_name, PrintSituation expectation, const std::vector< int > &model_indices={}) const
 Write the contents of the object to a PDB file.
 
void setFormalChargePrinting (bool print_formal_charges_in=true)
 Set whether to print formal charges in any output files.
 
 Pdb (int atom_count_in=0, int model_count_in=1)
 The constructor can accept a file to read, arrays of data to compile, or a simple number of atoms for which to allocate space.
 
 Pdb (const std::string &file_name_in, int model_index=-1, const std::vector< char > &alternate_prefs={ ' ', 'A' })
 
 Pdb (const std::string &file_name_in, const std::vector< int > &model_indices, const std::vector< char > &alternate_prefs={ ' ', 'A' })
 
 Pdb (int atom_count_in, int model_count_in, const std::vector< double > &x_coordinates_in, const std::vector< double > &y_coordinates_in, const std::vector< double > &z_coordinates_in, const std::vector< char4 > &atom_names_in, const std::vector< char4 > &residue_names_in, const std::vector< char > &chain_names_in, const std::vector< double > &occupancies_in, const std::vector< double > &b_factors_in, const std::vector< char2 > &elements_in={}, const std::vector< int > &atom_numbers_in={}, const std::vector< int > &residue_numbers_in={}, const std::vector< int > &anisotropy_matrices_in={}, const std::vector< PdbAtomKind > &atom_classes_in={}, const std::vector< std::string > &header_in={}, const std::vector< std::string > &remark_in={}, const std::vector< std::string > &extras_in={})
 
 Pdb (const AtomGraph *ag, const CoordinateFrame *cf)
 
 Pdb (const AtomGraph &ag, const CoordinateFrame &cf)
 
 Pdb (const AtomGraph *ag, const PhaseSpace *ps)
 
 Pdb (const AtomGraph &ag, const PhaseSpace &ps)
 
template<typename T>
 Pdb (const AtomGraph *ag, const CoordinateSeries< T > *cf, const std::vector< int > &frames={})
 
template<typename T>
 Pdb (const AtomGraph &ag, const CoordinateSeries< T > &cf, const std::vector< int > &frames={})
 
template<typename T>
 Pdb (const AtomGraph *ag, const CoordinateSeries< T > *cs, int frame_number)
 
template<typename T>
 Pdb (const AtomGraph &ag, const CoordinateSeries< T > &cs, int frame_number)
 
void loadTopologicalData (const AtomGraph *ag)
 Transcribe information from a topology into the object. This includes atom names, symbols, and formal charges. Atom classes will be assigned based on recognized amino acid names. Atom symbols for virtual sites will be listed as "VS", and all letters in atom symbols will be capitalized.
 
void loadTopologicalData (const AtomGraph &ag)
 
template<typename T>
void loadCoordinates (const T *xcrd_in, const T *ycrd_in, const T *zcrd_in, int model_index=0, double gpos_scale=1.0)
 Load coordinates into the object from various coordinate objects.
 
void loadCoordinates (const llint *xcrd_in, const llint *ycrd_in, const llint *zcrd_in, const int *xcrd_ovrf, const int *ycrd_ovrf, const int *zcrd_ovrf, double gpos_scale=1.0, int model_index=0)
 
void loadCoordinates (const CoordinateFrame *cf, int model_index=0)
 
void loadCoordinates (const CoordinateFrame &cf, int model_index=0)
 
void loadCoordinates (const PhaseSpace *ps, int model_index=0)
 
void loadCoordinates (const PhaseSpace &ps, int model_index=0)
 
template<typename T>
void loadCoordinates (const CoordinateSeries< T > *cs, const std::vector< int2 > &frame_mapping={})
 
template<typename T>
void loadCoordinates (const CoordinateSeries< T > &cs, const std::vector< int2 > &frame_mapping={})
 
void loadCoordinates (const PhaseSpaceSynthesis *poly_ps, int system_index, int model_index=0)
 
void loadCoordinates (const PhaseSpaceSynthesis &poly_ps, int system_index, int model_index=0)
 
void loadCoordinates (const Condensate *cdns, int system_index, int model_index=0)
 
void loadCoordinates (const Condensate &cdns, int system_index, int model_index=0)
 

Constructor & Destructor Documentation

◆ Pdb()

stormm::structure::Pdb::Pdb ( int atom_count_in = 0,
int model_count_in = 1 )

The constructor can accept a file to read, arrays of data to compile, or a simple number of atoms for which to allocate space.

Parameters
atom_count_inThe anticipated number of atoms in each model entry
model_count_inThe anticipated number of models
file_name_inName of the input PDB file
model_indexIndicate a particular model of the PDB to use in constructing the object
alternate_prefsList of symbols that will qualify for including an atom. White space is an option.
xcoordinates_inCartesian X coordinates of all particles, perhaps spanning multiple model entries. If multiple model entries are involved, the inputs for each separate model must be padded by the warp size.
ycoordinates_inCartesian Y coordinates of all particles
zcoordinates_inCartesian Z coordinates of all particles
atom_names_inNames of atoms in each entry, common to all entries
res_names_inNames of residues in each entry, listed atom by atom and common to all entries
chain_names_inNames of each chain in the system, common to all entries
occupancies_inThe occupancies of each atom, unique to each entry
b_factors_inTemperature factors indicating the spread of positions for each atom about some observed mean. Unique elements must be provided for each entry.
elements_inIUPAC element symbols for each atom
agTopology providing atom-specific information for each model entry
cfCoordinates for one system
psCoordinates for one system
csCoordinates for multiple copies of one system
framesA list of frames associated with a CoordinateSeries (input cs)
frame_numberA specific frame associated with a CoordinateSeries

Member Function Documentation

◆ exportCoordinateFrame()

CoordinateFrame stormm::structure::Pdb::exportCoordinateFrame ( int model_index,
HybridFormat layout = default_hpc_format ) const

Produce a CoordinateFrame object from a specific model index.

Parameters
model_indexThe model of interest (this will be checked against the actual number of models available)
layoutThe memory (CPU host and GPU device) layout with which to create the resulting object

◆ getCoordinateSeries()

template<typename T>
CoordinateSeries< T > stormm::structure::Pdb::getCoordinateSeries ( const std::vector< int > model_sequence = {}) const

Produce a CoordinateSeries object based on the particle positions in a sequence of models.

Parameters
model_sequenceThe sequence of models to impart to frames of the coordinate series. An empty vector indicates that all models should be imparted, in order.

◆ loadCoordinates()

template<typename T>
void stormm::structure::Pdb::loadCoordinates ( const T * xcrd_in,
const T * ycrd_in,
const T * zcrd_in,
int model_index = 0,
double gpos_scale = 1.0 )

Load coordinates into the object from various coordinate objects.

Overloaded:

  • Provide C-style arrays for each of the three Cartesian dimensions
  • Provide one of STORMM's typical coordinate objects, with a system index if necessary
Parameters
xcrd_inPointer to Cartesian X coordinates, in units of Angstroms. The order of atoms in these coordinates is expected to match that in the Pdb object.
ycrd_inPointer to Cartesian Y coordinates, in units of Angstroms
zcrd_inPointer to Cartesian Z coordinates, in units of Angstroms
xcrd_ovrfOverflow bits for split fixed-precision Cartesian X coordinates
ycrd_ovrfOverflow bits for split fixed-precision Cartesian Y coordinates
zcrd_ovrfOverflow bits for split fixed-precision Cartesian Z coordinates
cfA set of coordinates to draw from
psA set of coordinates to draw from. The POSITIONS aspect of this input will be taken, at whatever point in the coordinate cycle the object is currently at.
csA coordinate series to draw from (one frame, a collection of frames, or all frames in the series can be taken into the object). If all frames of the series are to be loaded and the series has more frames than the object has models, the loading will stop at the limit of the object.
poly_psA coordinate synthesis to draw from (a specific system within the synthesis must be specified)
cdnsAn abridged coordinate synthesis to draw from (a specific system must be specified)
system_indexIndex of the system to take from a coordinate synthesis
frame_indexIndex of the frame to take from a coordinate series

◆ loadTopologicalData()

void stormm::structure::Pdb::loadTopologicalData ( const AtomGraph * ag)

Transcribe information from a topology into the object. This includes atom names, symbols, and formal charges. Atom classes will be assigned based on recognized amino acid names. Atom symbols for virtual sites will be listed as "VS", and all letters in atom symbols will be capitalized.

Overloaded:

  • Provide the topology by const pointer
  • Provide the topology by const reference
Parameters
agThe topology containing information to transcribe

◆ setFormalChargePrinting()

void stormm::structure::Pdb::setFormalChargePrinting ( bool print_formal_charges_in = true)

Set whether to print formal charges in any output files.

Parameters
print_formal_charges_inThe new setting to apply

◆ writeToFile()

void stormm::structure::Pdb::writeToFile ( const std::string & file_name,
PrintSituation expectation,
const std::vector< int > & model_indices = {} ) const

Write the contents of the object to a PDB file.

Parameters
file_nameName of the file to write (likely to have a .pdb extension)
expectationDirective as to what to do if the file already exists

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