NetSci
|
Public Member Functions | |
Network () | |
Default constructor for Network. | |
~Network () | |
Destructor for Network. | |
void | init (const std::string &trajectoryFile, const std::string &topologyFile, int firstFrame, int lastFrame, int stride=1) |
Initialize the Network with trajectory and topology files. | |
int | numNodes () const |
Get the number of nodes in the Network. | |
CuArray< float > * | nodeCoordinates () |
Get the node coordinates as a CuArray. | |
std::vector< Node * > & | nodes () |
Get a reference to the vector of nodes in the Network. | |
int | numFrames () const |
Get the number of frames in the Network. | |
Node * | nodeFromAtomIndex (int atomIndex) |
Get the node corresponding to the Atom with the given index. | |
Atoms * | atoms () const |
Get the Atoms object associated with the Network. | |
void | parsePdb (const std::string &fname) |
Parse a PDB file to populate the Network. | |
void | parseDcd (const std::string &nodeCoordinates, int firstFrame, int lastFrame, int stride) |
Parse a DCD file to populate the Network. | |
void | save (const std::string &jsonFile) |
Save the Network as a JSON file. | |
void | load (const std::string &jsonFile) |
Load a Network from a JSON file. | |
void | nodeCoordinates (const std::string &nodeCoordinatesFile) |
Set the node coordinates from a file. | |
Private Attributes | |
std::vector< Node * > | nodeAtomIndexVector_ |
std::vector< Node * > | nodes_ |
int | numNodes_ |
int | numFrames_ |
CuArray< float > * | nodeCoordinates_ |
Atoms * | atoms_ |
Atoms * Network::atoms | ( | ) | const |
Get the Atoms object associated with the Network.
Returns a pointer to the Atoms object associated with the Network.
Python Example
void Network::init | ( | const std::string & | trajectoryFile, |
const std::string & | topologyFile, | ||
int | firstFrame, | ||
int | lastFrame, | ||
int | stride = 1 |
||
) |
Initialize the Network with trajectory and topology files.
Initializes the Network by loading trajectory and topology files.
trajectoryFile | Path to the trajectory file. |
topologyFile | Path to the topology file. |
firstFrame | Index of the first frame to consider. |
lastFrame | Index of the last frame to consider. |
stride | Stride between frames. |
Python Example
void Network::load | ( | const std::string & | jsonFile | ) |
Load a Network from a JSON file.
Loads a Network from the specified JSON file.
jsonFile | Path to the JSON file. |
Python Example
CuArray< float > * Network::nodeCoordinates | ( | ) |
Get the node coordinates as a CuArray.
Returns a pointer to the CuArray object containing the node coordinates.
Python Example
void Network::nodeCoordinates | ( | const std::string & | nodeCoordinatesFile | ) |
Set the node coordinates from a file.
Sets the node coordinates from the specified node coordinates file.
nodeCoordinatesFile | Path to the node coordinates file. |
Python Example
Node * Network::nodeFromAtomIndex | ( | int | atomIndex | ) |
Get the node corresponding to the Atom with the given index.
Returns a pointer to the Node object that the Atom with the specified index is part of
atomIndex | The index of the Atom. |
Python Example
std::vector< Node * > & Network::nodes | ( | ) |
Get a reference to the vector of nodes in the Network.
Returns a reference to the vector of nodes in the Network.
Python Example
int Network::numFrames | ( | ) | const |
Get the number of frames in the Network.
Returns the number of frames in the Network.
Python Example
int Network::numNodes | ( | ) | const |
Get the number of nodes in the Network.
Returns the number of nodes in the Network.
Python Example
void Network::parseDcd | ( | const std::string & | nodeCoordinates, |
int | firstFrame, | ||
int | lastFrame, | ||
int | stride | ||
) |
void Network::parsePdb | ( | const std::string & | fname | ) |
void Network::save | ( | const std::string & | jsonFile | ) |
Save the Network as a JSON file.
Saves the Network as a JSON file.
jsonFile | Path to the JSON file. |
Python Example