CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
CASM::Hull Class Reference

#include <Hull.hh>

Detailed Description

Generate and inspect the convex hull generated from a selection of Configurations.

  • The underlying Qhull object may not be copy constructed or assigned, so neither can this class. Instead use shared_ptr<Hull>.

Definition at line 15 of file Hull.hh.

Classes

struct  CompareVertex
 

Public Types

typedef VectorXdAttribute
< Configuration
CompCalculator
 
typedef ScalarAttribute
< Configuration
EnergyCalculator
 
typedef std::pair
< notstd::cloneable_ptr
< CompCalculator >
, notstd::cloneable_ptr
< EnergyCalculator > > 
CalculatorPair
 
typedef std::map< std::string,
CalculatorPair
CalculatorOptions
 

Public Member Functions

 Hull (const ConstConfigSelection &_selection, const CompCalculator &_comp_calculator=ConfigIO::SpeciesFrac(), const EnergyCalculator &_energy_calculator=ConfigIO::formation_energy_per_species(), double _singular_value_tol=1e-14, double _bottom_facet_tol=1e-14)
 Constructor for convex hull in composition/energy space. More...
 
const orgQhull::Qhull & data () const
 const Access the hull object directly More...
 
const Eigen::MatrixXd & reduce () const
 Orthogonal transformation matrix from a point in full comp/energy space to dimension-reduced comp/energy space. More...
 
const Eigen::Transpose< const
Eigen::MatrixXd > 
expand () const
 Orthogonal transformation matrix from a point in the dimension-reduced comp/energy space to the full comp/energy space. More...
 
const Configurationconfiguration (const orgQhull::QhullPoint &point) const
 Return the configuration corresponding to any point. More...
 
const Configurationconfiguration (const orgQhull::QhullVertex &vertex) const
 Return the configuration corresponding to a hull vertex. More...
 
Eigen::VectorXd mu (const orgQhull::QhullFacet facet) const
 Return the chemical potential corresponding to a facet. More...
 
const Configurationgroundstate (const Eigen::VectorXd &mu) const
 Return the 0K ground state corresponding to the input chemical potential. More...
 
double energy (const Configuration &config) const
 Use the EnergyCalculator to return the energy of a Configuration. More...
 
Eigen::VectorXd composition (const Configuration &config) const
 Use the CompCalculator to return the composition of a Configuration. More...
 
Eigen::VectorXd point (const Configuration &config) const
 Return a vector corresponding to the coordinate of a given configuration in full composition/energy space. More...
 
Eigen::VectorXd reduced_point (const Configuration &config) const
 Return a vector corresponding to the coordinate of a given configuration in the reduced composition/energy space. More...
 
double dist_to_hull (const Configuration &config) const
 The distance a Configuration is above the hull along the energy axis. More...
 
double dist_to_hull (Eigen::VectorXd _reduced_point) const
 The distance a point in the reduced composition/energy space is above the hull along the energy axis. More...
 

Private Attributes

orgQhull::Qhull m_hull
 
ConstConfigSelection m_selection
 
notstd::cloneable_ptr
< CompCalculator
m_comp_calculator
 
notstd::cloneable_ptr
< EnergyCalculator
m_energy_calculator
 
Eigen::MatrixXd m_reduce
 
std::vector< std::pair
< orgQhull::QhullFacet, double > > 
m_bottom_facets
 
std::set
< orgQhull::QhullVertex,
CompareVertex
m_bottom_vertices
 

Member Typedef Documentation

typedef std::map<std::string, CalculatorPair> CASM::Hull::CalculatorOptions

Definition at line 23 of file Hull.hh.

Constructor & Destructor Documentation

CASM::Hull::Hull ( const ConstConfigSelection _selection,
const CompCalculator _comp_calculator = ConfigIO::SpeciesFrac(),
const EnergyCalculator _energy_calculator = ConfigIO::formation_energy_per_species(),
double  _singular_value_tol = 1e-14,
double  _bottom_facet_tol = 1e-14 
)

Constructor for convex hull in composition/energy space.

Constructor for convex hull in atom_frac & Ef/atom space.

Definition at line 25 of file Hull.cc.

Member Function Documentation

Eigen::VectorXd CASM::Hull::composition ( const Configuration config) const

Use the CompCalculator to return the composition of a Configuration.

Definition at line 204 of file Hull.cc.

const Configuration & CASM::Hull::configuration ( const orgQhull::QhullPoint &  point) const

Return the configuration corresponding to any point.

Definition at line 135 of file Hull.cc.

const Configuration & CASM::Hull::configuration ( const orgQhull::QhullVertex &  vertex) const

Return the configuration corresponding to a hull vertex.

Definition at line 142 of file Hull.cc.

const orgQhull::Qhull & CASM::Hull::data ( ) const

const Access the hull object directly

Definition at line 116 of file Hull.cc.

double CASM::Hull::dist_to_hull ( const Configuration config) const

The distance a Configuration is above the hull along the energy axis.

Definition at line 223 of file Hull.cc.

double CASM::Hull::dist_to_hull ( Eigen::VectorXd  _reduced_point) const

The distance a point in the reduced composition/energy space is above the hull along the energy axis.

Definition at line 228 of file Hull.cc.

double CASM::Hull::energy ( const Configuration config) const

Use the EnergyCalculator to return the energy of a Configuration.

Definition at line 199 of file Hull.cc.

const Eigen::Transpose< const Eigen::MatrixXd > CASM::Hull::expand ( ) const

Orthogonal transformation matrix from a point in the dimension-reduced comp/energy space to the full comp/energy space.

Definition at line 130 of file Hull.cc.

const Configuration & CASM::Hull::groundstate ( const Eigen::VectorXd &  mu) const

Return the 0K ground state corresponding to the input chemical potential.

  • Units must be appropriate given the composition/energy space

Definition at line 165 of file Hull.cc.

Eigen::VectorXd CASM::Hull::mu ( const orgQhull::QhullFacet  facet) const

Return the chemical potential corresponding to a facet.

  • Calculated from the normal of the provided facet, so units depend on composition/energy space

Definition at line 149 of file Hull.cc.

Eigen::VectorXd CASM::Hull::point ( const Configuration config) const

Return a vector corresponding to the coordinate of a given configuration in full composition/energy space.

Return a vector corresponding to the coordinate of a given configuration in full comp/energy space.

Definition at line 210 of file Hull.cc.

const Eigen::MatrixXd & CASM::Hull::reduce ( ) const

Orthogonal transformation matrix from a point in full comp/energy space to dimension-reduced comp/energy space.

  • If the points in the provided configuration selection do not span the entire composition space, a principle component analysis identifies the subspace that is spanned and this matrix rotates points into that subspace

Definition at line 125 of file Hull.cc.

Eigen::VectorXd CASM::Hull::reduced_point ( const Configuration config) const

Return a vector corresponding to the coordinate of a given configuration in the reduced composition/energy space.

Definition at line 218 of file Hull.cc.

Member Data Documentation

std::vector< std::pair<orgQhull::QhullFacet, double> > CASM::Hull::m_bottom_facets
private

Definition at line 98 of file Hull.hh.

std::set<orgQhull::QhullVertex, CompareVertex> CASM::Hull::m_bottom_vertices
private

Definition at line 101 of file Hull.hh.

notstd::cloneable_ptr<CompCalculator> CASM::Hull::m_comp_calculator
private

Definition at line 89 of file Hull.hh.

notstd::cloneable_ptr<EnergyCalculator> CASM::Hull::m_energy_calculator
private

Definition at line 92 of file Hull.hh.

orgQhull::Qhull CASM::Hull::m_hull
private

Definition at line 83 of file Hull.hh.

Eigen::MatrixXd CASM::Hull::m_reduce
private

Definition at line 95 of file Hull.hh.

ConstConfigSelection CASM::Hull::m_selection
private

Definition at line 86 of file Hull.hh.


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