MADNESS 0.10.1
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 Atom & get_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< Atom > atoms
std::vector< double > rcut
std::vector< double > rsqasymptotic

Constructor & Destructor Documentation

◆ MolecularEntity() [1/2]

MolecularEntity::MolecularEntity ( )
inline

Makes a MolecularEntity with zero atoms.

References 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 ( )

Moves the center of nuclear charge to the origin.

References atoms.

Referenced by test_nuclear_energy(), test_nuclear_potential(), test_nuclear_potential2(), test_nuclear_potential3(), and test_nuclear_potential_big_unit_cell().

◆ get_atom()

◆ 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()

◆ 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()

◆ read_file()

◆ 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()

Member Data Documentation

◆ atoms

◆ 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: