MADNESS 0.10.1
Public Member Functions | Private Attributes | List of all members
MolecularEntity Class Reference

#include <mentity.h>

Public Member Functions

 MolecularEntity ()
 Makes a MolecularEntity with zero atoms.
 
 MolecularEntity (const std::string &filename, bool fractional)
 Read coordinates from a file.
 
void add_atom (double x, double y, double z, int atn, double q)
 
double bounding_cube () const
 Returns the half width of the bounding cube.
 
void center ()
 Moves the center of nuclear charge to the origin.
 
const Atomget_atom (unsigned int i) const
 
double inter_atomic_distance (unsigned int i, unsigned int j) const
 
int natom () const
 
double nuclear_attraction_potential (double x, double y, double z) const
 
double nuclear_charge_density (double x, double y, double z) const
 
double nuclear_repulsion_energy () const
 
void print () const
 
void read_file (const std::string &filename, bool fractional)
 
template<typename Archive >
void serialize (Archive &ar)
 
void set_atom_coords (unsigned int i, double x, double y, double z)
 
double smallest_length_scale () const
 
double total_nuclear_charge () const
 

Private Attributes

std::vector< Atomatoms
 
std::vector< double > rcut
 
std::vector< double > rsqasymptotic
 

Constructor & Destructor Documentation

◆ MolecularEntity() [1/2]

MolecularEntity::MolecularEntity ( )
inline

Makes a MolecularEntity with zero atoms.

◆ MolecularEntity() [2/2]

MolecularEntity::MolecularEntity ( const std::string &  filename,
bool  fractional = false 
)

Read coordinates from a file.

Scans the file for the first geometry block in the format

geometry
tag x y z
...
end

The charge q is inferred from the tag which is assumed to be the standard symbol for an element. Same as the simplest NWChem format. For ghost atoms (bq ) the charge is read as a fifth field on the line.

This code is just for the examples ... don't trust it!

References madness::filename, and read_file().

Member Function Documentation

◆ add_atom()

void MolecularEntity::add_atom ( double  x,
double  y,
double  z,
int  atn,
double  q 
)

◆ bounding_cube()

double MolecularEntity::bounding_cube ( ) const

Returns the half width of the bounding cube.

The MolecularEntity will be contained in the cube [-L,+L].

References atoms, and L.

◆ center()

void MolecularEntity::center ( )

◆ get_atom()

const Atom & MolecularEntity::get_atom ( unsigned int  i) const

◆ inter_atomic_distance()

double MolecularEntity::inter_atomic_distance ( unsigned int  i,
unsigned int  j 
) const

References atoms, and distance().

Referenced by nuclear_repulsion_energy().

◆ natom()

int MolecularEntity::natom ( ) const
inline

◆ nuclear_attraction_potential()

double MolecularEntity::nuclear_attraction_potential ( double  x,
double  y,
double  z 
) const

◆ nuclear_charge_density()

double MolecularEntity::nuclear_charge_density ( double  x,
double  y,
double  z 
) const

◆ nuclear_repulsion_energy()

double MolecularEntity::nuclear_repulsion_energy ( ) const

References atoms, inter_atomic_distance(), and sum.

◆ print()

void MolecularEntity::print ( ) const

◆ read_file()

void MolecularEntity::read_file ( const std::string &  filename,
bool  fractional = false 
)

◆ serialize()

template<typename Archive >
void MolecularEntity::serialize ( Archive &  ar)
inline

References atoms, rcut, and rsqasymptotic.

◆ set_atom_coords()

void MolecularEntity::set_atom_coords ( unsigned int  i,
double  x,
double  y,
double  z 
)

References atoms.

◆ smallest_length_scale()

double MolecularEntity::smallest_length_scale ( ) const

◆ total_nuclear_charge()

double MolecularEntity::total_nuclear_charge ( ) const

Member Data Documentation

◆ atoms

std::vector<Atom> MolecularEntity::atoms
private

◆ rcut

std::vector<double> MolecularEntity::rcut
private

◆ rsqasymptotic

std::vector<double> MolecularEntity::rsqasymptotic
private

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