CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <Clexulator.hh>
Evaluates correlations.
CASM generates code for very efficient calculation of basis functions via the print_clexulator function. This source code may be compiled, linked, and used at runtime via Clexulator.
Definition at line 440 of file Clexulator.hh.
Public Types | |
typedef Clexulator_impl::Base::size_type | size_type |
Public Member Functions | |
Clexulator () | |
Clexulator (std::string name, fs::path dirpath, PrimNeighborList &nlist, std::string compile_options, std::string so_options) | |
Construct a Clexulator. More... | |
Clexulator (const Clexulator &B) | |
Copy constructor. More... | |
Clexulator (Clexulator &&B) | |
Move constructor. More... | |
~Clexulator () | |
Clexulator & | operator= (Clexulator B) |
Assignment operator. More... | |
bool | initialized () const |
Is runtime library loaded? More... | |
std::string | name () const |
Name. More... | |
size_type | nlist_size () const |
Neighbor list size. More... | |
size_type | corr_size () const |
Number of correlations. More... | |
size_type | n_point_corr () const |
Valid range for neighbor_ind argument to calc_point_corr. More... | |
ClexParamPack const & | param_pack () const |
Obtain const reference to abstract ClexParamPack object. More... | |
ClexParamPack & | param_pack () |
Obtain reference to abstract ClexParamPack object. More... | |
ClexParamKey const & | param_key (std::string const &_param_name) const |
Obtain ClexParamKey for a particular parameter. More... | |
void | set_evaluation (ClexParamKey const _param_key, std::vector< std::function< double(ConfigDoF const &)> > const &_basis_set) |
Alter evaluation of parameters specified by. More... | |
void | set_evaluation (ClexParamKey const _param_key, std::vector< std::function< double(std::vector< double > const &)> > const &_basis_set) |
Alter evaluation of parameters specified by. More... | |
void | set_evaluation (ClexParamKey const _param_key, std::string _eval_type) |
Alter evaluation of parameters specified by. More... | |
std::string | check_evaluation (ClexParamKey const _param_key) const |
Check evaluation mode of parameters specified by. More... | |
const std::set< UnitCell > & | neighborhood () const |
The UnitCellCoord involved in calculating the basis functions, relative origin UnitCell. More... | |
const std::set< UnitCell > & | neighborhood (size_type linear_orbit_index) const |
The UnitCellCoord involved in calculating the basis functions for a particular orbit, relative origin UnitCell. More... | |
const PrimNeighborList::Matrix3Type & | weight_matrix () const |
The weight matrix used for ordering the neighbor list. More... | |
void | calc_global_corr_contribution (ConfigDoF const &_input_configdof, long int const *_nlist_begin, long int const *_nlist_end, double *_corr_begin, double *_corr_end) const |
Calculate contribution to global correlations from one unit cell. More... | |
void | calc_global_corr_contribution (ConfigDoF const &_input_configdof, long int const *_nlist_begin, long int const *_nlist_end) const |
Calculate contribution to global correlations from one unit cell. More... | |
void | calc_restricted_global_corr_contribution (ConfigDoF const &_input_configdof, long int const *_nlist_begin, long int const *_nlist_end, double *_corr_begin, double *_corr_end, size_type const *_corr_ind_begin, size_type const *_corr_ind_end) const |
Calculate contribution to select global correlations from one unit cell. More... | |
void | calc_point_corr (ConfigDoF const &_input_configdof, long int const *_nlist_begin, long int const *_nlist_end, int neighbor_ind, double *_corr_begin, double *_corr_end) const |
Calculate point correlations about basis site 'neighbor_ind'. More... | |
void | calc_restricted_point_corr (ConfigDoF const &_input_configdof, long int const *_nlist_begin, long int const *_nlist_end, int neighbor_ind, double *_corr_begin, double *_corr_end, size_type const *_corr_ind_begin, size_type const *_corr_ind_end) const |
Calculate select point correlations about basis site 'neighbor_ind'. More... | |
void | calc_delta_point_corr (ConfigDoF const &_input_configdof, long int const *_nlist_begin, long int const *_nlist_end, int neighbor_ind, int occ_i, int occ_f, double *_corr_begin, double *_corr_end) const |
Calculate the change in point correlations due to changing an occupant. More... | |
void | calc_restricted_delta_point_corr (ConfigDoF const &_input_configdof, long int const *_nlist_begin, long int const *_nlist_end, int neighbor_ind, int occ_i, int occ_f, double *_corr_begin, double *_corr_end, size_type const *_corr_ind_begin, size_type const *_corr_ind_end) const |
Calculate the change in select point correlations due to changing an occupant. More... | |
Private Attributes | |
std::string | m_name |
std::unique_ptr< Clexulator_impl::Base > | m_clex |
std::shared_ptr< RuntimeLibrary > | m_lib |
Friends | |
void | swap (Clexulator &first, Clexulator &second) |
Swap. More... | |
Definition at line 442 of file Clexulator.hh.
|
inline |
Definition at line 444 of file Clexulator.hh.
CASM::Clexulator::Clexulator | ( | std::string | name, |
fs::path | dirpath, | ||
PrimNeighborList & | nlist, | ||
std::string | compile_options, | ||
std::string | so_options | ||
) |
Construct a Clexulator.
name | Class name for the Clexulator, typically 'X_Clexulator', with X referring to the system of interest (i.e. 'NiAl_Clexulator') |
dirpath | Directory containing the source code and compiled object file. |
nlist,A | PrimNeighborList to be updated to include the neighborhood of this Clexulator |
compile_options | Compilation options |
so_options | Shared library compilation options |
If 'name' is 'X_Clexulator', and 'dirpath' is '/path/to':
The Clexulator has shared ownership of the loaded library, so it is preferrable to duplicate the Clexulator using it's copy constructor rather than construct another using this constructor which will re-load the library.
Definition at line 32 of file Clexulator.cc.
CASM::Clexulator::Clexulator | ( | const Clexulator & | B | ) |
Copy constructor.
Definition at line 76 of file Clexulator.cc.
CASM::Clexulator::Clexulator | ( | Clexulator && | B | ) |
Move constructor.
Definition at line 83 of file Clexulator.cc.
CASM::Clexulator::~Clexulator | ( | ) |
Definition at line 85 of file Clexulator.cc.
|
inline |
Calculate the change in point correlations due to changing an occupant.
neighbor_ind Basis site index about which to calculate correlations
occ_i,occ_f Initial and final occupant variable
_corr_begin Pointer to beginning of data structure where difference in correlations are written
Call using:
Definition at line 679 of file Clexulator.hh.
|
inline |
Calculate contribution to global correlations from one unit cell.
_corr_begin | Pointer to beginning of data structure where correlations are written |
Call using:
Definition at line 576 of file Clexulator.hh.
|
inline |
Calculate contribution to global correlations from one unit cell.
_corr_begin | Pointer to beginning of data structure where correlations are written |
Call using:
Definition at line 552 of file Clexulator.hh.
|
inline |
Calculate point correlations about basis site 'neighbor_ind'.
neighbor_ind Basis site index about which to calculate correlations
_corr_begin Pointer to beginning of data structure where correlations are written
Call using:
Definition at line 626 of file Clexulator.hh.
|
inline |
Calculate the change in select point correlations due to changing an occupant.
neighbor_ind Basis site index about which to calculate correlations
occ_i,occ_f Initial and final occupant variable
_corr_begin Pointer to beginning of data structure where difference in correlations are written
_corr_ind_begin,_corr_ind_end | Pointers to range indicating which correlations should be calculated |
Call using:
Definition at line 716 of file Clexulator.hh.
|
inline |
Calculate contribution to select global correlations from one unit cell.
_corr_begin | Pointer to beginning of data structure where correlations are written |
_corr_ind_begin,_corr_ind_end | Pointers to range indicating which correlations should be calculated |
Call using:
Definition at line 603 of file Clexulator.hh.
|
inline |
Calculate select point correlations about basis site 'neighbor_ind'.
neighbor_ind Basis site index about which to calculate correlations
_corr_begin Pointer to beginning of data structure where correlations are written
_corr_ind_begin,_corr_ind_end | Pointers to range indicating which correlations should be calculated |
Call using:
Definition at line 651 of file Clexulator.hh.
std::string CASM::Clexulator::check_evaluation | ( | ClexParamKey const | _param_key | ) | const |
Check evaluation mode of parameters specified by.
_param_key,which | can be one of (at least) "READ" (i.e., read from ClexParamPack), "CUSTOM", or "DEFAULT" (i.e., the Clexulator's default implementation) |
Definition at line 131 of file Clexulator.cc.
|
inline |
Number of correlations.
Definition at line 480 of file Clexulator.hh.
|
inline |
Is runtime library loaded?
Definition at line 471 of file Clexulator.hh.
|
inline |
Valid range for neighbor_ind
argument to calc_point_corr.
Definition at line 486 of file Clexulator.hh.
|
inline |
Name.
Definition at line 474 of file Clexulator.hh.
The UnitCellCoord involved in calculating the basis functions, relative origin UnitCell.
Definition at line 523 of file Clexulator.hh.
|
inline |
The UnitCellCoord involved in calculating the basis functions for a particular orbit, relative origin UnitCell.
Definition at line 529 of file Clexulator.hh.
|
inline |
Neighbor list size.
Definition at line 477 of file Clexulator.hh.
Clexulator & CASM::Clexulator::operator= | ( | Clexulator | B | ) |
Assignment operator.
Definition at line 91 of file Clexulator.cc.
ClexParamKey const & CASM::Clexulator::param_key | ( | std::string const & | _param_name | ) | const |
Obtain ClexParamKey for a particular parameter.
Definition at line 97 of file Clexulator.cc.
|
inline |
Obtain reference to abstract ClexParamPack object.
Definition at line 492 of file Clexulator.hh.
|
inline |
Obtain const reference to abstract ClexParamPack object.
Definition at line 489 of file Clexulator.hh.
void CASM::Clexulator::set_evaluation | ( | ClexParamKey const | _param_key, |
std::string | _eval_type | ||
) |
Alter evaluation of parameters specified by.
_param_key,using | the string |
_eval_type,which | can be at least either "READ" (i.e., read from ClexParamPack) or "DEFAULT" (i.e., the Clexulator's default implementation) |
Definition at line 123 of file Clexulator.cc.
void CASM::Clexulator::set_evaluation | ( | ClexParamKey const | _param_key, |
std::vector< std::function< double(ConfigDoF const &)> > const & | _basis_set | ||
) |
Alter evaluation of parameters specified by.
_param_key,using | a custom double -> double function set |
Definition at line 104 of file Clexulator.cc.
void CASM::Clexulator::set_evaluation | ( | ClexParamKey const | _param_key, |
std::vector< std::function< double(std::vector< double > const &)> | , | ||
const & | _basis_set | ||
) |
Alter evaluation of parameters specified by.
_param_key,using | a custom int -> double function set |
Definition at line 112 of file Clexulator.cc.
|
inline |
The weight matrix used for ordering the neighbor list.
Definition at line 534 of file Clexulator.hh.
|
friend |
Swap.
Definition at line 462 of file Clexulator.hh.
|
private |
Definition at line 730 of file Clexulator.hh.
|
private |
Definition at line 731 of file Clexulator.hh.
|
private |
Definition at line 729 of file Clexulator.hh.