Skip to content
Snippets Groups Projects
Commit 33f2ede3 authored by mkirsz's avatar mkirsz
Browse files

added missing conversion for stress

parent 6f250c0b
No related branches found
No related tags found
1 merge request!8Develop
......@@ -72,6 +72,7 @@ public:
private:
std::string raw_data_; // Stores raw file data
double s_conv = 6.241509074e-4; // kbar -> eV/A^3
};
#endif // VASP_OUTCAR_READER_H
......@@ -159,6 +159,7 @@ protected:
private:
Structure _s; ///< Internal structure representation.
bool stress_tensor_bool = false; ///< Flag indicating stress tensor presence.
double s_conv = 6.241509074e-4; // kbar -> eV/A^3
};
#endif // VASP_VASPRUN_READER_H
......@@ -110,6 +110,7 @@ void VaspOutcarReader::parse_data() {
s.stress(0,1) = s.stress(1,0) = row[3]; // xy
s.stress(1,2) = s.stress(2,1) = row[4]; // yz
s.stress(0,2) = s.stress(2,0) = row[5]; // zx
s.stress *= s_conv;
}
}
......
......@@ -141,6 +141,7 @@ void VaspVasprunReader::extract_stress_tensor(rx::xml_node<> *calculation_node)
_s.stress(r, 0) = x;
_s.stress(r, 1) = y;
_s.stress(r, 2) = z;
_s.stress *= s_conv;
} else {
std::cerr << "Error parsing stress tensor components." << std::endl;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment