GQCP
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
GQCP::Molecule Class Reference

#include <Molecule.hpp>

Collaboration diagram for GQCP::Molecule:
Collaboration graph

Public Member Functions

 Molecule (const NuclearFramework &nuclear_framework, const int charge=0)
 
 Molecule (const std::vector< Nucleus > &nuclei, const int charge=0)
 
double calculateInternuclearDistanceBetween (const size_t index1, const size_t index2) const
 
int charge () const
 
std::string description () const
 
const NuclearFrameworknuclearFramework () const
 
size_t numberOfAtoms () const
 
size_t numberOfElectronPairs () const
 
size_t numberOfElectrons () const
 
size_t totalNucleicCharge () const
 

Static Public Member Functions

static Molecule HChain (const size_t n, const double spacing, const int charge=0, const CartesianDirection axis=CartesianDirection::z)
 
static Molecule H2Chain (const size_t n, const double a, const double b, const int charge=0, const CartesianDirection axis=CartesianDirection::z)
 
static Molecule HRingFromDistance (const size_t n, const double distance, const int charge=0)
 
static Molecule HRingFromRadius (const size_t n, const double radius, const int charge=0)
 
static Molecule ReadXYZ (const std::string &xyz_filename, const int charge=0)
 

Friends

std::ostream & operator<< (std::ostream &os, const Molecule &molecule)
 

Detailed Description

A molecule: a number of electrons and a collection of nuclei arranged in a nuclear framework.

Constructor & Destructor Documentation

◆ Molecule() [1/2]

GQCP::Molecule::Molecule ( const NuclearFramework nuclear_framework,
const int  charge = 0 
)
Parameters
nuclear_frameworkthe nuclear framework that makes up the molecule, with coordinates in bohr
chargethe charge of the molecule: +1 -> cation (one electron less than the neutral molecule) 0 -> neutral molecule -1 -> anion (one electron more than the neutral molecule)

◆ Molecule() [2/2]

GQCP::Molecule::Molecule ( const std::vector< Nucleus > &  nuclei,
const int  charge = 0 
)
Parameters
nucleithe nuclei that make up the molecule, with coordinates in bohr
chargethe charge of the molecule: +1 -> cation (one electron less than the neutral molecule) 0 -> neutral molecule -1 -> anion (one electron more than the neutral molecule)

Member Function Documentation

◆ calculateInternuclearDistanceBetween()

double GQCP::Molecule::calculateInternuclearDistanceBetween ( const size_t  index1,
const size_t  index2 
) const
inline
Parameters
index1the index of the first nucleus
index2the index of the second nucleus
Returns
the distance between the two nuclei at index1 and index2 in bohr

◆ charge()

int GQCP::Molecule::charge ( ) const
Returns
the charge of this molecule (in a.u.)

◆ description()

std::string GQCP::Molecule::description ( ) const
inline
Returns
a textual description of this molecule.

◆ H2Chain()

Molecule GQCP::Molecule::H2Chain ( const size_t  n,
const double  a,
const double  b,
const int  charge = 0,
const CartesianDirection  axis = CartesianDirection::z 
)
static
Parameters
nthe number of H2-molecules
athe internuclear distance in bohr
bthe intermolecular distance in bohr
chargethe total charge
Returns
a charged H2-chain

◆ HChain()

Molecule GQCP::Molecule::HChain ( const size_t  n,
const double  spacing,
const int  charge = 0,
const CartesianDirection  axis = CartesianDirection::z 
)
static
Parameters
nthe number of H nuclei
spacingthe internuclear spacing in bohr
chargethe total charge
Returns
a H-chain with equal internuclear spacing
Parameters
nthe number of H nuclei
spacingthe internuclear spacing in bohr
chargethe total charge
Returns
a charged H-chain with equal internuclear spacing

◆ HRingFromDistance()

Molecule GQCP::Molecule::HRingFromDistance ( const size_t  n,
const double  distance,
const int  charge = 0 
)
static
Parameters
nthe number of hydrogens
distancethe distance (in bohr) between neighbouring hydrogen atoms
Returns
a regular H-ring where neighbouring hydrogens are separated by the given distance

◆ HRingFromRadius()

Molecule GQCP::Molecule::HRingFromRadius ( const size_t  n,
const double  radius,
const int  charge = 0 
)
static
Parameters
nthe number of hydrogens
radiusthe radius (in bohr) of the circumscribed circle
Returns
a regular H-ring whose hydrogens are on the circle with the given radius

◆ nuclearFramework()

const NuclearFramework & GQCP::Molecule::nuclearFramework ( ) const
inline
Returns
The underlying nuclear framework.

◆ numberOfAtoms()

size_t GQCP::Molecule::numberOfAtoms ( ) const
inline
Returns
the number of atoms in this molecule

◆ numberOfElectronPairs()

size_t GQCP::Molecule::numberOfElectronPairs ( ) const
inline
Returns
the number of electron pairs in this molecule. For odd numbers of electrons, the number of electron pairs is equal to that of the (N-1)-even-electron system.

◆ numberOfElectrons()

size_t GQCP::Molecule::numberOfElectrons ( ) const
inline
Returns
the number of electrons in the molecule

◆ ReadXYZ()

Molecule GQCP::Molecule::ReadXYZ ( const std::string &  xyz_filename,
const int  charge = 0 
)
static

Construct a molecule based on the content of a given .xyz-file. In an .xyz-file, the molecular coordinates are in Angstrom

Parameters
xyz_filenamethe .xyz-file that contains the molecular coordinates in Angstrom
chargethe charge of the molecule: +1 -> cation (one electron less than the neutral molecule) 0 -> neutral molecule -1 -> anion (one electron more than the neutral molecule)

◆ totalNucleicCharge()

size_t GQCP::Molecule::totalNucleicCharge ( ) const
inline
Returns
the sum of all the charges of the nuclei that are in this molecule

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Molecule molecule 
)
friend
Parameters
osthe output stream which the molecule should be concatenated to
moleculethe molecule that should be concatenated to the output stream
Returns
the updated output stream

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