OpenCAP
Electronic structure of metastable states
Public Member Functions | Public Attributes | List of all members
Atom Class Reference

Object for storing atomic data. More...

#include <Atom.h>

Public Member Functions

void ang_to_bohr ()
 
 Atom (string symbol, double x, double y, double z)
 
 Atom (int atom_num, double x, double y, double z)
 
element get_element_info (std::string symbol)
 
element get_element_info (int Z)
 

Public Attributes

std::string symbol
 
std::string name
 
int Z
 
std::array< double, 3 > coords
 

Detailed Description

Object for storing atomic data.

Contains atomic name, symbol, nuclear charge, and coordinates.

Constructor & Destructor Documentation

◆ Atom() [1/2]

Atom::Atom ( string  symbol,
double  x,
double  y,
double  z 
)

Constructs Atom object from atomic symbol and coordinates.

Parameters
symbolelement symbol
xx coordinate
yy coordinate
zz coordinate

◆ Atom() [2/2]

Atom::Atom ( int  atom_num,
double  x,
double  y,
double  z 
)

Constructs Atom object from atomic number and coordinates.

Parameters
atom_numatomic number
xx coordinate
yy coordinate
zz coordinate

Member Function Documentation

◆ ang_to_bohr()

void Atom::ang_to_bohr ( )

Converts coordinates from angstrom to bohr units.

◆ get_element_info() [1/2]

element Atom::get_element_info ( std::string  symbol)

Returns element struct corresponding to atomic symbol

Parameters
symbolatomic symbol
Returns
element: Element struct corresponding to atomic symbol

◆ get_element_info() [2/2]

element Atom::get_element_info ( int  Z)

Returns element struct corresponding to atomic number

Parameters
Zatomic number
Returns
element: Element struct corresponding to atomic number

Member Data Documentation

◆ coords

std::array<double,3> Atom::coords

Atomic coordinates, assumed to be in bohr units by the rest of the program

◆ name

std::string Atom::name

Element name

◆ symbol

std::string Atom::symbol

Atomic symbol

◆ Z

int Atom::Z

Nuclear charge


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