CASM  1.1.0
A Clusters Approach to Statistical Mechanics
Clexulator.hh
Go to the documentation of this file.
1 #ifndef CLEXULATOR_HH
2 #define CLEXULATOR_HH
3 #include <boost/filesystem/path.hpp>
4 #include <cstddef>
5 
6 #include "casm/clex/ConfigDoF.hh"
9 
10 namespace CASM {
19 class ClexParamPack;
20 class ClexParamKey;
21 
22 namespace Clexulator_impl {
23 
25 class Base {
26  public:
27  typedef unsigned int size_type;
28 
29  Base(size_type _nlist_size, size_type _corr_size, size_type _n_point_corr);
30 
31  virtual ~Base();
32 
34  size_type nlist_size() const { return m_nlist_size; }
35 
37  size_type corr_size() const { return m_corr_size; }
38 
44 
46  std::unique_ptr<Base> clone() const;
47 
49  virtual ClexParamPack const &param_pack() const = 0;
50 
52  virtual ClexParamPack &param_pack() = 0;
53 
55  ClexParamKey const &param_key(std::string const &_param_name) const;
56 
59  void set_evaluation(
60  ClexParamKey const &_param_key,
61  std::vector<std::function<double(ConfigDoF const &)> > const &_basis_set);
62 
65  void set_evaluation(
66  ClexParamKey const &_param_key,
67  std::vector<std::function<double(std::vector<double> const &)> > const
68  &_basis_set);
69 
72  // which can be at least either "READ" (i.e., read from ClexParamPack) or
73  // "DEFAULT" (i.e., the Clexulator's default implementation)
74  void set_evaluation(ClexParamKey const &_param_key,
75  std::string const &_eval_type);
76 
80  std::string check_evaluation(ClexParamKey const &_param_key) const;
81 
84  const std::set<UnitCell> &neighborhood() const { return m_neighborhood; }
85 
88  const std::set<UnitCell> &neighborhood(size_type linear_orbit_index) const {
89  return m_orbit_neighborhood[linear_orbit_index];
90  }
91 
94  return m_weight_matrix;
95  }
96 
112  void calc_global_corr_contribution(ConfigDoF const &_input_configdof,
113  long int const *_nlist_begin,
114  long int const *_nlist_end,
115  double *_corr_begin,
116  double *_corr_end) const {
117  _set_configdof(_input_configdof);
118  _set_nlist(_nlist_begin, _nlist_end);
119  _calc_global_corr_contribution(_corr_begin);
120  }
121 
135  void calc_global_corr_contribution(ConfigDoF const &_input_configdof,
136  long int const *_nlist_begin,
137  long int const *_nlist_end) const {
138  _set_configdof(_input_configdof);
139  _set_nlist(_nlist_begin, _nlist_end);
141  }
142 
164  ConfigDoF const &_input_configdof, long int const *_nlist_begin,
165  long int const *_nlist_end, double *_corr_begin, double *_corr_end,
166  size_type const *_corr_ind_begin, size_type const *_corr_ind_end) const {
167  _set_configdof(_input_configdof);
168  _set_nlist(_nlist_begin, _nlist_end);
169  _calc_restricted_global_corr_contribution(_corr_begin, _corr_ind_begin,
170  _corr_ind_end);
171  }
172 
187  void calc_point_corr(ConfigDoF const &_input_configdof,
188  long int const *_nlist_begin, long int const *_nlist_end,
189  int neighbor_ind, double *_corr_begin,
190  double *_corr_end) const {
191  _set_configdof(_input_configdof);
192  _set_nlist(_nlist_begin, _nlist_end);
193  _calc_point_corr(neighbor_ind, _corr_begin);
194  }
195 
218  void calc_restricted_point_corr(ConfigDoF const &_input_configdof,
219  long int const *_nlist_begin,
220  long int const *_nlist_end, int neighbor_ind,
221  double *_corr_begin, double *_corr_end,
222  size_type const *_corr_ind_begin,
223  size_type const *_corr_ind_end) const {
224  _set_configdof(_input_configdof);
225  _set_nlist(_nlist_begin, _nlist_end);
226  _calc_restricted_point_corr(neighbor_ind, _corr_begin, _corr_ind_begin,
227  _corr_ind_end);
228  }
229 
247  void calc_delta_point_corr(ConfigDoF const &_input_configdof,
248  long int const *_nlist_begin,
249  long int const *_nlist_end, int neighbor_ind,
250  int occ_i, int occ_f, double *_corr_begin,
251  double *_corr_end) const {
252  _set_configdof(_input_configdof);
253  _set_nlist(_nlist_begin, _nlist_end);
254  _calc_delta_point_corr(neighbor_ind, occ_i, occ_f, _corr_begin);
255  }
282  void calc_restricted_delta_point_corr(ConfigDoF const &_input_configdof,
283  long int const *_nlist_begin,
284  long int const *_nlist_end,
285  int neighbor_ind, int occ_i, int occ_f,
286  double *_corr_begin, double *_corr_end,
287  size_type const *_corr_ind_begin,
288  size_type const *_corr_ind_end) const {
289  _set_configdof(_input_configdof);
290  _set_nlist(_nlist_begin, _nlist_end);
291  _calc_restricted_delta_point_corr(neighbor_ind, occ_i, occ_f, _corr_begin,
292  _corr_ind_begin, _corr_ind_end);
293  }
294 
295  private:
297  virtual Base *_clone() const = 0;
298 
300  void _set_configdof(ConfigDoF const &_input_configdof) const {
301  if (m_config_ptr != &_input_configdof) {
302  m_config_ptr = &_input_configdof;
303  for (auto const &dof : m_local_dof_registry) {
304  m_local_dof_ptrs[dof.second] = &(_configdof().local_dof(dof.first));
305  }
306 
307  for (auto const &dof : m_global_dof_registry) {
308  m_global_dof_ptrs[dof.second] = &(_configdof().global_dof(dof.first));
309  }
310  }
311  }
312 
315 
318 
321 
322  std::map<std::string, Index> m_local_dof_registry;
323 
324  std::map<std::string, Index> m_global_dof_registry;
325 
326  protected:
327  virtual void _calc_global_corr_contribution() const = 0;
328 
329  virtual void _calc_global_corr_contribution(double *_corr_begin) const = 0;
330 
332  size_type const *_corr_ind_begin,
333  size_type const *_corr_ind_end) const = 0;
334 
336  double *_corr_begin, size_type const *_corr_ind_begin,
337  size_type const *_corr_ind_end) const = 0;
338 
339  virtual void _calc_point_corr(int neighbor_ind) const = 0;
340 
341  virtual void _calc_point_corr(int neighbor_ind,
342  double *_corr_begin) const = 0;
343 
345  int neighbor_ind, size_type const *_corr_ind_begin,
346  size_type const *_corr_ind_end) const = 0;
347 
349  int neighbor_ind, double *_corr_begin, size_type const *_corr_ind_begin,
350  size_type const *_corr_ind_end) const = 0;
351 
352  virtual void _calc_delta_point_corr(int neighbor_ind, int occ_i,
353  int occ_f) const = 0;
354 
355  virtual void _calc_delta_point_corr(int neighbor_ind, int occ_i, int occ_f,
356  double *_corr_begin) const = 0;
357 
359  int neighbor_ind, int occ_i, int occ_f, size_type const *_corr_ind_begin,
360  size_type const *_corr_ind_end) const = 0;
361 
363  int neighbor_ind, int occ_i, int occ_f, double *_corr_begin,
364  size_type const *_corr_ind_begin,
365  size_type const *_corr_ind_end) const = 0;
366 
367  void _register_local_dof(std::string const &_type_name, Index _ind) {
368  Index new_size = max(Index(_ind), Index(m_local_dof_ptrs.size())) + 1;
369  m_local_dof_ptrs.resize(new_size, nullptr);
370  m_global_dof_ptrs.resize(new_size, nullptr);
371  m_local_dof_registry[_type_name] = _ind;
372  }
373 
374  void _register_global_dof(std::string const &_type_name, Index _ind) {
375  Index new_size = max(Index(_ind), Index(m_local_dof_ptrs.size())) + 1;
376  m_local_dof_ptrs.resize(new_size, nullptr);
377  m_global_dof_ptrs.resize(new_size, nullptr);
378  m_global_dof_registry[_type_name] = _ind;
379  }
380 
382  ConfigDoF const &_configdof() const { return *m_config_ptr; }
383 
385  Index const &_l(Index nlist_ind) const { return *(m_nlist_ptr + nlist_ind); }
386 
395  void _set_nlist(const long int *_nlist_begin,
396  const long int *_nlist_end) const {
397  m_nlist_ptr = _nlist_begin;
398  // std::cout << "setting _nlist: ";
399  // for(;_nlist_begin!=_nlist_end; ++_nlist_begin)
400  // std::cout << *_nlist_begin << " ";
401  // std::cout << std::endl;
402  return;
403  }
404 
407  std::set<UnitCell> m_neighborhood;
408 
411  std::vector<std::set<UnitCell> > m_orbit_neighborhood;
412 
415 
416  mutable std::vector<LocalContinuousConfigDoFValues const *> m_local_dof_ptrs;
417 
418  mutable std::vector<GlobalContinuousConfigDoFValues const *>
420 
421  private:
423  mutable ConfigDoF const *m_config_ptr;
424 
426  mutable long int const *m_nlist_ptr;
427 };
428 } // namespace Clexulator_impl
429 
430 class RuntimeLibrary;
431 
440 class Clexulator {
441  public:
443 
445 
447  Clexulator(std::string name, fs::path dirpath, PrimNeighborList &nlist,
448  std::string compile_options, std::string so_options);
449 
451  Clexulator(const Clexulator &B);
452 
454  Clexulator(Clexulator &&B);
455 
456  ~Clexulator();
457 
460 
462  friend void swap(Clexulator &first, Clexulator &second) {
463  using std::swap;
464 
465  swap(first.m_name, second.m_name);
466  swap(first.m_clex, second.m_clex);
467  swap(first.m_lib, second.m_lib);
468  }
469 
471  bool initialized() const { return m_lib.get() != nullptr; }
472 
474  std::string name() const { return m_name; }
475 
477  size_type nlist_size() const { return m_clex->nlist_size(); }
478 
480  size_type corr_size() const { return m_clex->corr_size(); }
481 
486  size_type n_point_corr() const { return m_clex->n_point_corr(); }
487 
489  ClexParamPack const &param_pack() const { return m_clex->param_pack(); }
490 
492  ClexParamPack &param_pack() { return m_clex->param_pack(); }
493 
495  ClexParamKey const &param_key(std::string const &_param_name) const;
496 
499  void set_evaluation(
500  ClexParamKey const _param_key,
501  std::vector<std::function<double(ConfigDoF const &)> > const &_basis_set);
502 
505  void set_evaluation(
506  ClexParamKey const _param_key,
507  std::vector<std::function<double(std::vector<double> const &)> > const
508  &_basis_set);
509 
514  void set_evaluation(ClexParamKey const _param_key, std::string _eval_type);
515 
519  std::string check_evaluation(ClexParamKey const _param_key) const;
520 
523  const std::set<UnitCell> &neighborhood() const {
524  return m_clex->neighborhood();
525  }
526 
529  const std::set<UnitCell> &neighborhood(size_type linear_orbit_index) const {
530  return m_clex->neighborhood(linear_orbit_index);
531  }
532 
535  return m_clex->weight_matrix();
536  }
537 
552  void calc_global_corr_contribution(ConfigDoF const &_input_configdof,
553  long int const *_nlist_begin,
554  long int const *_nlist_end,
555  double *_corr_begin,
556  double *_corr_end) const {
557  m_clex->calc_global_corr_contribution(_input_configdof, _nlist_begin,
558  _nlist_end, _corr_begin, _corr_end);
559  }
560 
576  void calc_global_corr_contribution(ConfigDoF const &_input_configdof,
577  long int const *_nlist_begin,
578  long int const *_nlist_end) const {
579  m_clex->calc_global_corr_contribution(_input_configdof, _nlist_begin,
580  _nlist_end);
581  }
582 
604  ConfigDoF const &_input_configdof, long int const *_nlist_begin,
605  long int const *_nlist_end, double *_corr_begin, double *_corr_end,
606  size_type const *_corr_ind_begin, size_type const *_corr_ind_end) const {
607  m_clex->calc_restricted_global_corr_contribution(
608  _input_configdof, _nlist_begin, _nlist_end, _corr_begin, _corr_end,
609  _corr_ind_begin, _corr_ind_end);
610  }
611 
626  void calc_point_corr(ConfigDoF const &_input_configdof,
627  long int const *_nlist_begin, long int const *_nlist_end,
628  int neighbor_ind, double *_corr_begin,
629  double *_corr_end) const {
630  m_clex->calc_point_corr(_input_configdof, _nlist_begin, _nlist_end,
631  neighbor_ind, _corr_begin, _corr_end);
632  }
633 
651  void calc_restricted_point_corr(ConfigDoF const &_input_configdof,
652  long int const *_nlist_begin,
653  long int const *_nlist_end, int neighbor_ind,
654  double *_corr_begin, double *_corr_end,
655  size_type const *_corr_ind_begin,
656  size_type const *_corr_ind_end) const {
657  m_clex->calc_restricted_point_corr(
658  _input_configdof, _nlist_begin, _nlist_end, neighbor_ind, _corr_begin,
659  _corr_end, _corr_ind_begin, _corr_ind_end);
660  }
661 
679  void calc_delta_point_corr(ConfigDoF const &_input_configdof,
680  long int const *_nlist_begin,
681  long int const *_nlist_end, int neighbor_ind,
682  int occ_i, int occ_f, double *_corr_begin,
683  double *_corr_end) const {
684  m_clex->calc_delta_point_corr(_input_configdof, _nlist_begin, _nlist_end,
685  neighbor_ind, occ_i, occ_f, _corr_begin,
686  _corr_end);
687  }
688 
716  void calc_restricted_delta_point_corr(ConfigDoF const &_input_configdof,
717  long int const *_nlist_begin,
718  long int const *_nlist_end,
719  int neighbor_ind, int occ_i, int occ_f,
720  double *_corr_begin, double *_corr_end,
721  size_type const *_corr_ind_begin,
722  size_type const *_corr_ind_end) const {
723  m_clex->calc_restricted_delta_point_corr(
724  _input_configdof, _nlist_begin, _nlist_end, neighbor_ind, occ_i, occ_f,
725  _corr_begin, _corr_end, _corr_ind_begin, _corr_ind_end);
726  }
727 
728  private:
729  std::string m_name;
730  std::unique_ptr<Clexulator_impl::Base> m_clex;
731  std::shared_ptr<RuntimeLibrary> m_lib;
732 };
733 
735 } // namespace CASM
736 
737 #endif
Key for indexing clexulator parameters Contains pointer to implementation of the Key.
Abstract base class for reading/writing clexulator parameters Parameters are assumed to be stored as,...
Abstract base class for cluster expansion correlation calculations.
Definition: Clexulator.hh:25
size_type m_n_point_corr
Valid range for neighbor_ind argument to calc_point_corr.
Definition: Clexulator.hh:320
ClexParamKey const & param_key(std::string const &_param_name) const
Obtain ClexParamKey for a particular parameter.
Definition: Clexulator.cc:178
Base(size_type _nlist_size, size_type _corr_size, size_type _n_point_corr)
Definition: Clexulator.cc:137
virtual void _calc_point_corr(int neighbor_ind) const =0
void _register_local_dof(std::string const &_type_name, Index _ind)
Definition: Clexulator.hh:367
size_type m_nlist_size
The neighbor list size.
Definition: Clexulator.hh:314
const std::set< UnitCell > & neighborhood() const
The UnitCellCoord involved in calculating the basis functions, relative origin UnitCell.
Definition: Clexulator.hh:84
void _register_global_dof(std::string const &_type_name, Index _ind)
Definition: Clexulator.hh:374
long int const * m_nlist_ptr
Pointer to neighbor list.
Definition: Clexulator.hh:426
std::string check_evaluation(ClexParamKey const &_param_key) const
Check evaluation mode of parameters specified by.
Definition: Clexulator.cc:173
virtual void _calc_restricted_global_corr_contribution(size_type const *_corr_ind_begin, size_type const *_corr_ind_end) const =0
const std::set< UnitCell > & neighborhood(size_type linear_orbit_index) const
The UnitCellCoord involved in calculating the basis functions for a particular orbit,...
Definition: Clexulator.hh:88
std::map< std::string, Index > m_global_dof_registry
Definition: Clexulator.hh:324
std::vector< GlobalContinuousConfigDoFValues const * > m_global_dof_ptrs
Definition: Clexulator.hh:419
std::set< UnitCell > m_neighborhood
The UnitCellCoord involved in calculating the basis functions, relative origin UnitCell.
Definition: Clexulator.hh:407
const PrimNeighborList::Matrix3Type & weight_matrix() const
The weight matrix used for ordering the neighbor list.
Definition: Clexulator.hh:93
std::unique_ptr< Base > clone() const
Clone the Clexulator.
Definition: Clexulator.cc:146
virtual ClexParamPack const & param_pack() const =0
Obtain const reference to abstract ClexParamPack object.
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'.
Definition: Clexulator.hh:218
virtual void _calc_delta_point_corr(int neighbor_ind, int occ_i, int occ_f) const =0
size_type corr_size() const
Number of correlations.
Definition: Clexulator.hh:37
virtual void _calc_delta_point_corr(int neighbor_ind, int occ_i, int occ_f, double *_corr_begin) const =0
ConfigDoF const & _configdof() const
access reference to internally pointed ConfigDoF
Definition: Clexulator.hh:382
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.
Definition: Clexulator.hh:282
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.
Definition: Clexulator.hh:163
size_type nlist_size() const
Neighbor list size.
Definition: Clexulator.hh:34
std::vector< std::set< UnitCell > > m_orbit_neighborhood
The UnitCellCoord involved in calculating the basis functions for a particular orbit,...
Definition: Clexulator.hh:411
std::vector< LocalContinuousConfigDoFValues const * > m_local_dof_ptrs
Definition: Clexulator.hh:416
ConfigDoF const * m_config_ptr
Pointer to ConfigDoF for which evaluation is occuring.
Definition: Clexulator.hh:423
virtual void _calc_restricted_point_corr(int neighbor_ind, double *_corr_begin, size_type const *_corr_ind_begin, size_type const *_corr_ind_end) const =0
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'.
Definition: Clexulator.hh:187
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.
Definition: Clexulator.hh:135
size_type n_point_corr() const
Valid range for neighbor_ind argument to calc_point_corr.
Definition: Clexulator.hh:43
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.
Definition: Clexulator.hh:247
virtual void _calc_restricted_delta_point_corr(int neighbor_ind, int occ_i, int occ_f, size_type const *_corr_ind_begin, size_type const *_corr_ind_end) const =0
size_type m_corr_size
The number of correlations.
Definition: Clexulator.hh:317
virtual void _calc_global_corr_contribution(double *_corr_begin) const =0
virtual Base * _clone() const =0
Clone the Clexulator.
virtual void _calc_restricted_point_corr(int neighbor_ind, size_type const *_corr_ind_begin, size_type const *_corr_ind_end) const =0
virtual ClexParamPack & param_pack()=0
Obtain reference to abstract ClexParamPack object.
void _set_configdof(ConfigDoF const &_input_configdof) const
Set internal pointers to correct DoFs.
Definition: Clexulator.hh:300
virtual void _calc_global_corr_contribution() const =0
virtual void _calc_restricted_delta_point_corr(int neighbor_ind, int occ_i, int occ_f, double *_corr_begin, size_type const *_corr_ind_begin, size_type const *_corr_ind_end) const =0
Index const & _l(Index nlist_ind) const
access reference to internally pointed ConfigDoF
Definition: Clexulator.hh:385
PrimNeighborList::Matrix3Type m_weight_matrix
The weight matrix used for ordering the neighbor list.
Definition: Clexulator.hh:414
virtual void _calc_point_corr(int neighbor_ind, double *_corr_begin) const =0
virtual void _calc_restricted_global_corr_contribution(double *_corr_begin, size_type const *_corr_ind_begin, size_type const *_corr_ind_end) const =0
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.
Definition: Clexulator.hh:112
void set_evaluation(ClexParamKey const &_param_key, std::vector< std::function< double(ConfigDoF const &)> > const &_basis_set)
Alter evaluation of parameters specified by.
Definition: Clexulator.cc:152
void _set_nlist(const long int *_nlist_begin, const long int *_nlist_end) const
Set pointer to neighbor list.
Definition: Clexulator.hh:395
std::map< std::string, Index > m_local_dof_registry
Definition: Clexulator.hh:322
Evaluates correlations.
Definition: Clexulator.hh:440
const PrimNeighborList::Matrix3Type & weight_matrix() const
The weight matrix used for ordering the neighbor list.
Definition: Clexulator.hh:534
Clexulator & operator=(Clexulator B)
Assignment operator.
Definition: Clexulator.cc:91
size_type corr_size() const
Number of correlations.
Definition: Clexulator.hh:480
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.
Definition: Clexulator.hh:603
ClexParamKey const & param_key(std::string const &_param_name) const
Obtain ClexParamKey for a particular parameter.
Definition: Clexulator.cc:97
ClexParamPack const & param_pack() const
Obtain const reference to abstract ClexParamPack object.
Definition: Clexulator.hh:489
Clexulator_impl::Base::size_type size_type
Definition: Clexulator.hh:442
void set_evaluation(ClexParamKey const _param_key, std::vector< std::function< double(ConfigDoF const &)> > const &_basis_set)
Alter evaluation of parameters specified by.
Definition: Clexulator.cc:104
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.
Definition: Clexulator.hh:576
ClexParamPack & param_pack()
Obtain reference to abstract ClexParamPack object.
Definition: Clexulator.hh:492
friend void swap(Clexulator &first, Clexulator &second)
Swap.
Definition: Clexulator.hh:462
std::unique_ptr< Clexulator_impl::Base > m_clex
Definition: Clexulator.hh:730
std::string name() const
Name.
Definition: Clexulator.hh:474
std::string m_name
Definition: Clexulator.hh:729
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.
Definition: Clexulator.hh:552
size_type n_point_corr() const
Valid range for neighbor_ind argument to calc_point_corr.
Definition: Clexulator.hh:486
std::string check_evaluation(ClexParamKey const _param_key) const
Check evaluation mode of parameters specified by.
Definition: Clexulator.cc:131
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'.
Definition: Clexulator.hh:651
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.
Definition: Clexulator.hh:716
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'.
Definition: Clexulator.hh:626
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.
Definition: Clexulator.hh:679
const std::set< UnitCell > & neighborhood() const
The UnitCellCoord involved in calculating the basis functions, relative origin UnitCell.
Definition: Clexulator.hh:523
size_type nlist_size() const
Neighbor list size.
Definition: Clexulator.hh:477
const std::set< UnitCell > & neighborhood(size_type linear_orbit_index) const
The UnitCellCoord involved in calculating the basis functions for a particular orbit,...
Definition: Clexulator.hh:529
std::shared_ptr< RuntimeLibrary > m_lib
Definition: Clexulator.hh:731
bool initialized() const
Is runtime library loaded?
Definition: Clexulator.hh:471
GlobalContinuousConfigDoFValues const & global_dof(DoFKey const &_key) const
Definition: ConfigDoF.cc:69
LocalContinuousConfigDoFValues const & local_dof(DoFKey const &_key) const
Definition: ConfigDoF.cc:124
The PrimNeighborList gives the coordinates of UnitCell that are neighbors of the origin UnitCell.
Definition: NeighborList.hh:39
Eigen::Matrix3l Matrix3Type
Definition: NeighborList.hh:44
Write, compile, load and use code at runtime.
Main CASM namespace.
Definition: APICommand.hh:8
void swap(ConfigDoF &A, ConfigDoF &B)
Definition: ConfigDoF.cc:260
INDEX_TYPE Index
For long integer indexing:
Definition: definitions.hh:39
T max(const T &A, const T &B)
Definition: CASM_math.hh:95