zMol
A viewer for molecular data using OpenGL and ambient occlusion
Classes | Public Member Functions | Public Attributes
zmol::molecule_data Struct Reference

#include <molecule_data.hpp>

List of all members.

Classes

struct  atom
struct  bond

Public Member Functions

 molecule_data ()
 molecule_data (molecule_data const &p_other)
 molecule_data (molecule_data &&p_other)
molecule_dataoperator= (molecule_data &&p_other)

Public Attributes

atoms_type m_atoms
bonds_type m_bonds

Detailed Description

Data of a molecule, consisting of collections of atoms and bonds.

Atoms are described by a name (which is the uppercase version of the element symbol, like "FE", "HG", "HE"), the ID of the chain it belongs to, and a three-dimensional position. Each atom also has a serial number, which is integer. The indices can be any number, as long as they are unique for each atom in the dataset. They do not have to be consecutive. This is necessary, since some molecule file formats like PDB can have "gaps" in the atom indices; for example, the nth atom has serial nr. 4019, and the (n+1)th one has serial nr. 4025, the (n+2)th one has serial nr. 4026.. also, sometimes the first serial number is 1, sometimes it is 0 etc. Bonds describe a pair of bonded atoms, which are referred to by their serial numbers. Topologically, the overall dataset resembles an undirected graph.


Constructor & Destructor Documentation

zmol::molecule_data::molecule_data ( )

Constructor. Creates an empty dataset.

zmol::molecule_data::molecule_data ( molecule_data const &  p_other)

Copy constructor.

zmol::molecule_data::molecule_data ( molecule_data &&  p_other)

Move constructor.


Member Function Documentation

molecule_data & zmol::molecule_data::operator= ( molecule_data &&  p_other)

Move assignment operator.


Member Data Documentation

atoms_type zmol::molecule_data::m_atoms

Associatve collection of atoms. The key is the atom's serial number, the value is the atom structure.

bonds_type zmol::molecule_data::m_bonds

Array of bonds.