3 #include <boost/filesystem.hpp>
4 #include <boost/filesystem/fstream.hpp>
26 throw std::runtime_error(std::string(
"Error in build_project:") +
27 " Project settings do not have a root dir.");
31 throw std::runtime_error(std::string(
"Error in build_project:") +
32 " Project already exists at '" +
33 checkroot.string() +
"'");
38 log().
indent() <<
"Creating CASM project directory tree at: "
89 std::string project_name) {
92 settings.set_nlist_weight_matrix(W);
95 settings.set_required_properties(
"Configuration",
"default",
101 std::string project_name,
115 std::set<int> sublat_indices;
116 for (
int b = 0; b < prim.
basis().size(); ++b) {
117 if (prim.
basis()[b].occupant_dof().size() >= 2 ||
118 prim.
basis()[b].dof_size() > 0) {
119 sublat_indices.insert(b);
122 return sublat_indices;
Specification of CASM project directory structure.
fs::path prim() const
Return prim.json path.
fs::path root_dir() const
Return casm project directory path.
fs::path crystal_point_group() const
Return crystal_point_group.json path.
fs::path lattice_point_group() const
Return lattice_point_group.json path.
fs::path composition_axes() const
Return composition axes file path.
fs::path factor_group() const
Return factor_group.json path.
static Matrix3Type make_weight_matrix(const Eigen::Matrix3d lat_column_mat, Index max_element_value, double tol)
Returns a NeighborList weighting matrix appropriate for a particular lattice.
bool has_dir() const
Check if DirectoryStructure exists.
DirectoryStructure const & dir() const
Access DirectoryStructure object. Throw if not set.
fs::path root_dir() const
Access dir().root_dir(). Throw if not set.
bool set_root_dir(fs::path root)
Set DirectoryStructure.
Structure specifies the lattice and atomic basis of a crystal.
const SymGroup & point_group() const
const Lattice & lattice() const
const MasterSymGroup & factor_group() const
SymGroup is a collection of symmetry operations that satisfy the group property The symmetry operatio...
static SymGroup lattice_point_group(Lattice const &_lat)
void print(std::ostream &stream, unsigned int indent=2, unsigned int prec=12) const
Print json to stream.
BasicStructure specifies the lattice and atomic basis of a crystal.
const Lattice & lattice() const
const std::vector< Site > & basis() const
const Eigen::Matrix3d & lat_column_mat() const
3x3 matrix with lattice vectors as its columne
void commit(ProjectSettings const &set)
bool create_all_directories(ProjectSettings const &set)
std::set< int > default_nlist_sublat_indices(xtal::BasicStructure const &prim)
void write_composition_axes(fs::path _filename, CompositionAxes const &composition_axes)
Write CompositionAxes to file.
void write_prim(const xtal::BasicStructure &prim, fs::path filename, COORD_TYPE mode, bool include_va=false)
Write prim.json to file.
Eigen::Matrix3l default_nlist_weight_matrix(xtal::BasicStructure const &prim, double tol)
void build_project(ProjectSettings const &project_settings, Structure const &prim)
void write_symgroup(SymGroup const &grp, jsonParser &json)
fs::path find_casmroot(const fs::path &cwd)
ProjectSettings make_default_project_settings(xtal::BasicStructure const &prim, std::string project_name)
ClexDescription default_configuration_clex()
Matrix< long int, 3, 3 > Matrix3l
DirectoryStructure const & dir