Skip to content

Commit 4e0cdea

Browse files
committed
Removing additional newly deprecated methods
Also fixes a minor bug regarding modified amino acids listed as HETATM
1 parent 14f8c00 commit 4e0cdea

File tree

20 files changed

+55
-56
lines changed

20 files changed

+55
-56
lines changed

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/PDBFileParserTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ public void test4hhbAcceptedAtomNames(){
505505
Structure s = cache.getStructure("4HHB");
506506

507507
//System.out.println(s.toPDB());
508-
Atom[] ca = StructureTools.getAtomCAArray(s);
508+
Atom[] ca = StructureTools.getRepresentativeAtomArray(s);
509509
Atom[] cb = StructureTools.getAtomArray(s, new String[]{StructureTools.CB_ATOM_NAME,});
510510

511511
// gly does not have cb...

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/StructureToolsTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ protected void setUp() throws IOException
8989

9090

9191
public void testGetCAAtoms(){
92-
Atom[] cas = StructureTools.getAtomCAArray(structure);
92+
Atom[] cas = StructureTools.getRepresentativeAtomArray(structure);
9393
assertEquals("did not find the expected number of Atoms (58), but got " + cas.length,58,cas.length);
9494
}
9595

@@ -231,13 +231,13 @@ public void testRevisedConvention() throws IOException, StructureException{
231231
assertTrue(s.getChains().size() == 1);
232232
Chain c = s.getChainByPDB(chainId);
233233
assertEquals(c.getChainID(),chainId);
234-
Atom[] ca = StructureTools.getAtomCAArray(s);
234+
Atom[] ca = StructureTools.getRepresentativeAtomArray(s);
235235
assertEquals(83,ca.length);
236236

237237
String name10 = "4hhb.C_1-83,A_1-10";
238238
s = cache.getStructure(name10);
239239
assertTrue(s.getChains().size() == 2);
240-
ca = StructureTools.getAtomCAArray(s);
240+
ca = StructureTools.getRepresentativeAtomArray(s);
241241
assertEquals(93, ca.length);
242242

243243

@@ -419,8 +419,8 @@ public void testCAmmCIF() throws StructureException {
419419
assumeNoException(e);
420420
}
421421

422-
Atom[] pdbCA = StructureTools.getAtomCAArray(pdb);
423-
Atom[] mmcifCA = StructureTools.getAtomCAArray(mmcif);
422+
Atom[] pdbCA = StructureTools.getRepresentativeAtomArray(pdb);
423+
Atom[] mmcifCA = StructureTools.getRepresentativeAtomArray(mmcif);
424424

425425
assertEquals("PDB has wrong length",409,pdbCA.length);
426426
assertEquals("PDB has wrong length",409,mmcifCA.length);

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align/AlignmentToolsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ public void testToConciseAlignmentString() {
396396
*/
397397
public void testUpdateSuperposition() throws IOException, StructureException {
398398
Structure s = StructureTools.getStructure("31BI");
399-
Atom[] ca1 = StructureTools.getAtomCAArray(s);
400-
Atom[] ca2 = StructureTools.getAtomCAArray(s);
399+
Atom[] ca1 = StructureTools.getRepresentativeAtomArray(s);
400+
Atom[] ca2 = StructureTools.getRepresentativeAtomArray(s);
401401
StringBuilder sb = new StringBuilder();
402402
BufferedReader br = new BufferedReader(new FileReader("src/test/resources/align/31BI_symm_align.xml"));
403403
String line = "";

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align/FlipAFPChainTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ private void flip(String name1, String name2, String algorithmName) throws Struc
7777
Structure s1 = cache.getStructure(name1);
7878
Structure s2 = cache.getStructure(name2);
7979

80-
Atom[] ca1 = StructureTools.getAtomCAArray(s1);
81-
Atom[] ca2 = StructureTools.getAtomCAArray(s2);
80+
Atom[] ca1 = StructureTools.getRepresentativeAtomArray(s1);
81+
Atom[] ca2 = StructureTools.getRepresentativeAtomArray(s2);
8282

8383
StructureAlignment algorithm = StructureAlignmentFactory.getAlgorithm(algorithmName );
8484
AFPChain afpChain = algorithm.align(ca1,ca2);
@@ -138,7 +138,7 @@ private void flip(String name1, String name2, String algorithmName) throws Struc
138138
private double getRMSD(AFPChain afpChain, Atom[] ca1, Atom[] ca2)
139139
throws StructureException {
140140

141-
Atom[] ca2clone = StructureTools.cloneCAArray(ca2);
141+
Atom[] ca2clone = StructureTools.cloneAtomArray(ca2);
142142
rotateAtoms2(afpChain,ca2clone);
143143

144144
// get only the subset of Atoms that is on structurally equivalent positions

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align/ce/OptimalCECPMainTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public void testPermuteOptAln() throws Exception {
249249
Method permuteArray = OptimalCECPMain.class.getDeclaredMethod(
250250
"permuteArray", Object[].class, int.class);
251251
permuteArray.setAccessible(true);
252-
Atom[] ca2p = StructureTools.cloneCAArray(ca2);
252+
Atom[] ca2p = StructureTools.cloneAtomArray(ca2);
253253
permuteArray.invoke(null, ca2p, 63);
254254

255255
AFPChain cpAlignment = ce.align(ca1, ca2);

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align/fatcat/AFPChainSerialisationTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public void testSerialization1a21_1hwg(){
7979
Structure s2 = getStructure("1hwg","C");
8080

8181

82-
Atom[] ca1 = StructureTools.getAtomCAArray(s1);
83-
Atom[] ca2 = StructureTools.getAtomCAArray(s2);
82+
Atom[] ca1 = StructureTools.getRepresentativeAtomArray(s1);
83+
Atom[] ca2 = StructureTools.getRepresentativeAtomArray(s2);
8484

8585
testAlignment("1a21.A","1hwg.C",ca1,ca2,false);
8686
testAlignment("1a21.A","1hwg.C",ca1,ca2,true);
@@ -147,7 +147,7 @@ private Structure getStructure(String pdbId, String chainId) throws IOException,
147147
private void testAlignment(String name1, String name2, Atom[] ca1, Atom[] ca2, boolean doRigid) throws StructureException,IOException{
148148

149149

150-
Atom[] ca3 = StructureTools.cloneCAArray(ca2);
150+
Atom[] ca3 = StructureTools.cloneAtomArray(ca2);
151151

152152

153153
AFPChain afpChain = doAlign(name1, name2, ca1,ca2,doRigid);
@@ -255,17 +255,17 @@ public void testMulti() throws IOException {
255255
try {
256256
Structure s1 = getStructure("5pti","A");
257257
Structure s2 = getStructure("1znf","A");
258-
ca1 = StructureTools.getAtomCAArray(s1);
259-
ca2 = StructureTools.getAtomCAArray(s2);
260-
ca3 = StructureTools.cloneCAArray(ca2);
258+
ca1 = StructureTools.getRepresentativeAtomArray(s1);
259+
ca2 = StructureTools.getRepresentativeAtomArray(s2);
260+
ca3 = StructureTools.cloneAtomArray(ca2);
261261

262262
result1 = align(name1,name2,ca1, ca2,true);
263263

264264
Structure s3 = getStructure("1hiv","A");
265265
Structure s4 = getStructure("1a4w","H");
266-
ca4 = StructureTools.getAtomCAArray(s3);
267-
ca5 = StructureTools.getAtomCAArray(s4);
268-
ca6 = StructureTools.cloneCAArray(ca5);
266+
ca4 = StructureTools.getRepresentativeAtomArray(s3);
267+
ca5 = StructureTools.getRepresentativeAtomArray(s4);
268+
ca6 = StructureTools.cloneAtomArray(ca5);
269269

270270
result2 = align(name3,name4,ca4, ca5,true);
271271

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align/fatcat/FlipAFPChainTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private void align (StructureAlignment algorithm, String name1, String name2)
159159
private double getRMSD(AFPChain afpChain, Atom[] ca1, Atom[] ca2)
160160
throws StructureException {
161161

162-
Atom[] ca2clone = StructureTools.cloneCAArray(ca2);
162+
Atom[] ca2clone = StructureTools.cloneAtomArray(ca2);
163163
rotateAtoms2(afpChain,ca2clone);
164164

165165
// get only the subset of Atoms that is on structurally equivalent positions

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align/fatcat/MyTestHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public static String compareAlignment(String pdb1, String chain1, String pdb2, S
8282
Structure s4 = new StructureImpl();
8383
s4.addChain(c2);
8484

85-
Atom[] ca1 = StructureTools.getAtomCAArray(s3);
86-
Atom[] ca2 = StructureTools.getAtomCAArray(s4);
85+
Atom[] ca1 = StructureTools.getRepresentativeAtomArray(s3);
86+
Atom[] ca2 = StructureTools.getRepresentativeAtomArray(s4);
8787

8888
// keep an independent copy of them for tests further down..
8989
Atom[] ca3 = new Atom[ca2.length];

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align/fatcat/TestFlexibleRotationMatrices.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ private void compare(String name1, String name2, boolean doRigid){
6969
Atom[] ca1orig = cache.getAtoms(name1);
7070
Atom[] ca2orig = cache.getAtoms(name2);
7171

72-
Atom[] ca1 = StructureTools.cloneCAArray(ca1orig);
73-
Atom[] ca2 = StructureTools.cloneCAArray(ca2orig);
72+
Atom[] ca1 = StructureTools.cloneAtomArray(ca1orig);
73+
Atom[] ca2 = StructureTools.cloneAtomArray(ca2orig);
7474

75-
Atom[] ca3 = StructureTools.cloneCAArray(ca2);
75+
Atom[] ca3 = StructureTools.cloneAtomArray(ca2);
7676

7777
AFPChain afpChain = getAlignment(name1, name2, ca1, ca2, doRigid);
7878
afpChain.setCalculationTime(-1);
@@ -113,8 +113,8 @@ private void compare(String name1, String name2, boolean doRigid){
113113
}
114114

115115

116-
Atom[] ca1new = StructureTools.cloneCAArray(ca1orig);
117-
Atom[] ca2new = StructureTools.cloneCAArray(ca2orig);
116+
Atom[] ca1new = StructureTools.cloneAtomArray(ca1orig);
117+
Atom[] ca2new = StructureTools.cloneAtomArray(ca2orig);
118118

119119
compareBlock(x,afpChain, newChain,ca1new,ca2new );
120120

@@ -144,9 +144,9 @@ private void compareBlock(int blockNr, AFPChain afpChain, AFPChain newChain,
144144

145145

146146

147-
Atom[] ca1Copy = StructureTools.cloneCAArray(ca1);
148-
Atom[] ca2Copy = StructureTools.cloneCAArray(ca2);
149-
Atom[] ca2Copy2 = StructureTools.cloneCAArray(ca2);
147+
Atom[] ca1Copy = StructureTools.cloneAtomArray(ca1);
148+
Atom[] ca2Copy = StructureTools.cloneAtomArray(ca2);
149+
Atom[] ca2Copy2 = StructureTools.cloneAtomArray(ca2);
150150

151151
// int[][][] blocks1 = afpChain.getOptAln();
152152
int[][][] blocks2 = newChain.getOptAln();

biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/AlignmentCalc.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ public void run() {
8989
//aligner.setDebug(true);
9090
try {
9191

92-
Atom[] ca1 = StructureTools.getAtomCAArray(structure1);
93-
Atom[] ca2 = StructureTools.getAtomCAArray(structure2);
92+
Atom[] ca1 = StructureTools.getRepresentativeAtomArray(structure1);
93+
Atom[] ca2 = StructureTools.getRepresentativeAtomArray(structure2);
9494

9595
//System.out.println("ca1 size:" + ca1.length + " ca2 size: " + ca2.length);
9696
AFPChain afpChain = algorithm.align(ca1, ca2);

0 commit comments

Comments
 (0)