mpqc::AtomBasedCluster Class Reference

Documentation

is the unit that holds a collection of atom based clusterables that go together.

AtomBasedCluster will hold a vector of clusterables that all belong together. To update the center of the cluster compute_com must be called, this is to avoid computing a new center of mass (COM) every time a clusterable is added.

Public Member Functions

 AtomBasedCluster ()=default
 
 AtomBasedCluster (const AtomBasedCluster &c)=default
 
AtomBasedClusteroperator= (const AtomBasedCluster &c)=default
 
 AtomBasedCluster (AtomBasedCluster &&c)=default
 
AtomBasedClusteroperator= (AtomBasedCluster &&c)=default
 
 AtomBasedCluster (std::vector< AtomBasedClusterable > const &elems)
 
 AtomBasedCluster (std::vector< AtomBasedClusterable > &&elems)
 
template<typename... Cs>
 AtomBasedCluster (Cs... cs)
 
template<typename T >
void add_clusterable (T t)
 
int64_t size () const
 
int64_t total_atomic_number () const
 
double mass () const
 
std::vector< Atomatoms () const
 
size_t natoms () const
 
void clear ()
 
void set_com (Vector3d point)
 sets the center equal to a point. More...
 
void update_cluster ()
 will update the center based on the current elements. More...
 
Vector3d const & com () const
 
std::vector< AtomBasedClusterable >::const_iterator begin () const
 begin returns the begin iterator to the vector of clusterables. More...
 
std::vector< AtomBasedClusterable >::const_iterator end () const
 end returns the end iterator to the vector of clusterables More...
 

Friends

void update (AtomBasedCluster &abc, const std::vector< Atom > &atoms, size_t &pos)
 
void apply (AtomBasedCluster &abc, const std::function< void(Atom &)> &op)
 

Constructor & Destructor Documentation

◆ AtomBasedCluster() [1/6]

mpqc::AtomBasedCluster::AtomBasedCluster ( )
default

◆ AtomBasedCluster() [2/6]

mpqc::AtomBasedCluster::AtomBasedCluster ( const AtomBasedCluster c)
default

◆ AtomBasedCluster() [3/6]

mpqc::AtomBasedCluster::AtomBasedCluster ( AtomBasedCluster &&  c)
default

◆ AtomBasedCluster() [4/6]

mpqc::AtomBasedCluster::AtomBasedCluster ( std::vector< AtomBasedClusterable > const &  elems)
inlineexplicit

◆ AtomBasedCluster() [5/6]

mpqc::AtomBasedCluster::AtomBasedCluster ( std::vector< AtomBasedClusterable > &&  elems)
inlineexplicit

◆ AtomBasedCluster() [6/6]

template<typename... Cs>
mpqc::AtomBasedCluster::AtomBasedCluster ( Cs...  cs)
inlineexplicit

Member Function Documentation

◆ add_clusterable()

template<typename T >
void mpqc::AtomBasedCluster::add_clusterable ( t)
inline

◆ atoms()

std::vector< Atom > mpqc::AtomBasedCluster::atoms ( ) const

◆ begin()

std::vector<AtomBasedClusterable>::const_iterator mpqc::AtomBasedCluster::begin ( ) const
inline

begin returns the begin iterator to the vector of clusterables.

◆ clear()

void mpqc::AtomBasedCluster::clear ( )
inline

◆ com()

Vector3d const& mpqc::AtomBasedCluster::com ( ) const
inline

◆ end()

std::vector<AtomBasedClusterable>::const_iterator mpqc::AtomBasedCluster::end ( ) const
inline

end returns the end iterator to the vector of clusterables

◆ mass()

double mpqc::AtomBasedCluster::mass ( ) const
inline

◆ natoms()

size_t mpqc::AtomBasedCluster::natoms ( ) const

◆ operator=() [1/2]

AtomBasedCluster& mpqc::AtomBasedCluster::operator= ( AtomBasedCluster &&  c)
default

◆ operator=() [2/2]

AtomBasedCluster& mpqc::AtomBasedCluster::operator= ( const AtomBasedCluster c)
default

◆ set_com()

void mpqc::AtomBasedCluster::set_com ( Vector3d  point)
inline

sets the center equal to a point.

◆ size()

int64_t mpqc::AtomBasedCluster::size ( ) const
inline

◆ total_atomic_number()

int64_t mpqc::AtomBasedCluster::total_atomic_number ( ) const
inline

◆ update_cluster()

void mpqc::AtomBasedCluster::update_cluster ( )

will update the center based on the current elements.

This is done as a separate step because it would be inefficent to update after each addition of a AtomBasedClusterable

Friends And Related Function Documentation

◆ apply

void apply ( AtomBasedCluster abc,
const std::function< void(Atom &)> &  op 
)
friend

applies a function to each atom in AtomBasedCluster

Parameters
abcthe AtomBasedCluster object
opa function taking non-const lvalue ref to Atom and returning void, stored in std::function

◆ update

void update ( AtomBasedCluster abc,
const std::vector< Atom > &  atoms,
size_t &  pos 
)
friend

updates an AtomBasedCluster using a vector of Atom's

Parameters
abcthe AtomBasedCluster object
atomsthe vector of Atom objects
posthe index of the next Atom object in Atoms to be used

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