Skip to content

Commit

Permalink
Fixed space group operation conventions for BGW output
Browse files Browse the repository at this point in the history
shankar1729 committed Oct 18, 2017
1 parent 7a2db8b commit 9ca2785
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jdftx/electronic/DumpBGW.cpp
Original file line number Diff line number Diff line change
@@ -134,8 +134,9 @@ void Dump::dumpBGW()
std::vector<matrix3<int> > rots(ops.size());
std::vector<vector3<> > trans(ops.size());
for(size_t iSym=0; iSym<ops.size(); iSym++)
{ rots[iSym] = ops[iSym].rot;
trans[iSym] = ops[iSym].a;
{ matrix3<int> rotInv = det(ops[iSym].rot) * adjugate(ops[iSym].rot); //since |det(rot)| = 1
rots[iSym] = rotInv; //BGW uses inverse convention
trans[iSym] = (2*M_PI)*ops[iSym].a; //BGW used 2*pi times translation
}
hsize_t dimsRot[3] = { ops.size(), 3, 3 };
hsize_t dimsTrans[2] = { ops.size(), 3 };

0 comments on commit 9ca2785

Please sign in to comment.