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

Class for holding backbone information. More...

#include <Containers.h>

Public Member Functions

 Backbone ()
 Empty constructor. More...
 
 Backbone (std::string file_path, std::array< unsigned, 2 > interconnects, std::array< unsigned, 2 > linker, std::vector< std::vector< unsigned >> fixed_bonds={})
 Constructor for the backbone unit. More...
 
OpenBabel::OBAtom * getHead ()
 Gives the pointer to an atom that is the head from Backbone::interconnects{head, tail}. More...
 
OpenBabel::OBAtom * getTail ()
 Gives the pointer to an atom that is the tail from Backbone::interconnects{head, tail}. More...
 
OpenBabel::OBAtom * getLinker ()
 Get the first Backbone::linker atom pointer. More...
 
OpenBabel::OBAtom * getVector ()
 Get the second Backbone::linker atom pointer (which is probably a hydrogen) More...
 
void center ()
 Centers the molecule. Basically just an alias of the Center() function from OpenBabel. More...
 
void rotate (double *rot)
 Rotates the molecule by a matrix. Basically just an alias of the Rotate() function from OpenBabel. More...
 
void translate (OpenBabel::vector3 vec)
 Translates the molecule by a vector. Basically just an alias of the Translate() function from OpenBabel. More...
 
OpenBabel::OBMol getMolecule ()
 Gives a copy of the molecule in the backbone, Backbone::backbone. More...
 
void deleteVectorAtom ()
 Deletes the atom from getVector() safely. If the atom is already deleted, nothing happens. More...
 

Public Attributes

std::array< unsigned, 2 > interconnects
 The atom indices that define the periodic conditions between backbones { head, tail }. More...
 
std::array< unsigned, 2 > linker
 The atom indices used to align and connect backbone to base in the nucleotide. More...
 
std::vector< std::vector< unsigned > > fixed_bonds
 A vector containing pairs of indices defining fixed rotatable bonds during dihedral search. More...
 
OpenBabel::OBMol backbone
 The molecule for the backbone. More...
 
std::string file_path
 The path to the file containing the molecule. 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 atom from getVector() has been deleted. More...
 

Detailed Description

Class for holding backbone information.

The backbone here refers to the backbone in a single nucleotide. This class holds information on the molecular structure of the backbone and the bonds that the backbone form with the nucleobases and the adjacent backbones. This class also has functions to manipulate the backbone.

See also
BaseUnit
ConformationSearch

Constructor & Destructor Documentation

◆ Backbone() [1/2]

PNAB::Backbone::Backbone ( )
inline

Empty constructor.

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

◆ Backbone() [2/2]

Backbone::Backbone ( std::string  file_path,
std::array< unsigned, 2 >  interconnects,
std::array< unsigned, 2 >  linker,
std::vector< std::vector< unsigned >>  fixed_bonds = {} 
)

Constructor for the backbone unit.

Parameters
file_pathThe path to the file containing the molecule.
interconnectsThe atom indices that define the periodic conditions between backbones { head, tail }.
linkerThe atom indices used to align and connect backbone to base in the nucleotide.
fixed_bondsA vector containing pairs of indices defining fixed rotatable bonds during dihedral search.

Member Function Documentation

◆ center()

void PNAB::Backbone::center ( )
inline

Centers the molecule. Basically just an alias of the Center() function from OpenBabel.

◆ deleteVectorAtom()

void Backbone::deleteVectorAtom ( )

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

◆ getHead()

OpenBabel::OBAtom* PNAB::Backbone::getHead ( )
inline

Gives the pointer to an atom that is the head from Backbone::interconnects{head, tail}.

Returns
The atom pointer from the backbone OBMol object

◆ getLinker()

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

Get the first Backbone::linker atom pointer.

Returns
Pointer to the atom that is the one linking to the Base

◆ getMolecule()

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

Gives a copy of the molecule in the backbone, Backbone::backbone.

Returns
A copy of the backbone molecule

◆ getTail()

OpenBabel::OBAtom* PNAB::Backbone::getTail ( )
inline

Gives the pointer to an atom that is the tail from Backbone::interconnects{head, tail}.

Returns
Pointer to the atom for the tail

◆ getVector()

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

Get the second Backbone::linker atom pointer (which is probably a hydrogen)

Returns
Pointer to the atom that defines the vector from the backbone to the base

◆ rotate()

void PNAB::Backbone::rotate ( double *  rot)
inline

Rotates the molecule by a matrix. Basically just an alias of the Rotate() function from OpenBabel.

Parameters
rotThe matrix by which to rotate the molecule

◆ translate()

void PNAB::Backbone::translate ( OpenBabel::vector3  vec)
inline

Translates the molecule by a vector. Basically just an alias of the Translate() function from OpenBabel.

Parameters
vecThe vector by which to translate the molecule

◆ validate()

void Backbone::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

◆ backbone

OpenBabel::OBMol PNAB::Backbone::backbone

The molecule for the backbone.

◆ file_path

std::string PNAB::Backbone::file_path

The path to the file containing the molecule.

◆ fixed_bonds

std::vector<std::vector<unsigned> > PNAB::Backbone::fixed_bonds

A vector containing pairs of indices defining fixed rotatable bonds during dihedral search.

◆ interconnects

std::array<unsigned , 2> PNAB::Backbone::interconnects

The atom indices that define the periodic conditions between backbones { head, tail }.

◆ linker

std::array<unsigned , 2> PNAB::Backbone::linker

The atom indices used to align and connect backbone to base in the nucleotide.

◆ vector_atom_deleted

bool PNAB::Backbone::vector_atom_deleted
private

Whether or not the atom from getVector() has been deleted.


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