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

#include <Nucleus.hpp>

Collaboration diagram for GQCP::Nucleus:
Collaboration graph

Public Member Functions

 Nucleus (const size_t Z, const double x, const double y, const double z)
 
 Nucleus (const size_t Z, const Vector< double, 3 > &position)
 
 Nucleus ()
 
double calculateDistanceWith (const Nucleus &other) const
 
std::string description () const
 
std::string element () const
 
size_t charge () const
 
const Vector< double, 3 > & position () const
 

Static Public Member Functions

static std::function< bool(const Nucleus &, const Nucleus &)> sortComparer (const double tolerance=1.0e-08)
 
static std::function< bool(const Nucleus &, const Nucleus &)> equalityComparer (const double tolerance=1.0e-08)
 

Friends

std::ostream & operator<< (std::ostream &os, const Nucleus &nucleus)
 

Detailed Description

A class that represents a nucleus: it has a charge and a position in space

Constructor & Destructor Documentation

◆ Nucleus() [1/3]

GQCP::Nucleus::Nucleus ( const size_t  Z,
const double  x,
const double  y,
const double  z 
)
Parameters
Zthe atomic number (Z) of the nucleus
xthe x-position of the nucleus in bohr
ythe y-position of the nucleus in bohr
zthe z-position of the nucleus in bohr

◆ Nucleus() [2/3]

GQCP::Nucleus::Nucleus ( const size_t  Z,
const Vector< double, 3 > &  position 
)
Parameters
Zthe atomic number (Z) of the nucleus
positionthe position of the nucleus in bohr

◆ Nucleus() [3/3]

GQCP::Nucleus::Nucleus ( )

Default constructor, creating a 'ghost' nucleus (i.e. Bq) in the origin

Member Function Documentation

◆ calculateDistanceWith()

double GQCP::Nucleus::calculateDistanceWith ( const Nucleus other) const
Parameters
otherthe other nucleus
Returns
the Euclidian distance between this nucleus and the other

◆ charge()

size_t GQCP::Nucleus::charge ( ) const
inline
Returns
the charge of this nucleus

◆ description()

std::string GQCP::Nucleus::description ( ) const
inline
Returns
a textual description of this nucleus.

◆ element()

std::string GQCP::Nucleus::element ( ) const
inline
Returns
The string representation of the element that corresponds to this nucleus.

◆ equalityComparer()

std::function< bool(const Nucleus &, const Nucleus &)> GQCP::Nucleus::equalityComparer ( const double  tolerance = 1.0e-08)
static
Returns
a functor that can be used in checking atom for equality. Atoms are equal if their charge and position are equal

◆ position()

const Vector< double, 3 > & GQCP::Nucleus::position ( ) const
inline
Returns
the position of this nucleus

◆ sortComparer()

std::function< bool(const Nucleus &, const Nucleus &)> GQCP::Nucleus::sortComparer ( const double  tolerance = 1.0e-08)
static
Returns
a functor that can be used in sorting atoms. It features a custom implementation, in which the x-coordinate takes precedence over the y-coordinate, which in turn takes precedence over the z-coordinate

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Nucleus nucleus 
)
friend

Overloading of operator<< for a Nucleus to be used with ostreams

Parameters
osthe output stream to which the nucleus should be concatenated
nucleusthe nucleus which should be concatenated to the output stream
Returns
the updated output stream

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