@@ -61,34 +61,6 @@ getUij(const ObjCryst::ScatteringPower* sp)
6161}
6262
6363
64- bool isGetInversionCenterDoubled ()
65- {
66- static int value_cached = 0 ;
67- const int BIT_CACHED = 1 ;
68- const int BIT_VALUE = 2 ;
69- // short circuit when the flag is already cached
70- if (BIT_CACHED & value_cached) {
71- const bool rv = BIT_VALUE & value_cached;
72- return rv;
73- }
74- ObjCryst::SpaceGroup sg129 (" P 4/n m m :1" );
75- const CrystVector_REAL xyzinv = sg129.GetInversionCenter ();
76- if (0.5 == xyzinv (0 ) && 0.5 == xyzinv (1 ) && 0 == xyzinv (2 )) {
77- value_cached |= BIT_VALUE;
78- }
79- else if (0.25 == xyzinv (0 ) && 0.25 == xyzinv (1 ) && 0 == xyzinv (2 )) {
80- value_cached &= ~BIT_VALUE;
81- }
82- else {
83- const char * emsg =
84- " Unexpected value of ObjCryst::SpaceGroup::GetInversionCenter()" ;
85- throw logic_error (emsg);
86- }
87- value_cached |= BIT_CACHED;
88- return isGetInversionCenterDoubled ();
89- }
90-
91-
9264CrystalStructureAdapter::SymOpVector
9365fetchSymmetryOperations (const ObjCryst::SpaceGroup& spacegroup)
9466{
@@ -131,12 +103,10 @@ fetchSymmetryOperations(const ObjCryst::SpaceGroup& spacegroup)
131103 assert (spacegroup.IsCentrosymmetric ());
132104 assert (nbsym == 2 * last);
133105 CrystVector_REAL xyzinv = spacegroup.GetInversionCenter ();
134- // get tinv the overall translation associated with inversion center.
135- // fox-objcryst 2017.2 returns doubled coordinates for the inversion
136- // center so the tinv is the same. Expect fixup which will require
137- // doubling the tinv value here.
106+ // tinv is the overall translation associated with inversion center.
107+ // it is double the inversion center position.
138108 R3::Vector tinv (xyzinv (0 ), xyzinv (1 ), xyzinv (2 ));
139- tinv *= isGetInversionCenterDoubled () ? 1.0 : 2.0 ;
109+ tinv *= 2.0 ;
140110 // now apply the inversion center here
141111 for (int i = 0 , j = last; i < last; ++i, ++j)
142112 {
0 commit comments