NetSci
|
Public Member Functions | |
Atom () | |
Default constructor for Atom. | |
Atom (const std::string &pdbLine) | |
Constructor for Atom with PDB line. | |
Atom (const std::string &pdbLine, int atomIndex) | |
Constructor for Atom with PDB line and atom index. | |
int | index () const |
Get the atom index. | |
std::string | name () |
Get the atom name. | |
std::string | element () |
Get the atom element. | |
std::string | residueName () |
Get the residue name. | |
int | residueId () const |
Get the residue ID. | |
std::string | chainId () |
Get the chain ID. | |
std::string | segmentId () |
Get the segment ID. | |
float | temperatureFactor () const |
Get the temperature factor. | |
float | occupancy () const |
Get the occupancy. | |
int | serial () const |
Get the serial number. | |
std::string | tag () |
Get the atom tag. | |
float | mass () const |
Get the mass of the atom. | |
unsigned int | hash () const |
Get the hash of the atom. | |
float | x (CuArray< float > *coordinates, int frame, int numFrames) const |
Get the x-coordinate of the atom. | |
float | y (CuArray< float > *coordinates, int frame, int numFrames) const |
Get the y-coordinate of the atom. | |
float | z (CuArray< float > *coordinates, int frame, int numFrames) const |
Get the z-coordinate of the atom. | |
void | load (const std::string &jsonFile) |
Load atom information from a JSON file. | |
|
explicit |
Constructor for Atom with PDB line.
Constructs an Atom object using the provided PDB line. The constructor parses the PDB line to extract the relevant atom information, such as index, name, element, residue name, residue ID, chain ID, segment ID, temperature factor, occupancy, serial number, atom tag, mass, and hash.
The PDB line should follow the standard PDB format for ATOM records as described in Section 9 of the PDB file format documentation:
pdbLine | The PDB line containing atom information in the standard PDB format. |
Atom::Atom | ( | const std::string & | pdbLine, |
int | atomIndex | ||
) |
std::string Atom::chainId | ( | ) |
Get the chain ID.
Returns the chain ID.
Python Example
std::string Atom::element | ( | ) |
Get the atom element.
Returns the atom element.
Python Example
unsigned int Atom::hash | ( | ) | const |
Get the hash of the atom.
Returns the hash of the atom, which is calculated from the atom tag concatenated with the atom index.
int Atom::index | ( | ) | const |
Get the atom index.
Returns the atom index.
Python Example
void Atom::load | ( | const std::string & | jsonFile | ) |
Load atom information from a JSON file.
Loads atom information from the specified JSON file.
jsonFile | The name of the JSON file to load. |
float Atom::mass | ( | ) | const |
Get the mass of the atom.
Returns the mass of the atom.
Python Example
std::string Atom::name | ( | ) |
Get the atom name.
Returns the atom name.
Python Example
float Atom::occupancy | ( | ) | const |
Get the occupancy.
Returns the occupancy.
Python Example
int Atom::residueId | ( | ) | const |
Get the residue ID.
Returns the residue ID.
Python Example
std::string Atom::residueName | ( | ) |
Get the residue name.
Returns the residue name.
Python Example
std::string Atom::segmentId | ( | ) |
Get the segment ID.
Returns the segment ID.
Python Example
int Atom::serial | ( | ) | const |
Get the serial number.
Returns the serial number, which is one greater than the atom index.
Python Example
std::string Atom::tag | ( | ) |
Get the atom tag.
Returns the atom tag, which is the concatenation of the residue name, residue ID, chain ID, and segment ID.
Python Example
float Atom::temperatureFactor | ( | ) | const |
Get the temperature factor.
Returns the temperature factor.
Python Example
float Atom::x | ( | CuArray< float > * | coordinates, |
int | frame, | ||
int | numFrames | ||
) | const |
Get the x-coordinate of the atom.
Returns the x-coordinate of the atom at the specified frame.
coordinates | The CuArray containing the coordinates. |
frame | The frame index. |
numFrames | The total number of frames. |
float Atom::y | ( | CuArray< float > * | coordinates, |
int | frame, | ||
int | numFrames | ||
) | const |
Get the y-coordinate of the atom.
Returns the y-coordinate of the atom at the specified frame.
coordinates | The CuArray containing the coordinates. |
frame | The frame index. |
numFrames | The total number of frames. |
float Atom::z | ( | CuArray< float > * | coordinates, |
int | frame, | ||
int | numFrames | ||
) | const |
Get the z-coordinate of the atom.
Returns the z-coordinate of the atom at the specified frame.
coordinates | The CuArray containing the coordinates. |
frame | The frame index. |
numFrames | The total number of frames. |