1 #ifndef CASM_clex_io_ProtoFuncsPrinter_impl
2 #define CASM_clex_io_ProtoFuncsPrinter_impl
11 template <
typename OrbitType>
18 out <<
"Prototype basis functions:\n\n";
20 for (
Index i = 0; i < orbit_index; i++)
25 out <<
"\\begin{align*}\n";
26 for (
Index i = 0; i < tbasis.
size(); i++) {
27 out <<
"\\Phi_{" << func_index + i <<
"} ={}& ";
30 std::string formula = tbasis[i]->tex_formula();
34 while (formula.size() > maxl) {
35 if (formula[j] ==
'-' || formula[j] ==
'+') {
40 out << formula.substr(0, pos) <<
"\\\\\n";
42 formula = formula.substr(pos, formula.size());
53 if (i + 1 != tbasis.
size()) {
59 out <<
"\\end{align*}\n\n";
62 <<
" of " << orbit.size() <<
" Equivalent " <<
element_name
63 <<
" in Orbit " << orbit_index << std::endl;
70 auto const &clust = orbit.prototype();
81 for (
Index i = 0; i < orbit_index; i++)
85 out.
indent() <<
"Prototype basis functions:\n";
89 for (
Index i = 0; i < tbasis.
size(); i++) {
90 out.
indent() <<
"\\Phi_{" << func_index + i
91 <<
"} = " << tbasis[i]->tex_formula() << std::endl;
98 template <
typename OrbitType>
102 json[
"prototype"] = orbit.prototype();
103 json[
"linear_orbit_index"] = orbit_index;
104 json[
"mult"] = orbit.
size();
109 jsonParser &orbitf = json[
"cluster_functions"];
113 Index func_index = 0;
114 for (
Index i = 0; i < orbit_index; i++)
119 for (
auto const &labeler :
labelers) {
123 for (
Index nf = 0; nf < tbasis.
size(); ++nf) {
126 tbasis[nf]->tex_formula()));
bool accept(const FunctionVisitor &visitor)
BasisSet const & clust_basis(Index orbit_ind, Index equiv_ind) const
Const access of clust basis of orbit.
std::string indent_str() const
static jsonParser array()
Returns an empty json array.
jsonParser & put_obj()
Puts new empty JSON object.
COORD_MODE specifies the current coordinate mode (Fractional or Cartesian)
std::string to_string(ENUM val)
Return string representation of enum class.
jsonParser json_pair(const std::string &key, const T &value)
Create pair/value json object without intermediate temporary.
jsonParser & push_back(const T &value, Args &&... args)
void print_tex_tabular_cluster_sites(Log &out, IntegralCluster const &cluster, xtal::BasicStructure const &prim, COORD_TYPE mode)
Print prototype cluster sites as a tex tabular.
void print_coordinates(OrbitPrinter &printer, const Element &element, Log &out)
INDEX_TYPE Index
For long integer indexing:
bool print_invariant_group
static const std::string element_name
void decrease_indent(Log &out) const
void print_invariant_group(const OrbitType &orbit, const Element &element, Log &out) const
void increase_indent(Log &out) const
jsonParser & to_json(const OrbitType &orbit, jsonParser &json, Index orbit_index, Index Norbits) const
ClexBasis const & clex_basis
void operator()(const OrbitType &orbit, Log &out, Index orbit_index, Index Norbits) const
Print to JSON.
std::vector< SubExpressionLabeler > labelers