The proto-Nucleic-Acid Builder (pNAB)
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
PNAB::Base Class Reference

Class to fully define bases (i.e. Adenine, Cytosine) More...

#include <Containers.h>

Public Member Functions

 Base ()
 Empty constructor. More...
 
 Base (std::string name, std::string code, std::string file_path, std::array< std::size_t, 2 > linker, std::string pair_name="")
 Create Base from basic set of parameters. More...
 
OpenBabel::OBAtom * getLinker ()
 Gives the atom of the base that connects directly to the backbone, Base::linker[0]. More...
 
OpenBabel::OBAtom * getVector ()
 Gives the (most likely hydrogen) atom of the base connected to the atom from getLinker() which defines how the base connects, Base::linker[1]. More...
 
OpenBabel::OBMol getMolecule ()
 Returns a copy of the base molecule, Base::base. More...
 
std::string getCode ()
 Gives the three-letter code of the base, Base::code. More...
 
std::string getName ()
 Gives the full name of the base, Base::name. More...
 
void deleteVectorAtom ()
 Deletes the atom from getVector() safely. If the atom is already deleted, nothing happens. More...
 
std::string getBasePairName ()
 Get the name of the pair base, Base::pair_name. More...
 

Public Attributes

std::string name
 Full name of base (i.e. "Adenine" or just "A") More...
 
std::string code
 Three character code to define base ("Adenine": "ADE") More...
 
std::string pair_name
 Name of the pair base. More...
 
std::string file_path
 Path to a file containing the base. More...
 
OpenBabel::OBMol base
 The OBMol defining the base. More...
 
std::array< std::size_t, 2 > linker
 Holds indices for atoms forming a vector to connect to backbone {linker, hydrogen}. More...
 

Private Member Functions

void validate ()
 Does some basic sanity checks (such as whether or not the indices of the atom are within the range of the molecule). More...
 

Private Attributes

bool vector_atom_deleted
 Whether or not the getVector() atom was deleted. More...
 

Detailed Description

Class to fully define bases (i.e. Adenine, Cytosine)

This class holds information on the molecular structure of one nucleobase and the bond that it should form with the backbone. This class also has functions to manipulate the nucleobase and gets information about it.

See also
Bases
BaseUnit

Constructor & Destructor Documentation

◆ Base() [1/2]

PNAB::Base::Base ( )
inline

Empty constructor.

This empty constructor can be used. After that, values for the member variables should be specified.

◆ Base() [2/2]

Base::Base ( std::string  name,
std::string  code,
std::string  file_path,
std::array< std::size_t, 2 >  linker,
std::string  pair_name = "" 
)

Create Base from basic set of parameters.

Parameters
namename of the base
codethree-letter code
file_pathpath to the backbone file
linkerindices for atoms forming the vector connecting to the backbone
pair_nameName of the pairing base

Member Function Documentation

◆ deleteVectorAtom()

void PNAB::Base::deleteVectorAtom ( )
inline

Deletes the atom from getVector() safely. If the atom is already deleted, nothing happens.

◆ getBasePairName()

std::string PNAB::Base::getBasePairName ( )
inline

Get the name of the pair base, Base::pair_name.

Returns
Pair name

◆ getCode()

std::string PNAB::Base::getCode ( )
inline

Gives the three-letter code of the base, Base::code.

Returns
The code of the base

◆ getLinker()

OpenBabel::OBAtom* PNAB::Base::getLinker ( )
inline

Gives the atom of the base that connects directly to the backbone, Base::linker[0].

Returns
A pointer to the atom that connects to the backbone

◆ getMolecule()

OpenBabel::OBMol PNAB::Base::getMolecule ( )
inline

Returns a copy of the base molecule, Base::base.

Returns
A copy of the base molecule

◆ getName()

std::string PNAB::Base::getName ( )
inline

Gives the full name of the base, Base::name.

Returns
The full name of the base

◆ getVector()

OpenBabel::OBAtom* PNAB::Base::getVector ( )
inline

Gives the (most likely hydrogen) atom of the base connected to the atom from getLinker() which defines how the base connects, Base::linker[1].

Returns
A pointer to the atom forming the vector connecting to the backbone

◆ validate()

void Base::validate ( )
private

Does some basic sanity checks (such as whether or not the indices of the atom are within the range of the molecule).

Member Data Documentation

◆ base

OpenBabel::OBMol PNAB::Base::base

The OBMol defining the base.

◆ code

std::string PNAB::Base::code

Three character code to define base ("Adenine": "ADE")

◆ file_path

std::string PNAB::Base::file_path

Path to a file containing the base.

◆ linker

std::array<std::size_t, 2 > PNAB::Base::linker

Holds indices for atoms forming a vector to connect to backbone {linker, hydrogen}.

◆ name

std::string PNAB::Base::name

Full name of base (i.e. "Adenine" or just "A")

◆ pair_name

std::string PNAB::Base::pair_name

Name of the pair base.

◆ vector_atom_deleted

bool PNAB::Base::vector_atom_deleted
private

Whether or not the getVector() atom was deleted.


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