1 #ifndef CASM_app_query_QueryIO_impl
2 #define CASM_app_query_QueryIO_impl
16 template <
typename DataObject>
19 return adaptable.value;
24 template <
typename ValueType>
26 ValueType
const &_value,
27 bool _include_equivalents,
28 Index _equivalent_index,
32 include_equivalents(_include_equivalents),
34 permute_it(_permute_it) {}
38 template <
typename QueryDataType>
42 "[--include-equivalents query only] Index that counts over distinct "
43 "symmetrically equivalent objects",
44 [](QueryDataType
const &data) ->
Index {
return data.equivalent_index; });
47 template <
typename QueryDataType>
50 "permute_scel_factor_group_op",
51 "[--include-equivalents query only] Factor group operation (applied "
52 "before translation operation) of the permutation that generated the "
53 "equivalent object, as its index into the supercell factor group",
54 [](QueryDataType
const &data) ->
Index {
55 return data.permute_it->factor_group_index();
59 template <
typename QueryDataType>
62 "permute_factor_group_op",
63 "[--include-equivalents query only] Factor group operation (applied "
64 "before translation operation) of the permutation that generated the "
65 "equivalent object, as its index into the prim factor group",
66 [](QueryDataType
const &data) ->
Index {
67 return data.permute_it->prim_factor_group_index();
71 template <
typename QueryDataType>
75 "permute_factor_group_op_desc",
76 "[--include-equivalents query only] Description of prim factor group "
77 "operation that generated the equivalent object in Direct coordinates.",
78 [](QueryDataType
const &data) -> std::string {
79 auto const &factor_group_op =
81 ->factor_group()[data.permute_it->factor_group_index()];
82 auto const &
lattice = data.primclex.prim().lattice();
89 template <
typename QueryDataType>
92 "permute_translation",
93 "[--include-equivalents query only] Translation (applied after factor "
94 "group operation) of the permutation that generated the equivalent "
95 "object, as (i, j, k) multiples of the prim lattice vectors.",
97 return data.permute_it->sym_info().unitcell_index_converter()(
98 data.permute_it->translation_index());
PrimClex is the top-level data structure for a CASM project.
Generic1DDatumFormatter< Eigen::Vector3l, QueryDataType > permute_translation()
GenericDatumFormatter< Index, QueryDataType > permute_scel_factor_group_op()
GenericDatumFormatter< Index, QueryDataType > equivalent_index()
GenericDatumFormatter< std::string, QueryDataType > permute_factor_group_op_desc()
Description of permute factor group operation in the prim factor group.
GenericDatumFormatter< Index, QueryDataType > permute_factor_group_op()
GenericVectorXdScelFormatter lattice()
std::string brief_description(const SymOp &op, const xtal::Lattice &lat, SymInfoOptions opt=SymInfoOptions())
Print SymInfo to brief string.
INDEX_TYPE Index
For long integer indexing:
Matrix< long int, 3, 1 > Vector3l
QueryData(PrimClex const &_primclex, ValueType const &_value, bool _include_equivalents=false, Index _equivalent_index=0, PermuteIterator const *_permute_it=nullptr)