Collaboration diagram for mpqc::UnitCell:

Public Member Functions

 UnitCell ()=default
 
 UnitCell (const KeyVal &kv)
 KeyVal constructor for a unit cell of a periodic lattice. More...
 
 UnitCell (const std::vector< Atom > &atoms, const Vector3d &abc, const Vector3d &ɑβɣ=Vector3d{default_angles.data()})
 
 UnitCell (const std::vector< Atom > &atoms, const std::array< Vector3d, 3 > &v_abc)
 
 UnitCell (std::istream &file_stream)
 Constructs UnitCell from a PBC-extended XYZ-format stream. More...
 
double nuclear_repulsion_energy (const Vector3i &RJ_max) const
 This computes the nuclear repulsion energy of the unit cell with other cell within a range. More...
 
virtual ~UnitCell ()=default
 
void in_units_of (const std::string &units) override
 Reinterprets coordinates of atoms and unit cell dimensions as having different units. More...
 
Vector3d abc () const
 This returns unit cell dimensions. More...
 
Vector3d MPQC_UTF8WRAP() ɑβɣ () const
 This returns unit cell angles. More...
 
const std::array< Vector3d, 3 > & v_abc () const
 This returns unit cell vectors (in lab frame) More...
 
int num_periodic_dimensions () const
 Determines the number of periodic dimensions (i.e. the number of dimensions with nonzero primitive vector length) More...
 
- Public Member Functions inherited from mpqc::Molecule
 Molecule ()=default
 
 Molecule (const Molecule &)=default
 
 Molecule (Molecule &&)=default
 
Moleculeoperator= (Molecule &&)=default
 
Moleculeoperator= (const Molecule &)=default
 
 Molecule (const KeyVal &kv)
 The KeyVal constructor. More...
 
 Molecule (std::istream &file_stream, bool sort_input=true, Vector3d const &sort_origin=Vector3d::Zero(), std::array< Vector3d, 3 > frame={ {Vector3d{1, 0, 0}, Vector3d{0, 1, 0}, Vector3d{0, 0, 1}}})
 Constructs Molecule from an XYZ-format stream. More...
 
 Molecule (std::vector< AtomBasedClusterable > c, bool sort_input=true)
 Constructor to build Molecule from a vector of clusterables. More...
 
 Molecule (const std::vector< Atom > &atoms)
 
virtual ~Molecule ()=default
 
void sort_from_point (Vector3d const &point)
 A function to sort the clusters from a given point. More...
 
void set_mass (double mass)
 Function to set the mass of the Molecule. More...
 
int64_t total_atomic_number () const
 
double mass () const
 Mass of the Molecule. More...
 
std::vector< AtomBasedClusterable >::const_iterator begin () const
 Iterator to the first clusterable in the Molecule. More...
 
std::vector< AtomBasedClusterable >::const_iterator end () const
 Iterator to one past the final clusterable in the Molecule. More...
 
int64_t nclusters () const
 Number of clusters in the Molecule. More...
 
std::vector< AtomBasedClusterable > const & clusterables () const
 Vector containing the Clusterable that make up the Molecule. More...
 
int64_t core_electrons () const
 Computes the number of core electrons in the Molecule. More...
 
double nuclear_repulsion_energy () const
 
std::vector< Atomatoms () const
 A vector of all atoms in the Molecule. More...
 
size_t natoms () const
 
Vector3d const & com () const
 Center of mass of the Molecule. More...
 
- Public Member Functions inherited from mpqc::DescribedClass
 DescribedClass ()=default
 
virtual ~DescribedClass ()
 
std::string class_key () const
 
- Public Member Functions inherited from mpqc::enable_shared_from_this< DescribedClass >
virtual ~enable_shared_from_this ()=default
 
std::shared_ptr< DescribedClassshared_from_this ()
 returns the pointer to this object More...
 
std::shared_ptr< std::add_const_t< DescribedClass > > shared_from_this () const
 returns the pointer to this object More...
 
- Public Member Functions inherited from mpqc::detail::virt_base_of_enable_shared_from_this
virtual ~virt_base_of_enable_shared_from_this ()=default
 
bool shared_from_this_possible () const
 
template<typename Target , typename = std::enable_if_t<!std::is_const_v<Target>>>
std::shared_ptr< Target > cast_shared_from_this_to ()
 returns the pointer to this cast to a particular type More...
 
template<typename Target >
std::shared_ptr< std::add_const_t< Target > > cast_shared_from_this_to () const
 returns the pointer to this cast to a particular type More...
 
- Public Member Functions inherited from mpqc::utility::Observable< Molecule >
std::shared_ptr< void *const > register_message (Observer *observer, std::function< void()> message) const
 
- Public Member Functions inherited from mpqc::enable_shared_from_this< Molecule >
virtual ~enable_shared_from_this ()=default
 
std::shared_ptr< Moleculeshared_from_this ()
 returns the pointer to this object More...
 
std::shared_ptr< std::add_const_t< Molecule > > shared_from_this () const
 returns the pointer to this object More...
 

Static Public Attributes

static constexpr double right_angle = M_PI / 4
 
static const std::array< double, 3 > default_dimensions {{0.0, 0.0, 0.0}}
 
static const std::array< double, 3 > default_angles
 

Additional Inherited Members

- Public Types inherited from mpqc::DescribedClass
typedef std::shared_ptr< DescribedClass >(* keyval_ctor_wrapper_type) (const KeyVal &)
 
- Public Types inherited from mpqc::utility::Observable< Molecule >
typedef std::map< void *, std::function< void()> > messages_type
 
- Static Public Member Functions inherited from mpqc::Molecule
static std::vector< AtomBasedClusterableread_xyz (std::istream &file, const std::array< Vector3d, 3 > &frame={ {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}})
 Reads atoms from an XYZ file. More...
 
- Static Public Member Functions inherited from mpqc::DescribedClass
static keyval_ctor_wrapper_type type_to_keyval_ctor (const std::string &type_name)
 
template<typename T >
static void register_keyval_ctor ()
 
template<typename T >
static bool is_registered ()
 
template<typename T >
static std::string class_key ()
 
static const keyval_ctor_registry_type & keyval_ctor_registry ()
 returns const ref to the keyval ctor registry More...
 
- Protected Member Functions inherited from mpqc::utility::Observable< Molecule >
void message ()
 

Constructor & Destructor Documentation

◆ UnitCell() [1/5]

mpqc::UnitCell::UnitCell ( )
default

◆ UnitCell() [2/5]

mpqc::UnitCell::UnitCell ( const KeyVal kv)

KeyVal constructor for a unit cell of a periodic lattice.

Parameters
kvThe KeyVal object will be queried for all keywords of Molecule, and the following keywords:
Keyword Type Default Description
abc array<array<real,3>,3> or array<real,3> {{0,0,0}, {0,0,0}, {0,0,0}} Specifies the first (a), second (b), and third dimensions (c) (in angstroms) of the unit cell, with zero indicating an infinite dimension; an alternative is to give the dimensions of the unit cell as a single vector
ɑβɣ array<real,3> {90,90,90} If abc specified the dimensions of the unit cell, this is queried for the values (in degrees) of angles ɑ (the angle between vectors b and c ), β (the angle between a and c ), and ɣ (the angle between a and b ); the default corresponds to an orthorhombic/tetragonal/cubic lattice
frame string or array<array<real,3>,3> lab if lab , assume that the atomic coordinates are given in the laboratory frame; if abc , assume that the coordinates are given in terms of the abc vectors; else use the explicitly-provided frame

example input:

"unitcell": {
"file_name": "water.xyz",
"sort_input": true,
"abc": [0.0, 0.0, 2.672359]
}

◆ UnitCell() [3/5]

mpqc::UnitCell::UnitCell ( const std::vector< Atom > &  atoms,
const Vector3d abc,
const Vector3d ɑβɣ = Vector3d{default_angles.data()} 
)

Constructs a UnitCell from a sequence of Atom objects atoms and the unit cell dimensions

Parameters
[in]atomsa sequence of atoms
[in]abcthe dimensions of the unit cell (in a.u.)
[in]ɑβɣthe unit cell angles (in radians)
Note
does not resort atoms, use Molecule::sort_from_point if needed

◆ UnitCell() [4/5]

mpqc::UnitCell::UnitCell ( const std::vector< Atom > &  atoms,
const std::array< Vector3d, 3 > &  v_abc 
)

Constructs a UnitCell from a sequence of Atom objects atoms and the unit cell vectors (in

Parameters
[in]atomsa sequence of atoms
[in]v_abcthe unit cell vectors
Note
does not resort atoms, use Molecule::sort_from_point if needed

◆ UnitCell() [5/5]

mpqc::UnitCell::UnitCell ( std::istream &  file_stream)

Constructs UnitCell from a PBC-extended XYZ-format stream.

Note
The unit cell vectors in PBC-extended XYZ file are specified as atoms with element symbols "AA", "BB", and "CC" (N.B. the element symbols are not case-sensitive).
This is a non-clustering ctor, and it does not resort atoms

◆ ~UnitCell()

virtual mpqc::UnitCell::~UnitCell ( )
virtualdefault

Member Function Documentation

◆ abc()

Vector3d mpqc::UnitCell::abc ( ) const
inline

This returns unit cell dimensions.

Returns
the unit cell dimensions, in atomic units

◆ in_units_of()

void mpqc::UnitCell::in_units_of ( const std::string &  units)
overridevirtual

Reinterprets coordinates of atoms and unit cell dimensions as having different units.

Converts current coordinates of atoms and unit cell dimensions to atomic units assuming that they are currently given in units

Parameters
[in]unitsthe units that the current Atom objects use; see UnitsFactory::make_unit

Reimplemented from mpqc::Molecule.

◆ nuclear_repulsion_energy()

double mpqc::UnitCell::nuclear_repulsion_energy ( const Vector3i RJ_max) const

This computes the nuclear repulsion energy of the unit cell with other cell within a range.

Note
this includes the intra-cell repulsion.
Parameters
RJ_maxthe range of nuclear repulsion interaction; all cells with [- RJ_max .. RJ_max] are included
Returns
nuclear repulsion energy

◆ num_periodic_dimensions()

int mpqc::UnitCell::num_periodic_dimensions ( ) const

Determines the number of periodic dimensions (i.e. the number of dimensions with nonzero primitive vector length)

Returns
the number of periodic dimensions

◆ v_abc()

const std::array<Vector3d, 3>& mpqc::UnitCell::v_abc ( ) const
inline

This returns unit cell vectors (in lab frame)

Returns
the unit cell vectors, in atomic units

◆ ɑβɣ()

Vector3d MPQC_UTF8WRAP() mpqc::UnitCell::ɑβɣ ( ) const
inline

This returns unit cell angles.

Returns
the unit cell angles, in radians

Member Data Documentation

◆ default_angles

const std::array< double, 3 > mpqc::UnitCell::default_angles
static
Initial value:

◆ default_dimensions

const std::array< double, 3 > mpqc::UnitCell::default_dimensions {{0.0, 0.0, 0.0}}
static

◆ right_angle

constexpr double mpqc::UnitCell::right_angle = M_PI / 4
staticconstexpr

The documentation for this class was generated from the following files:
static constexpr double right_angle
Definition: unit_cell.h:15