12 std::string tmetric_name =
"GL";
13 std::string index_expr;
14 auto it = args.cbegin(), it_end = args.cend();
16 if(std::isdigit(*it) || (*it) ==
':') {
18 while(it2 != it_end && (std::isdigit(*it2) || isspace(*it2) || (*it2) ==
':'))
20 index_expr = std::string(it, it2);
23 if(it != it_end && std::isalpha(*it)) {
25 while(it2 != it_end && std::isalpha(*it2))
27 tmetric_name = std::string(it, it2);
30 while(it != it_end && !std::isalnum(*it) && *it !=
':')
37 if(index_expr.size() > 0) {
53 for(
Index i = 0; i < 6; i++)
66 std::vector<std::string> col;
69 for(; it != end_it; ++it) {
70 std::stringstream t_ss;
72 col.push_back(t_ss.str());
93 std::string tmetric_name =
"GL";
94 std::string index_expr;
95 auto it = args.cbegin(), it_end = args.cend();
97 if(std::isdigit(*it) || (*it) ==
':') {
99 while(it2 != it_end && (std::isdigit(*it2) || isspace(*it2) || (*it2) ==
':'))
101 index_expr = std::string(it, it2);
104 if(it != it_end && std::isalpha(*it)) {
106 while(it2 != it_end && std::isalpha(*it2))
108 tmetric_name = std::string(it, it2);
111 while(it != it_end && !std::isalnum(*it) && *it !=
':')
118 if(index_expr.size() > 0) {
134 for(
Index i = 0; i < 6; i++)
142 std::vector<std::string> col;
145 for(; it != end_it; ++it) {
146 std::stringstream t_ss;
148 col.push_back(t_ss.str());
void set_mode(const std::string &mode_name)
void init(const Configuration &_tmplt) const override
Eigen::VectorXd evaluate(const Configuration &_config) const override
void init(const Configuration &_tmplt) const override
Eigen::VectorXd evaluate(const Configuration &_config) const override
T get(Args...args) const
Get data from json, using one of several alternatives.
bool parse_args(const std::string &args) override
Default implementation calls _parse_index_expression.
std::string short_header(const Configuration &_config) const override
std::string short_header(const Configuration &_config) const override
const Properties & calc_properties() const
std::string m_metric_name
StrainConverter m_straincalc
std::vector< std::string > col_header(const Configuration &_config) const override
std::string m_metric_name
EigenIndex Index
For long integer indexing:
StrainConverter m_straincalc
std::vector< std::string > col_header(const Configuration &_config) const override
bool validate(const Configuration &_config) const override
bool contains(const std::string &name) const
Return true if JSON object contains 'name'.
const Eigen::Matrix3d & deformation() const
Applied strain.
bool parse_args(const std::string &args) override
Default implementation calls _parse_index_expression.
VectorXd unrolled_strain_metric(const Matrix3d &F) const
A Configuration represents the values of all degrees of freedom in a Supercell.