CASM  1.1.0
A Clusters Approach to Statistical Mechanics
PrimClex.cc
Go to the documentation of this file.
1 #include <memory>
2 
6 #include "casm/casm_io/Log.hh"
13 #include "casm/clex/Clexulator.hh"
32 
33 namespace CASM {
34 
35 BasicStructure read_prim(ProjectSettings const &project_settings) {
36  return read_prim(project_settings.dir().prim(),
37  project_settings.crystallography_tol());
38 }
39 
40 std::shared_ptr<Structure const> read_shared_prim(
41  ProjectSettings const &project_settings) {
42  return std::make_shared<Structure const>(read_prim(project_settings));
43 }
44 
47  typedef std::shared_ptr<PrimType const> PrimType_ptr;
48 
49  PrimClexData(ProjectSettings const &_project_settings,
50  std::shared_ptr<PrimType const> _shared_prim)
51  : settings(_project_settings), prim_ptr(_shared_prim) {
52  // Guarantee presence of symmetry info;
53  prim_ptr->factor_group();
54  }
55 
56  PrimClexData(const fs::path &_root)
59  // Guarantee presence of symmetry info;
60  prim_ptr->factor_group();
61  }
62 
64 
66 
70 
71  std::unique_ptr<DB::DatabaseHandler> db_handler;
72 
76  bool has_composition_axes = false;
78 
82 
86  mutable std::shared_ptr<PrimNeighborList> nlist;
87 
88  typedef std::string BasisSetName;
89  mutable std::map<BasisSetName, ClexBasisSpecs> basis_set_specs;
90  mutable std::map<BasisSetName, ClexBasis> clex_basis;
91  mutable std::map<BasisSetName, Clexulator> clexulator;
92  mutable std::map<ClexDescription, ECIContainer> eci;
93 };
94 
95 // **** Constructors ****
96 
98 PrimClex::PrimClex(ProjectSettings const &_project_settings,
99  std::shared_ptr<PrimType const> _shared_prim)
100  : m_data(new PrimClexData(_project_settings, _shared_prim)) {
101  m_data->settings.set_crystallography_tol(TOL);
102 
103  _init();
104 
105  return;
106 }
107 
111 PrimClex::PrimClex(const fs::path &_root) : m_data(new PrimClexData(_root)) {
112  _init();
113 }
114 
117 
122  auto struc_mol_name = xtal::struc_molecule_name(prim());
123  m_data->vacancy_allowed = false;
124  for (int i = 0; i < struc_mol_name.size(); ++i) {
125  if (xtal::is_vacancy(struc_mol_name[i])) {
126  m_data->vacancy_allowed = true;
127  m_data->vacancy_index = i;
128  }
129  }
130 
131  if (!has_dir()) {
132  return;
133  }
134 
135  bool read_settings = false;
136  bool read_composition = true;
137  bool read_chem_ref = true;
138  bool read_configs = true;
139  bool clear_clex = false;
140 
141  refresh(read_settings, read_composition, read_chem_ref, read_configs,
142  clear_clex);
143 }
144 
156 void PrimClex::refresh(bool read_settings, bool read_composition,
157  bool read_chem_ref, bool read_configs, bool clear_clex) {
158  if (read_settings) {
159  try {
160  m_data->settings = open_project_settings(dir().root_dir());
161  } catch (std::exception &e) {
162  err_log().error("reading project_settings.json");
163  err_log() << "file: " << dir().project_settings() << "\n" << std::endl;
164  throw e;
165  }
166  }
167 
168  if (read_composition) {
169  m_data->has_composition_axes = false;
170  auto comp_axes_path = dir().composition_axes();
171 
172  try {
173  if (fs::is_regular_file(comp_axes_path)) {
174  CompositionAxes opt = read_composition_axes(comp_axes_path);
175 
176  if (opt.has_current_axes()) {
177  m_data->has_composition_axes = true;
178  m_data->comp_converter = opt.curr;
179  }
180  }
181  } catch (std::exception &e) {
182  err_log().error("reading composition_axes.json");
183  err_log() << "file: " << comp_axes_path << "\n" << std::endl;
184  throw e;
185  }
186  }
187 
188  if (read_chem_ref) {
189  // read chemical reference
190  m_data->chem_ref.reset();
191  auto chem_ref_path =
192  dir().chemical_reference(m_data->settings.default_clex().calctype,
193  m_data->settings.default_clex().ref);
194 
195  try {
196  if (fs::is_regular_file(chem_ref_path)) {
197  m_data->chem_ref =
198  notstd::make_cloneable<ChemicalReference>(read_chemical_reference(
199  chem_ref_path, prim(), settings().lin_alg_tol()));
200  }
201  } catch (std::exception &e) {
202  err_log().error("reading chemical_reference.json");
203  err_log() << "file: " << chem_ref_path << "\n" << std::endl;
204  throw e;
205  }
206  }
207 
208  if (read_configs) {
209  if (m_data->db_handler) {
210  // lazy initialization means we just need to close, and the db will be
211  // re-opened when needed
212  m_data->db_handler->close();
213  }
214  }
215 
216  if (clear_clex) {
217  m_data->nlist.reset();
218  m_data->clex_basis.clear();
219  m_data->clexulator.clear();
220  m_data->eci.clear();
221  }
222 }
223 
224 ProjectSettings &PrimClex::settings() { return m_data->settings; }
225 
226 const ProjectSettings &PrimClex::settings() const { return m_data->settings; }
227 
228 bool PrimClex::has_dir() const { return settings().has_dir(); }
229 
230 const DirectoryStructure &PrimClex::dir() const { return settings().dir(); }
231 
233 double PrimClex::crystallography_tol() const { return prim().lattice().tol(); }
234 
235 // ** Composition accessors **
236 
239  return m_data->has_composition_axes;
240 }
241 
244  return m_data->comp_converter;
245 }
246 
247 // ** Chemical reference **
248 
251  return static_cast<bool>(m_data->chem_ref);
252 }
253 
256  return *m_data->chem_ref;
257 }
258 
259 // ** Prim and Orbitree accessors **
260 
262 const PrimClex::PrimType &PrimClex::prim() const { return *(m_data->prim_ptr); }
263 
264 std::shared_ptr<PrimClex::PrimType const> const &PrimClex::shared_prim() const {
265  return this->m_data->prim_ptr;
266 }
267 
268 Index PrimClex::n_basis() const { return prim().basis().size(); }
269 
270 std::shared_ptr<PrimNeighborList> const &PrimClex::shared_nlist() const {
271  // lazy neighbor list generation
272  if (!m_data->nlist) {
273  // construct nlist
274  m_data->nlist = std::make_shared<PrimNeighborList>(
275  settings().nlist_weight_matrix(),
276  settings().nlist_sublat_indices().begin(),
277  settings().nlist_sublat_indices().end());
278  }
279 
280  return m_data->nlist;
281 }
282 
284 
286 bool PrimClex::vacancy_allowed() const { return m_data->vacancy_allowed; }
287 
289 Index PrimClex::vacancy_index() const { return m_data->vacancy_index; }
290 
291 template <typename T>
293  return db_handler().template generic_db<T>();
294 }
295 
296 template <typename T>
298  return db_handler().template const_generic_db<T>();
299 }
300 
301 template <typename T>
303  return db_handler().template db<T>();
304 }
305 
306 template <typename T>
308  return db_handler().template const_db<T>();
309 }
310 
311 template <typename T>
312 DB::PropertiesDatabase &PrimClex::db_props(std::string calc_type) const {
313  return db_handler().template db_props<T>(calc_type);
314 }
315 
316 template <typename T>
318  std::string calc_type) const {
319  return db_handler().template const_db_props<T>(calc_type);
320 }
321 
323  if (!m_data->db_handler) {
324  m_data->db_handler = notstd::make_unique<DB::DatabaseHandler>(*this);
325  }
326  return *m_data->db_handler;
327 }
328 
330  if (!m_data->db_handler) {
331  m_data->db_handler = notstd::make_unique<DB::DatabaseHandler>(*this);
332  }
333  return *m_data->db_handler;
334 }
335 
336 bool PrimClex::has_basis_set_specs(std::string const &basis_set_name) const {
337  auto it = m_data->basis_set_specs.find(basis_set_name);
338  if (it == m_data->basis_set_specs.end()) {
339  return fs::exists(dir().bspecs(basis_set_name));
340  }
341  return true;
342 }
343 
345  std::string const &basis_set_name) const {
346  auto it = m_data->basis_set_specs.find(basis_set_name);
347  if (it == m_data->basis_set_specs.end()) {
348  throw_if_no_basis_set_specs(basis_set_name, dir());
349 
350  fs::path basis_set_specs_path = dir().bspecs(basis_set_name);
351  jsonParser bspecs_json{basis_set_specs_path};
352  ParsingDictionary<DoFType::Traits> const *dof_dict =
354 
355  InputParser<ClexBasisSpecs> parser{bspecs_json, shared_prim(), dof_dict};
356  std::stringstream ss;
357  ss << "Error: Invalid file " << basis_set_specs_path;
359  std::runtime_error{ss.str()});
360 
361  it = m_data->basis_set_specs.emplace(basis_set_name, *parser.value).first;
362  }
363  return it->second;
364 }
365 
366 Clexulator PrimClex::clexulator(std::string const &basis_set_name) const {
367  auto it = m_data->clexulator.find(basis_set_name);
368  if (it == m_data->clexulator.end()) {
369  if (!fs::exists(
370  dir().clexulator_src(settings().project_name(), basis_set_name))) {
371  std::stringstream ss;
372  ss << "Error loading clexulator " << basis_set_name
373  << ". No basis functions exist.";
374  throw std::runtime_error(ss.str());
375  }
376 
377  try {
379  make_clexulator(settings(), basis_set_name, nlist());
380  it = m_data->clexulator.emplace(basis_set_name, clexulator).first;
381  } catch (std::exception &e) {
382  // TODO: if this fails...
383  err_log() << "Error constructing Clexulator. Current settings: \n"
384  << std::endl;
386 
387  // TODO: then, try this
388  // std::cout << "Error constructing Clexulator. Current settings: \n" <<
389  // std::endl; Log tlog(std::cout);
390  // print_compiler_settings_summary(settings(), tlog);
391  // throw e;
392  }
393  }
394  return it->second;
395 }
396 
397 bool PrimClex::has_eci(const ClexDescription &key) const {
398  auto it = m_data->eci.find(key);
399  if (it == m_data->eci.end()) {
400  return fs::exists(
401  dir().eci(key.property, key.calctype, key.ref, key.bset, key.eci));
402  }
403  return true;
404 }
405 
406 const ECIContainer &PrimClex::eci(const ClexDescription &key) const {
407  auto it = m_data->eci.find(key);
408  if (it == m_data->eci.end()) {
409  fs::path eci_path =
410  dir().eci(key.property, key.calctype, key.ref, key.bset, key.eci);
411  if (!fs::exists(eci_path)) {
412  std::stringstream ss;
413  ss << "Error loading ECI. eci.json does not exist.\n Expected at: "
414  << eci_path.string();
415  throw std::runtime_error(ss.str());
416  }
417 
418  jsonParser eci_json{eci_path};
419  InputParser<ECIContainer> parser{eci_json};
420  std::stringstream ss;
421  ss << "Error loading ECI: Invalid file " << eci_path;
423  std::runtime_error{ss.str()});
424 
425  it = m_data->eci.emplace(key, *parser.value).first;
426  }
427  return it->second;
428 }
429 
432  WriteBasisSetDataImpl(std::shared_ptr<Structure const> _shared_prim,
433  ProjectSettings const &_settings,
434  std::string const &_basis_set_name,
435  ClexBasisSpecs const &_basis_set_specs,
436  PrimNeighborList &_prim_neighbor_list)
437  : shared_prim(_shared_prim),
438  settings(_settings),
439  basis_set_name(_basis_set_name),
440  basis_set_specs(_basis_set_specs),
441  prim_neighbor_list(_prim_neighbor_list) {}
442 
443  std::shared_ptr<Structure const> shared_prim;
445  std::string const &basis_set_name;
448 
449  template <typename OrbitVecType>
450  void operator()(OrbitVecType const &orbits) const {
451  const auto &dir = settings.dir();
452  ParsingDictionary<DoFType::Traits> const *dof_dict =
454  double xtal_tol = settings.crystallography_tol();
455 
456  // generate ClexBasis
457  ClexBasis clex_basis{shared_prim, basis_set_specs, dof_dict};
458  clex_basis.generate(orbits.begin(), orbits.end());
459 
460  // delete any existing data
462  dir.delete_bset_data(settings.project_name(), basis_set_name);
463 
464  jsonParser basis_set_specs_json;
465  to_json(basis_set_specs, basis_set_specs_json, *shared_prim, dof_dict);
466 
467  // write clust
468  fs::path clust_json_path = dir.clust(basis_set_name);
469  jsonParser clust_json;
470  OrbitPrinterOptions orbit_printer_options;
471  orbit_printer_options.print_invariant_group = true;
472  ProtoSitesPrinter sites_printer{orbit_printer_options};
473  write_clust(orbits.begin(), orbits.end(), clust_json, sites_printer,
474  basis_set_specs_json);
475  clust_json.write(clust_json_path);
476 
477  // write basis
478  fs::path basis_json_path = dir.basis(basis_set_name);
479  jsonParser basis_json;
480  write_site_basis_funcs(shared_prim, clex_basis, basis_json);
481  bool align = false;
482  ProtoFuncsPrinter funcs_printer{clex_basis, shared_prim->shared_structure(),
483  align, orbit_printer_options};
484  write_clust(orbits.begin(), orbits.end(), basis_json, funcs_printer,
485  basis_set_specs_json);
486  basis_json.write(basis_json_path);
487 
488  // write source code
489  fs::path clexulator_src_path =
490  dir.clexulator_src(settings.project_name(), basis_set_name);
491  std::string clexulator_name = settings.global_clexulator_name();
493  fs::ofstream outfile;
494  outfile.open(clexulator_src_path);
495  ClexBasisWriter clexwriter{*shared_prim, param_pack_type};
496  clexwriter.print_clexulator(clexulator_name, clex_basis, orbits,
497  prim_neighbor_list, outfile, xtal_tol);
498  outfile.close();
499  }
500 };
501 
504 void write_basis_set_data(std::shared_ptr<Structure const> shared_prim,
505  ProjectSettings const &settings,
506  std::string const &basis_set_name,
507  ClexBasisSpecs const &basis_set_specs,
509  auto const &cluster_specs = *basis_set_specs.cluster_specs;
510  Log &log = CASM::log();
511 
512  WriteBasisSetDataImpl writer{shared_prim, settings, basis_set_name,
513  basis_set_specs, prim_neighbor_list};
514  for_all_orbits(cluster_specs, log, writer);
515 }
516 
525  std::string const &basis_set_name,
527  throw_if_no_clexulator_src(settings.project_name(), basis_set_name,
528  settings.dir());
529  return Clexulator{settings.project_name() + "_Clexulator",
530  settings.dir().clexulator_dir(basis_set_name),
532  settings.so_options() + " -lcasm "};
533 }
534 
535 } // namespace CASM
536 
538 
539 // explicit template instantiations
540 #define INST_PrimClex(r, data, type) \
541  template DB::Database<type> &PrimClex::db<type>() const; \
542  template const DB::Database<type> &PrimClex::const_db<type>() const; \
543  template DB::ValDatabase<type> &PrimClex::generic_db<type>() const; \
544  template const DB::ValDatabase<type> &PrimClex::const_generic_db<type>() \
545  const;
546 
547 // explicit template instantiations
548 #define INST_PrimClexProps(r, data, type) \
549  template DB::PropertiesDatabase &PrimClex::db_props<type>( \
550  std::string calc_type) const; \
551  template const DB::PropertiesDatabase &PrimClex::const_db_props<type>( \
552  std::string calc_type) const;
553 
554 namespace CASM {
555 BOOST_PP_SEQ_FOR_EACH(INST_PrimClex, _, CASM_DB_TYPES)
556 BOOST_PP_SEQ_FOR_EACH(INST_PrimClexProps, _, CASM_DB_CONFIG_TYPES)
557 } // namespace CASM
#define CASM_DB_TYPES
#define CASM_DB_CONFIG_TYPES
std::shared_ptr< Structure const > shared_prim
PrimNeighborList const & prim_neighbor_list
#define INST_PrimClex(r, data, type)
Definition: PrimClex.cc:540
#define INST_PrimClexProps(r, data, type)
Definition: PrimClex.cc:548
Evaluates correlations.
Definition: Clexulator.hh:440
Convert between number of species per unit cell and parametric composition.
Provides access to all databases.
Generic interface for database of a particular CASM type.
Definition: Database.hh:221
Specification of CASM project directory structure.
fs::path prim() const
Return prim.json path.
fs::path project_settings() const
Return project_settings.json path.
fs::path chemical_reference(std::string calctype, std::string ref) const
Return chemical reference file path.
fs::path eci(std::string property, std::string calctype, std::string ref, std::string bset, std::string eci) const
Returns path to eci.json.
fs::path composition_axes() const
Return composition axes file path.
fs::path bspecs(std::string bset) const
Return basis function specs (bspecs.json) file path.
fs::path clexulator_dir(std::string bset) const
Returns path to directory containing clexulator files.
A sparse container of ECI values and their corresponding orbit indices.
Definition: ECIContainer.hh:12
Definition: Log.hh:48
void error(const std::string &what)
Definition: Log.hh:129
Parsing dictionary for obtaining the correct MoleculeAttribute given a name.
The PrimNeighborList gives the coordinates of UnitCell that are neighbors of the origin UnitCell.
Definition: NeighborList.hh:39
bool has_dir() const
Check if DirectoryStructure exists.
std::string global_clexulator_name() const
Name to use for clexulator printing.
DirectoryStructure const & dir() const
Access DirectoryStructure object. Throw if not set.
std::string compile_options() const
std::string project_name() const
Get project name.
std::string so_options() const
double crystallography_tol() const
Get current project crystallography tolerance.
Structure specifies the lattice and atomic basis of a crystal.
Definition: Structure.hh:30
const Lattice & lattice() const
Definition: Structure.hh:100
const std::vector< xtal::Site > & basis() const
Definition: Structure.hh:102
void write(const std::string &file_name, unsigned int indent=2, unsigned int prec=12) const
Write json to file.
Definition: jsonParser.cc:196
BasicStructure specifies the lattice and atomic basis of a crystal.
double tol() const
Definition: Lattice.hh:195
A 'cloneable_ptr' can be used in place of 'unique_ptr'.
bool is_vacancy(const std::string &name)
A vacancy is any Specie/Molecule with (name == "VA" || name == "va" || name == "Va")
Definition: Molecule.hh:187
const DB::PropertiesDatabase & const_db_props(std::string calc_type) const
Definition: PrimClex.cc:317
DB::Database< T > & db() const
Definition: PrimClex.cc:302
DB::DatabaseHandler & db_handler() const
Definition: PrimClex.cc:322
ProjectSettings & settings()
Definition: PrimClex.cc:224
Index vacancy_index() const
returns the index of vacancies in composition vectors
Definition: PrimClex.cc:289
bool has_chemical_reference() const
check if ChemicalReference object initialized
Definition: PrimClex.cc:250
std::shared_ptr< PrimNeighborList > const & shared_nlist() const
Access to the primitive neighbor list as a shared resource.
Definition: PrimClex.cc:270
double crystallography_tol() const
Get the crystallography_tol.
Definition: PrimClex.cc:233
const DirectoryStructure & dir() const
Access DirectoryStructure object. Throw if not set.
Definition: PrimClex.cc:230
std::unique_ptr< PrimClexData > m_data
Definition: PrimClex.hh:175
Index n_basis() const
const Access to number of basis atoms
Definition: PrimClex.cc:268
void write_basis_set_data(std::shared_ptr< Structure const > shared_prim, ProjectSettings const &settings, std::string const &basis_set_name, ClexBasisSpecs const &basis_set_specs, PrimNeighborList &prim_neighbor_list)
Definition: PrimClex.cc:504
bool has_dir() const
Check if DirectoryStructure exists.
Definition: PrimClex.cc:228
PrimClex(ProjectSettings const &_project_settings, std::shared_ptr< PrimType const > _shared_prim)
Initial construction of a PrimClex, from ProjectSettings and shared prim.
Definition: PrimClex.cc:98
bool vacancy_allowed() const
returns true if vacancy are an allowed species
Definition: PrimClex.cc:286
bool has_eci(const ClexDescription &key) const
Definition: PrimClex.cc:397
Clexulator make_clexulator(ProjectSettings const &settings, std::string const &basis_set_name, PrimNeighborList &prim_neighbor_list)
Definition: PrimClex.cc:524
void refresh(bool read_settings=false, bool read_composition=false, bool read_chem_ref=false, bool read_configs=false, bool clear_clex=false)
Reload PrimClex data from settings.
Definition: PrimClex.cc:156
ClexBasisSpecs const & basis_set_specs(std::string const &basis_set_name) const
Definition: PrimClex.cc:344
ECIContainer const & eci(const ClexDescription &key) const
Definition: PrimClex.cc:406
const DB::DatabaseHandler & const_db_handler() const
Definition: PrimClex.cc:329
DB::ValDatabase< T > & generic_db() const
Definition: PrimClex.cc:292
Clexulator clexulator(std::string const &basis_set_name) const
Definition: PrimClex.cc:366
DB::PropertiesDatabase & db_props(std::string calc_type) const
Definition: PrimClex.cc:312
const CompositionConverter & composition_axes() const
const Access CompositionConverter object
Definition: PrimClex.cc:243
PrimNeighborList & nlist() const
Access to the primitive neighbor list.
Definition: PrimClex.cc:283
std::shared_ptr< PrimType const > const & shared_prim() const
Access to the primitive Structure as a shared resource.
Definition: PrimClex.cc:264
bool has_composition_axes() const
check if CompositionConverter object initialized
Definition: PrimClex.cc:238
~PrimClex()
Necessary for "pointer to implementation".
Definition: PrimClex.cc:116
void _init()
Initialization routines.
Definition: PrimClex.cc:121
const DB::ValDatabase< T > & const_generic_db() const
Definition: PrimClex.cc:297
const ChemicalReference & chemical_reference() const
const Access ChemicalReference object
Definition: PrimClex.cc:255
bool has_basis_set_specs(std::string const &basis_set_name) const
Definition: PrimClex.cc:336
const DB::Database< T > & const_db() const
Definition: PrimClex.cc:307
const PrimType & prim() const
const Access to primitive Structure
Definition: PrimClex.cc:262
ProjectSettings open_project_settings(fs::path path_in_project)
void print_compiler_settings_summary(ProjectSettings const &set, Log &log)
Print summary of compiler settings, as for 'casm settings -l'.
std::vector< std::string > struc_molecule_name(BasicStructure const &_struc)
Returns an Array of each possible Molecule in this Structure.
TraitsDictionary & traits_dict()
Definition: DoFTraits.cc:39
Main CASM namespace.
Definition: APICommand.hh:8
jsonParser & write_clust(ClusterOrbitIterator begin, ClusterOrbitIterator end, jsonParser &json, Printer printer)
Write Orbit<SymCompareType> to JSON.
void for_all_orbits(ClusterSpecs const &cluster_specs, std::vector< IntegralCluster > const &generating_elements, FunctorType const &f)
void write_site_basis_funcs(std::shared_ptr< const Structure > prim_ptr, ClexBasis const &clex_basis, jsonParser &json)
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
void throw_if_no_basis_set_specs(std::string basis_set_name, DirectoryStructure const &dir)
Log & log()
Definition: Log.hh:424
void throw_if_no_clexulator_src(std::string project_name, std::string basis_set_name, DirectoryStructure const &dir)
const double TOL
Definition: definitions.hh:30
xtal::BasicStructure read_prim(fs::path filename, double xtal_tol, ParsingDictionary< AnisoValTraits > const *_aniso_val_dict=nullptr)
ChemicalReference read_chemical_reference(fs::path filename, const xtal::BasicStructure &prim, double tol)
Read chemical reference states from JSON file.
std::shared_ptr< Structure const > read_shared_prim(ProjectSettings const &project_settings)
Definition: PrimClex.cc:40
CompositionAxes read_composition_axes(fs::path _filename)
void report_and_throw_if_invalid(KwargsParser const &parser, Log &log, ErrorType error)
INDEX_TYPE Index
For long integer indexing:
Definition: definitions.hh:39
Log & err_log()
Definition: Log.hh:426
DirectoryStructure const & dir
Definition: settings.cc:136
PARAM_PACK_TYPE param_pack_type
Specify the Clexulator underlying data structure type.
Provides parameters for constructing a cluster expansion basis (ClexBasis)
notstd::cloneable_ptr< ClusterSpecs > cluster_specs
BasisFunctionSpecs basis_function_specs
Specifies a particular cluster expansion.
bool has_current_axes() const
True if curr_key is set.
CompositionConverter curr
Print Orbit<SymCompareType>, including only prototypes.
CompositionConverter comp_converter
Definition: PrimClex.cc:77
PrimClex::PrimType PrimType
Definition: PrimClex.cc:46
std::shared_ptr< PrimNeighborList > nlist
Definition: PrimClex.cc:86
std::unique_ptr< DB::DatabaseHandler > db_handler
Definition: PrimClex.cc:71
ProjectSettings settings
Definition: PrimClex.cc:65
notstd::cloneable_ptr< ChemicalReference > chem_ref
Definition: PrimClex.cc:81
std::map< BasisSetName, Clexulator > clexulator
Definition: PrimClex.cc:91
std::shared_ptr< PrimType const > PrimType_ptr
Definition: PrimClex.cc:47
PrimClexData(const fs::path &_root)
Definition: PrimClex.cc:56
std::map< BasisSetName, ClexBasis > clex_basis
Definition: PrimClex.cc:90
std::map< ClexDescription, ECIContainer > eci
Definition: PrimClex.cc:92
PrimClexData(ProjectSettings const &_project_settings, std::shared_ptr< PrimType const > _shared_prim)
Definition: PrimClex.cc:49
std::map< BasisSetName, ClexBasisSpecs > basis_set_specs
Definition: PrimClex.cc:89
Print Orbit<SymCompareType> & ClexBasis, including prototypes and prototype basis functions.
Write clust.json, basis.json, and clexulator source code, given orbits.
Definition: PrimClex.cc:431
ClexBasisSpecs const & basis_set_specs
Definition: PrimClex.cc:446
PrimNeighborList & prim_neighbor_list
Definition: PrimClex.cc:447
ProjectSettings const & settings
Definition: PrimClex.cc:444
WriteBasisSetDataImpl(std::shared_ptr< Structure const > _shared_prim, ProjectSettings const &_settings, std::string const &_basis_set_name, ClexBasisSpecs const &_basis_set_specs, PrimNeighborList &_prim_neighbor_list)
Definition: PrimClex.cc:432
std::string const & basis_set_name
Definition: PrimClex.cc:445
void operator()(OrbitVecType const &orbits) const
Definition: PrimClex.cc:450
std::shared_ptr< Structure const > shared_prim
Definition: PrimClex.cc:443