CASM  1.1.0
A Clusters Approach to Statistical Mechanics
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 17 of file Hull.hh.

Classes

struct  CompareVertex
 

Public Types

typedef VectorXdAttribute< ConfigurationCompCalculator
 
typedef ScalarAttribute< ConfigurationEnergyCalculator
 
typedef std::pair< notstd::cloneable_ptr< CompCalculator >, notstd::cloneable_ptr< EnergyCalculator > > CalculatorPair
 
typedef std::map< std::string, CalculatorPairCalculatorOptions
 

Public Member Functions

 Hull (const DB::Selection< Configuration > &_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
 
DB::Selection< Configurationm_selection
 
notstd::cloneable_ptr< CompCalculatorm_comp_calculator
 
notstd::cloneable_ptr< EnergyCalculatorm_energy_calculator
 
Eigen::MatrixXd m_reduce
 
std::vector< std::pair< orgQhull::QhullFacet, double > > m_bottom_facets
 
std::set< orgQhull::QhullVertex, CompareVertexm_bottom_vertices
 

Member Typedef Documentation

◆ CalculatorOptions

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

Definition at line 24 of file Hull.hh.

◆ CalculatorPair

◆ CompCalculator

◆ EnergyCalculator

Constructor & Destructor Documentation

◆ Hull()

CASM::Hull::Hull ( const DB::Selection< Configuration > &  _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 27 of file Hull.cc.

Member Function Documentation

◆ composition()

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

Use the CompCalculator to return the composition of a Configuration.

Definition at line 211 of file Hull.cc.

◆ configuration() [1/2]

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

Return the configuration corresponding to any point.

Definition at line 137 of file Hull.cc.

◆ configuration() [2/2]

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

Return the configuration corresponding to a hull vertex.

Definition at line 145 of file Hull.cc.

◆ data()

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

const Access the hull object directly

Definition at line 119 of file Hull.cc.

◆ dist_to_hull() [1/2]

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 231 of file Hull.cc.

◆ dist_to_hull() [2/2]

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 237 of file Hull.cc.

◆ energy()

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

Use the EnergyCalculator to return the energy of a Configuration.

Definition at line 206 of file Hull.cc.

◆ expand()

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 132 of file Hull.cc.

◆ groundstate()

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 173 of file Hull.cc.

◆ mu()

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 154 of file Hull.cc.

◆ point()

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 217 of file Hull.cc.

◆ reduce()

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 128 of file Hull.cc.

◆ reduced_point()

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 226 of file Hull.cc.

Member Data Documentation

◆ m_bottom_facets

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

Definition at line 106 of file Hull.hh.

◆ m_bottom_vertices

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

Definition at line 109 of file Hull.hh.

◆ m_comp_calculator

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

Definition at line 95 of file Hull.hh.

◆ m_energy_calculator

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

Definition at line 98 of file Hull.hh.

◆ m_hull

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

Definition at line 89 of file Hull.hh.

◆ m_reduce

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

Definition at line 102 of file Hull.hh.

◆ m_selection

DB::Selection<Configuration> CASM::Hull::m_selection
private

Definition at line 92 of file Hull.hh.


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