1 #define BOOST_TEST_DYN_LINK
2 #include <boost/test/unit_test.hpp>
14 BOOST_AUTO_TEST_SUITE(SuperConfigEnumTest)
23 Eigen::Vector3d a, b, c;
27 target_M << 8.0, 0.0, 0.0,
34 motif_M << 4.0, 0.0, 0.0,
40 auto sub_config = [&](std::initializer_list<int> occ) {
46 std::vector<Configuration> sub_configs = {
47 sub_config({0, 0, 0, 0}),
48 sub_config({1, 1, 1, 1})
54 BOOST_CHECK_EQUAL(pow(2, 8), std::distance(e.begin(), e.end()));
59 std::map<Configuration, Array<int> > cmap;
61 for(
const auto &tconfig : e) {
62 auto res = cmap.insert(std::make_pair(tconfig.primitive().in_canonical_supercell(), e.counter()));
70 BOOST_CHECK_EQUAL(cmap.size(), 22);
75 BOOST_AUTO_TEST_SUITE_END()
const Lattice & lattice() const
Given a selection of Configurations, enumerate all tilings into some supercell.
Represents a supercell of the primitive parent crystal structure.
void set_occupation(const Array< int > &newoccupation)
Set occupant variables.
PrimClex is the top-level data structure for a CASM project.
std::tuple< LatVec, LatVec, LatVec > vectors()
BOOST_AUTO_TEST_CASE(Test1)
virtual void check_init()
Check project initialization.
A Configuration represents the values of all degrees of freedom in a Supercell.
const Structure & get_prim() const
const Access to primitive Structure