CASM  1.1.0
A Clusters Approach to Statistical Mechanics
ConfigDoFTools.cc
Go to the documentation of this file.
2 
4 #include "casm/clex/Supercell.hh"
6 
7 namespace CASM {
8 
11  return ConfigDoF(prim.basis().size(), volume, global_dof_info(prim),
12  local_dof_info(prim), prim.occupant_symrep_IDs(),
13  prim.lattice().tol());
14 }
15 
17 ConfigDoF make_configdof(Structure const &prim, Index volume, double tol) {
18  return ConfigDoF(prim.basis().size(), volume, global_dof_info(prim),
19  local_dof_info(prim), prim.occupant_symrep_IDs(), tol);
20 }
21 
23 std::unique_ptr<ConfigDoF> make_unique_configdof(Structure const &prim,
24  Index volume) {
25  return notstd::make_unique<ConfigDoF>(
26  prim.basis().size(), volume, global_dof_info(prim), local_dof_info(prim),
27  prim.occupant_symrep_IDs(), prim.lattice().tol());
28 }
29 
31 std::unique_ptr<ConfigDoF> make_unique_configdof(Structure const &prim,
32  Index volume, double tol) {
33  return notstd::make_unique<ConfigDoF>(
34  prim.basis().size(), volume, global_dof_info(prim), local_dof_info(prim),
35  prim.occupant_symrep_IDs(), tol);
36 }
37 
39 ConfigDoF make_configdof(Supercell const &supercell) {
40  return make_configdof(supercell.prim(), supercell.volume());
41 }
42 
44 ConfigDoF make_configdof(Supercell const &supercell, double tol) {
45  return make_configdof(supercell.prim(), supercell.volume(), tol);
46 }
47 
49 std::unique_ptr<ConfigDoF> make_unique_configdof(Supercell const &supercell) {
50  return make_unique_configdof(supercell.prim(), supercell.volume());
51 }
52 
54 std::unique_ptr<ConfigDoF> make_unique_configdof(Supercell const &supercell,
55  double tol) {
56  return make_unique_configdof(supercell.prim(), supercell.volume(), tol);
57 }
58 
59 } // namespace CASM
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
std::vector< SymGroupRepID > occupant_symrep_IDs() const
Definition: Structure.cc:128
Represents a supercell of the primitive parent crystal structure.
Definition: Supercell.hh:51
Index volume() const
Return number of primitive cells that fit inside of *this.
Definition: Supercell.cc:227
const Structure & prim() const
Definition: Supercell.cc:113
double tol() const
Definition: Lattice.hh:195
GenericScelFormatter< double > volume()
Definition: SupercellIO.cc:258
Main CASM namespace.
Definition: APICommand.hh:8
std::unique_ptr< ConfigDoF > make_unique_configdof(Structure const &prim, Index volume)
Construct zero-valued std::unique_ptr<ConfigDoF>
ConfigDoF make_configdof(Structure const &prim, Index volume)
Construct zero-valued ConfigDoF.
std::map< DoFKey, std::vector< CASM::DoFSetInfo > > local_dof_info(Structure const &_struc)
Definition: Structure.cc:395
INDEX_TYPE Index
For long integer indexing:
Definition: definitions.hh:39
std::map< DoFKey, CASM::DoFSetInfo > global_dof_info(Structure const &_struc)
Definition: Structure.cc:384