1 #ifndef CASMtest_ZrOProj
2 #define CASMtest_ZrOProj
17 lat << 3.233986860000, 0.000000000000, 0.000000000000,
18 -1.616993430000, 2.800714770000, 0.000000000000,
19 0.000000000000, 0.000000000000, 5.168678340000;
45 "HCP Zr with octahedral interstitial O") {}
49 _check_symmetry(24, 12, 24, 12, 24, 12,
"D6h",
"D6h");
54 std::string str = R
"({
56 "site_basis_functions" : "occupation"
58 "orbit_branch_specs" : {
59 "2" : {"max_length" : 9.0},
60 "3" : {"max_length" : 7.0},
61 "4" : {"max_length" : 6.0}
65 "coordinate_mode" : "Integral",
70 "include_subclusters" : false
80 std::vector<std::string> axes = {
81 R
"(\s+0\s+Zr\(2\)Va\(2\)\s+Zr\(2\)O\(2\)\s+Zr\(2\)Va\(2-2a\)O\(2a\))",
82 R"(\s+1\s+Zr\(2\)O\(2\)\s+Zr\(2\)Va\(2\)\s+Zr\(2\)Va\(2a\)O\(2-2a\))"
85 _check_composition_axes(axes.begin(), axes.end());
93 bspecs().write(
dir /
"basis_sets" /
"bset.default" /
"bspecs.json");
95 m_p.popen(cd_and() +
"ccasm bset -u");
96 BOOST_CHECK_MESSAGE(m_p.exit_code() == 0, m_p.gets());
98 BOOST_CHECK_MESSAGE(boost::regex_search(m_p.gets(), m_match, boost::regex(R
"(write:.*clust\.json)")) == true, m_p.gets());
99 BOOST_CHECK_MESSAGE(boost::regex_search(m_p.gets(), m_match, boost::regex(R
"(write:.*basis\.json)")) == true, m_p.gets());
100 BOOST_CHECK_MESSAGE(boost::regex_search(m_p.gets(), m_match, boost::regex(R
"(write:.*)" + title + R"(_Clexulator\.cc)")) == true, m_p.gets());
102 BOOST_CHECK_MESSAGE(
true == fs::exists(m_dirs.clust(m_set->default_clex().bset)), m_p.gets());
103 BOOST_CHECK_MESSAGE(
true == fs::exists(m_dirs.clexulator_src(m_set->name(), m_set->default_clex().bset)), m_p.gets());
110 std::string pattern = R
"(\*\* Branch [0-9]+ \*\*)";
111 boost::regex re(pattern);
113 std::vector<std::string> checks = {
114 "ccasm bset --orbits",
115 "ccasm bset --clusters",
116 "ccasm bset --functions"
119 for(
auto it = checks.begin(); it != checks.end(); ++it) {
120 m_p.popen(cd_and() + *it);
123 auto begin = boost::sregex_iterator(str.begin(), str.end(), re);
124 auto end = boost::sregex_iterator();
125 auto count = std::distance(begin, end);
127 BOOST_CHECK_MESSAGE(count == 5, m_p.gets());
131 m_p.popen(cd_and() +
"ccasm bset -u");
132 BOOST_CHECK_EQUAL(m_p.exit_code(), 6);
134 m_p.popen(cd_and() +
"ccasm bset -uf");
135 BOOST_CHECK_EQUAL(m_p.exit_code(), 0);
143 m_p.popen(cd_and() +
"ccasm enum --method ScelEnum --max 10");
144 std::stringstream ss;
151 m_p.popen(cd_and() +
"ccasm enum --method ConfigEnumAllOccupations --max 6");
152 std::stringstream ss;
boost::container::stable_vector< Supercell > & get_supercell_list()
Access entire supercell_list.
void check_symmetry() override
Check symmetry.
void push_back(const T &toPush)
void check_composition() override
Check "casm composition".
void check_bset() override
Uses bspecs() and checks that 5 branches are generated, and that –orbits, –clusters, and –functions run without error.
jsonParser bspecs() const
const Lattice & lattice() const
Molecule make_atom(std::string atom_name, const Lattice &lat)
Return an atomic Molecule with specified name and Lattice.
config_iterator config_begin()
Configuration iterator: begin.
config_iterator config_end()
Configuration iterator: end.
fs::path proj_dir(fs::path init)
Create a new project directory, appending ".(#)" to ensure it is a new project.
Represents cartesian and fractional coordinates.
Array< CoordType > basis
Lattice vectors that specifies periodicity of the crystal.
PrimClex is the top-level data structure for a CASM project.
std::string title
User-specified name of this Structure.
BasicStructure< Site > ZrO_prim()
void check_enum() override
Check "ccasm enum".
static jsonParser parse(const std::string &str)
Construct a jsonParser from a string containing JSON data.
Molecule make_vacancy(const Lattice &lat)
Return an vacancy Molecule with specified Lattice.