|
29 | 29 | import org.biojava.nbio.structure.align.util.AtomCache; |
30 | 30 | import org.biojava.nbio.structure.geometry.CalcPoint; |
31 | 31 | import org.biojava.nbio.structure.geometry.SuperPosition; |
32 | | -import org.biojava.nbio.structure.geometry.SuperPositionQCP; |
| 32 | +import org.biojava.nbio.structure.geometry.SuperPositionSVD; |
33 | 33 | import org.junit.Test; |
34 | 34 |
|
35 | 35 | import static org.junit.Assert.*; |
@@ -107,10 +107,6 @@ public void test4A1I() throws IOException, StructureException { |
107 | 107 | String pdbId = "4A1I"; |
108 | 108 | int biolAssemblyNr = 2; |
109 | 109 |
|
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); |
114 | 110 | Structure bioAssembly = StructureIO.getBiologicalAssembly(pdbId,biolAssemblyNr); |
115 | 111 |
|
116 | 112 | if ( bioAssembly == null){ |
@@ -177,16 +173,16 @@ public void test4A1I() throws IOException, StructureException { |
177 | 173 | Point3d[] atomsTransfChainG = Calc.atomsToPoints(StructureTools.getAtomCAArray(transfChainG)); |
178 | 174 | Point3d[] atomsTransfChainB = Calc.atomsToPoints(StructureTools.getAtomCAArray(transfChainB)); |
179 | 175 |
|
180 | | - SuperPosition sqcp = new SuperPositionQCP(false); |
| 176 | + SuperPosition superPosition = new SuperPositionSVD(false); |
181 | 177 |
|
182 | 178 | // operator 1 is the identity, trace should be == 3 |
183 | | - Matrix4d m1 = sqcp.superposeAndTransform(atomsOrigChainG, atomsTransfChainG); |
| 179 | + Matrix4d m1 = superPosition.superposeAndTransform(atomsOrigChainG, atomsTransfChainG); |
184 | 180 | assertEquals(3.0, m1.m00 + m1.m11 + m1.m22, 0.00001); |
185 | 181 | assertEquals(0.0, CalcPoint.rmsd(atomsOrigChainG, atomsTransfChainG), 0.00001); |
186 | 182 |
|
187 | 183 |
|
188 | 184 | // operator 2 is a 2-fold, trace should be == -1 |
189 | | - Matrix4d m2 = sqcp.superposeAndTransform(atomsOrigChainB, atomsTransfChainB); |
| 185 | + Matrix4d m2 = superPosition.superposeAndTransform(atomsOrigChainB, atomsTransfChainB); |
190 | 186 | assertEquals(-1.0, m2.m00 + m2.m11 + m2.m22, 0.00001); |
191 | 187 | assertEquals(0.0, CalcPoint.rmsd(atomsOrigChainB, atomsTransfChainB), 0.00001); |
192 | 188 |
|
|
0 commit comments