17 m_has_deformation(false),
27 m_has_deformation(false),
36 m_displacement(_disp),
37 m_deformation(_deformation),
38 m_has_deformation(false),
41 std::cerr <<
"CRITICAL ERROR: Attempting to initialize ConfigDoF with data structures of incompatible size: \n"
88 if(
m_N != new_occupation.
size()) {
89 std::cerr <<
"CRITICAL ERROR: In ConfigDoF::set_occupation(), attempting to set occupation to size " << new_occupation.
size() <<
",\n"
90 <<
" which does not match initialized size of ConfigDoF -> " <<
size() <<
"\n"
104 m_N = new_displacement.cols();
106 if(
m_N != new_displacement.cols()) {
107 std::cerr <<
"CRITICAL ERROR: In ConfigDoF::set_displacement(), attempting to set displacement to size " << new_displacement.cols() <<
",\n"
108 <<
" which does not match initialized size of ConfigDoF -> " <<
size() <<
"\n"
146 std::cerr <<
"CRITICAL ERROR: In ConfigDoF::from_json(), parsing displacement having size " <<
displacement().cols() <<
",\n"
147 <<
" which does not match initialized size of ConfigDoF -> " <<
size() <<
"\n"
188 dof.
disp(i) = new_disp.col(tperm[i]);
203 int scel_vol = scel.
volume();
215 std::vector<double> tcorr(clexulator.
corr_size(), 0.0);
218 for(
int v = 0; v < scel_vol; v++) {
227 for(
int i = 0; i < tcorr.size(); i++) {
228 correlations[i] += tcorr[i];
234 for(
int i = 0; i < clexulator.
corr_size(); i++) {
235 correlations[i] /= (double) scel_vol;
245 int scel_vol = scel.
volume();
260 for(
int v = 0; v < scel_vol; v++) {
268 correlations += tcorr;
272 correlations /= (double) scel_vol;
287 for(
Index i = 0; i < configdof.
size(); i++) {
288 num_each_molecule[ convert[ scel.
get_b(i) ][ configdof.
occ(i)] ]++;
291 return num_each_molecule;
304 for(
Index i = 0; i < configdof.
size(); i++) {
305 num_each_molecule(convert[ scel.
get_b(i) ][ configdof.
occ(i)])++;
308 return num_each_molecule;
ReturnArray< int > get_num_each_molecule(const ConfigDoF &configdof, const Supercell &scel)
Returns num_each_molecule[ molecule_type], where 'molecule_type' is ordered as Structure::get_struc_m...
void from_json(ClexDescription &desc, const jsonParser &json)
void set_displacement(const displacement_matrix_t &_displacement)
bool get_if(T &t, const std::string &key, Args...args) const
const Structure & get_prim() const
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
std::vector< Molecule > get_struc_molecule() const
Returns an Array of each possible Molecule in this Structure.
Array< int > & _occupation()
Correlation correlations(const ConfigDoF &configdof, const Supercell &scel, Clexulator &clexulator)
Returns correlations using 'clexulator'. Supercell needs a correctly populated neighbor list...
size_type corr_size() const
Number of correlations.
void swap(ConfigDoF &RHS)
void from_json(const jsonParser &json)
Represents a supercell of the primitive parent crystal structure.
void swap(Array< T > &RHS)
Index size() const
*** ACCESSORS ***
const Eigen::Matrix3d & deformation() const
displacement_matrix_t & _displacement()
void swap(ConfigDoF &A, ConfigDoF &B)
Eigen::VectorXi get_num_each_molecule_vec(const ConfigDoF &configdof, const Supercell &scel)
Returns num_each_molecule(molecule_type), where 'molecule_type' is ordered as Structure::get_struc_mo...
Eigen::VectorXd comp_n(const ConfigDoF &configdof, const Supercell &scel)
Returns comp_n, the number of each molecule per primitive cell, ordered as Structure::get_struc_molec...
const matrix_type & matrix() const
Const access of entire cartesian symmetry matrix.
void set_config_occ(const int *_occ_ptr)
Set pointer to data structure containing occupation variables.
void calc_global_corr_contribution(double *corr_begin) const
Calculate contribution to global correlations from one unit cell.
const SuperNeighborList & nlist() const
Returns the SuperNeighborList.
EigenIndex Index
For long integer indexing:
Index volume() const
Return number of primitive cells that fit inside of *this.
A container class for the different degrees of freedom a Configuration might have.
jsonParser & to_json(jsonParser &json) const
std::vector< std::vector< Index > > get_index_converter(const Structure &struc, std::vector< Molecule > mol_list)
Helper Functions.
void set_deformation(const Eigen::Matrix3d &_deformation)
set_deformation sets ConfigDoF::has_deformation() to true
Index m_N
Number of sites in the Configuration.
Eigen::VectorXd Correlation
void clear_displacement()
bool contains(const std::string &name) const
Return true if JSON object contains 'name'.
const displacement_matrix_t & displacement() const
const Array< int > & occupation() const
Eigen::Matrix3d & _deformation()
bool has_deformation() const
Eigen::MatrixXd displacement_matrix_t
void set_nlist(const long int *_nlist_ptr)
Set pointer to neighbor list.
const std::vector< size_type > & sites(size_type unitcell_index) const
const Access the list of sites neighboring a particular unit cell
displacement_t disp(Index i)
Index get_b(Index i) const
static jsonParser object()
Returns an empty json object.
Eigen::VectorXd correlations_vec(const ConfigDoF &configdof, const Supercell &scel, Clexulator &clexulator)
Returns correlations using 'clexulator'. Supercell needs a correctly populated neighbor list...
Object & apply(const Transform &f, Object &obj, Args &&...args)
void set_occupation(const Array< int > &_occupation)
Permutation combined_permute() const
Returns the combination of factor_group permutation and translation permutation.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ConfigDoF(Index N=0, double _tol=TOL)
fixes alignment of m_deformation