Skip to content

Commit 288b18c

Browse files
committed
switch from QCP to SVD
1 parent 54f4c2b commit 288b18c

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

biojava-structure/src/test/java/org/biojava/nbio/structure/io/TestHardBioUnits.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.biojava.nbio.structure.align.util.AtomCache;
3030
import org.biojava.nbio.structure.geometry.CalcPoint;
3131
import org.biojava.nbio.structure.geometry.SuperPosition;
32-
import org.biojava.nbio.structure.geometry.SuperPositionQCP;
32+
import org.biojava.nbio.structure.geometry.SuperPositionSVD;
3333
import org.junit.Test;
3434

3535
import static org.junit.Assert.*;
@@ -107,10 +107,6 @@ public void test4A1I() throws IOException, StructureException {
107107
String pdbId = "4A1I";
108108
int biolAssemblyNr = 2;
109109

110-
AtomCache atomCache = new AtomCache();
111-
// TODO there seem to be numerical instabilities when parsing BCIF
112-
atomCache.setFiletype(StructureFiletype.CIF);
113-
StructureIO.setAtomCache(atomCache);
114110
Structure bioAssembly = StructureIO.getBiologicalAssembly(pdbId,biolAssemblyNr);
115111

116112
if ( bioAssembly == null){
@@ -177,16 +173,16 @@ public void test4A1I() throws IOException, StructureException {
177173
Point3d[] atomsTransfChainG = Calc.atomsToPoints(StructureTools.getAtomCAArray(transfChainG));
178174
Point3d[] atomsTransfChainB = Calc.atomsToPoints(StructureTools.getAtomCAArray(transfChainB));
179175

180-
SuperPosition sqcp = new SuperPositionQCP(false);
176+
SuperPosition superPosition = new SuperPositionSVD(false);
181177

182178
// operator 1 is the identity, trace should be == 3
183-
Matrix4d m1 = sqcp.superposeAndTransform(atomsOrigChainG, atomsTransfChainG);
179+
Matrix4d m1 = superPosition.superposeAndTransform(atomsOrigChainG, atomsTransfChainG);
184180
assertEquals(3.0, m1.m00 + m1.m11 + m1.m22, 0.00001);
185181
assertEquals(0.0, CalcPoint.rmsd(atomsOrigChainG, atomsTransfChainG), 0.00001);
186182

187183

188184
// operator 2 is a 2-fold, trace should be == -1
189-
Matrix4d m2 = sqcp.superposeAndTransform(atomsOrigChainB, atomsTransfChainB);
185+
Matrix4d m2 = superPosition.superposeAndTransform(atomsOrigChainB, atomsTransfChainB);
190186
assertEquals(-1.0, m2.m00 + m2.m11 + m2.m22, 0.00001);
191187
assertEquals(0.0, CalcPoint.rmsd(atomsOrigChainB, atomsTransfChainB), 0.00001);
192188

0 commit comments

Comments
 (0)