Skip to content
Snippets Groups Projects
Commit 7dfa247b authored by cmaffeo2's avatar cmaffeo2
Browse files

Fix cell size in dcd

parent b94557d1
No related branches found
No related tags found
No related merge requests found
...@@ -52,14 +52,18 @@ private: ...@@ -52,14 +52,18 @@ private:
unitCell[0] = box.ex().length(); unitCell[0] = box.ex().length();
unitCell[2] = box.ey().length(); unitCell[2] = box.ey().length();
unitCell[5] = box.ez().length(); unitCell[5] = box.ez().length();
float bc = box.ey().dot(box.ez()); double bc = box.ey().dot(box.ez());
float ac = box.ex().dot(box.ez()); double ac = box.ex().dot(box.ez());
float ab = box.ex().dot(box.ey()); double ab = box.ex().dot(box.ey());
unitCell[1] = bc/unitCell[0]/unitCell[2]/pi*180.0f; unitCell[1] = bc/unitCell[0]/unitCell[2]/pi*180.0f;
unitCell[3] = ac/unitCell[0]/unitCell[5]/pi*180.0f; unitCell[3] = ac/unitCell[0]/unitCell[5]/pi*180.0f;
unitCell[4] = ab/unitCell[0]/unitCell[1]/pi*180.0f; unitCell[4] = ab/unitCell[2]/unitCell[5]/pi*180.0f;
unitCell[1] = unitCell[1] > 1.0 ? 1.0 : unitCell[1] < -1.0 ? -1.0 : unitCell[1];
unitCell[3] = unitCell[3] > 1.0 ? 1.0 : unitCell[3] < -1.0 ? -1.0 : unitCell[3];
unitCell[4] = unitCell[4] > 1.0 ? 1.0 : unitCell[4] < -1.0 ? -1.0 : unitCell[4];
} }
public: public:
......
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