1 #define BOOST_TEST_DYN_LINK
2 #include <boost/test/unit_test.hpp>
16 assert(skewed_unimodular.determinant() == 1);
25 BOOST_CHECK(known_niggli_form == reniggli);
38 BOOST_TEST_MESSAGE(
"Checking fcc lattice");
45 BOOST_TEST_MESSAGE(
"Checking bcc lattice");
52 BOOST_TEST_MESSAGE(
"Checking hexagonal lattice");
59 BOOST_TEST_MESSAGE(
"Checking cubic lattice");
69 symmat << 1, 2, 3, 4, 5,
78 persymmat << 4, 3, 2, 1,
93 std::string dirs =
"a";
99 std::vector<Lattice> enumerated_lat(latenumerator.
begin(), latenumerator.
end());
103 for(
auto it = enumerated_lat.begin(); it != enumerated_lat.end(); ++it) {
104 Eigen::Matrix3i comp_transmat;
105 comp_transmat << (l), 0, 0,
114 BOOST_CHECK(nigglicompare == nigglitest);
122 BOOST_TEST_MESSAGE(
"Checking known ZrO lattices");
134 int scel_list_size = 7;
140 test_lat_mat << 3.2339869, 0.0, -1.6169934,
143 Lattice test_lat(test_lat_mat);
154 BOOST_TEST_MESSAGE(
"Checking niggli and canonical_equivalent_lattice");
166 for(
auto it = test_enumerator.
begin(); it != test_enumerator.
end(); ++it) {
177 BOOST_CHECK_EQUAL(check_niggli,
true);
188 BOOST_CHECK_EQUAL(check,
true);
195 BOOST_TEST_MESSAGE(
"Checking standard_orientation_compare");
202 lat_mat_A << 3.233986860000, 0.000000000000, 0.000000000000,
203 0.000000000000, 0.000000000000, 5.601429540000,
204 0.000000000000, -5.168678340000, 0.000000000000;
209 lat_mat_A2 << 3.233986860000, 0.000000000000, 0.000000000000,
210 2.22045e-16, 0.000000000000, 5.601429540000,
211 0.000000000000, -5.168678340000, 0.000000000000;
216 lat_mat_B << 3.233986860000, 0.000000000000, 0.000000000000,
217 0.000000000000, 0.000000000000, -5.601429540000,
218 0.000000000000, 5.168678340000, 0.000000000000;
236 BOOST_CHECK_EQUAL(canon_A == canon_A2,
true);
237 BOOST_CHECK_EQUAL(canon_A2 == canon_B,
true);
238 BOOST_CHECK_EQUAL(canon_A == canon_B,
true);
243 BOOST_AUTO_TEST_SUITE(NiggliTest)
250 Eigen::Matrix3i skewed_unimodular;
251 skewed_unimodular << 1, 2, 3,
272 BOOST_AUTO_TEST_SUITE_END()
boost::container::stable_vector< Supercell > & get_supercell_list()
Access entire supercell_list.
void confirm_lattice(const Lattice &known_niggli_form, const Eigen::Matrix3i &skewed_unimodular)
void standard_orientation_compare_test()
void generate_point_group(SymGroup &point_group, double pg_tol=TOL) const
Populate.
const SymGroup & point_group() const
static Lattice hexagonal()
Construct cubic primitive cell of unit volume.
Structure specifies the lattice and atomic basis of a crystal.
Data structure for holding supercell enumeration properties.
void confirm_hexagonal_lattice(const Eigen::Matrix3i &skewed_unimodular)
const_iterator end() const
A const iterator to the past-the-last volume.
bool standard_orientation_compare(const Eigen::Matrix3d &low_score_lat_mat, const Eigen::Matrix3d &high_score_lat_mat, double compare_tol)
Determine whether high_score has a more standard format than low_score.
Lattice make_supercell(const Lattice &lat, const Eigen::Matrix3i &transf_mat)
Returns a super Lattice.
A fake container of supercell matrices.
const Lattice & lattice() const
static Lattice bcc()
Construct BCC primitive cell of unit volume.
const Eigen::Matrix3d & lat_column_mat() const
3x3 matrix with lattice vectors as its columne
void generate_supercells(const ScelEnumProps &enum_props)
Use the given CSPECS.
SymGroup is a collection of symmetry operations that satisfy the group property The symmetry operatio...
const_iterator begin() const
A const iterator to the beginning volume, specify here how the iterator should jump through the enume...
static Lattice cubic()
Construct simple cubic primitive cell of unit volume.
const MasterSymGroup & factor_group() const
bool is_niggli(const Eigen::Matrix3d &test_lat_mat, double compare_tol)
Check whether the given lattice (represented as a matrix) is in niggli TYPE ?? reduced form (does not...
Lattice canonical_equivalent_lattice(const Lattice &in_lat, const SymGroup &point_grp, double compare_tol)
Find the niggli, most standard oriented version of the given orbit (defined by the given SymGroup) of...
PrimClex is the top-level data structure for a CASM project.
bool is_persymmetric(const Eigen::MatrixBase< Derived > &test_mat, double test_tol=CASM::TOL)
void single_dimension_test()
BasicStructure< Site > ZrO_prim()
void ZrO_supercell_enum_test()
Index add_supercell(const Lattice &superlat)
bool check(std::string test, const jsonParser &expected, const jsonParser &calculated, fs::path test_cases_path, bool quiet, double tol=0.0)
Check expected JSON vs calculated JSON using BOOST_CHECK_EQUAL.
bool is_symmetric(const Eigen::MatrixBase< Derived > &test_mat, double test_tol=CASM::TOL)
BOOST_AUTO_TEST_CASE(SymmetricTest)
void ZrO_supercell_enum_test2()
void confirm_bcc_lattice(const Eigen::Matrix3i &skewed_unimodular)
void confirm_cubic_lattice(const Eigen::Matrix3i &skewed_unimodular)
Lattice niggli(const Lattice &in_lat, double compare_tol, bool keep_handedness=false)
Convert the given lattice into it's niggli reduced form, with the most standard orientation possilbe...
void confirm_fcc_lattice(const Eigen::Matrix3i &skewed_unimodular)
static Lattice fcc()
Construct FCC primitive cell of unit volume.
bool almost_equal(const GenericCluster< CoordType > &LHS, const GenericCluster< CoordType > &RHS, double tol)