MADNESS  version 0.9
Public Member Functions | List of all members
MolecularEntity Class Reference

#include <mentity.h>

Public Member Functions

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

Constructor & Destructor Documentation

MolecularEntity::MolecularEntity ( )
inline

Makes a MolecularEntity with zero atoms.

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!

Member Function Documentation

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

Returns the half width of the bounding cube.

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

References mpfr::fabs(), L, and max.

void MolecularEntity::center ( )
const Atom & MolecularEntity::get_atom ( unsigned int  i) const
double MolecularEntity::inter_atomic_distance ( unsigned int  i,
unsigned int  j 
) const

References distance().

int MolecularEntity::natom ( ) const
inline
double MolecularEntity::nuclear_attraction_potential ( double  x,
double  y,
double  z 
) const
double MolecularEntity::nuclear_charge_density ( double  x,
double  y,
double  z 
) const
double MolecularEntity::nuclear_repulsion_energy ( ) const

References mpfr::sum().

void MolecularEntity::print ( ) const
void MolecularEntity::read_file ( const std::string &  filename,
bool  fractional = false 
)
template<typename Archive >
void MolecularEntity::serialize ( Archive &  ar)
inline
void MolecularEntity::set_atom_coords ( unsigned int  i,
double  x,
double  y,
double  z 
)
double MolecularEntity::smallest_length_scale ( ) const
double MolecularEntity::total_nuclear_charge ( ) const

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