Skip to content

Commit a73d6f5

Browse files
committed
Tests pass now, except for TestLongPdbVsMmcif
1 parent 0a68908 commit a73d6f5

4 files changed

Lines changed: 17 additions & 9 deletions

File tree

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,16 @@ public void testReadPDBFile() throws Exception {
108108
Chain c = structure.getChain(0);
109109
assertEquals("did not find the expected 58 amino acids!",58,c.getAtomGroups(GroupType.AMINOACID).size());
110110

111-
assertTrue(c.getAtomGroups(GroupType.HETATM).size() == 0);
111+
assertEquals(0 , c.getAtomGroups(GroupType.HETATM).size());
112112

113113
Chain c2 = structure.getChain(1);
114-
assertTrue(c2.getAtomGroups(GroupType.HETATM).size() == 65);
115-
assertTrue(c2.getAtomGroups(GroupType.NUCLEOTIDE).size() == 0 );
114+
115+
// The second (unnamed) chain in te file contains 63 molecules of deutarated
116+
// water + 1 PO4 molecule + 1 UNK hetatom molecule
117+
// Since the UNK chemcomp is considered a peptide linked molecule (unknown aminoacid),
118+
// then we have only 64 HETATMs
119+
assertEquals(64, c2.getAtomGroups(GroupType.HETATM).size());
120+
assertEquals(0, c2.getAtomGroups(GroupType.NUCLEOTIDE).size());
116121

117122
List<Compound> compounds= structure.getCompounds();
118123

biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/io/TestLongPdbVsMmCifParsing.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void testVeryLongPdbVsMmCif() throws IOException, StructureException {
124124

125125
@Test
126126
public void testSingle() throws IOException, StructureException {
127-
testAll(Arrays.asList("4imj"));
127+
testAll(Arrays.asList("1jnv"));
128128
}
129129

130130
@After

biojava-structure/src/main/java/org/biojava/nbio/structure/asa/AsaCalculator.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,14 @@ else if (atomCode.equals("CA") || atomCode.equals("CB") ||
418418

419419
// not any of the expected atoms
420420
} else {
421-
// we log at info level for the MSE case (Selenomethionine), because it is too usual
422-
if (aa == 'M' && atomCode.equals("SE")) {
423-
logger.info("Unexpected atom "+atomCode+" for aminoacid "+aa+", assigning its standard vdw radius");
421+
// non standard aas, (e.g. MSE, LLP) will always have this problem,
422+
// thus we log at info level for them, at warn for others
423+
if (amino.getChemComp()!=null && amino.getChemComp().isStandard()) {
424+
logger.warn("Unexpected atom "+atomCode+" for aminoacid "+aa+ " ("+amino.getPDBName()+"), assigning its standard vdw radius");
424425
} else {
425-
logger.warn("Unexpected atom "+atomCode+" for aminoacid "+aa+", assigning its standard vdw radius");
426+
logger.info("Unexpected atom "+atomCode+" for aminoacid "+aa+ " ("+amino.getPDBName()+"), assigning its standard vdw radius");
426427
}
428+
427429
return atom.getElement().getVDWRadius();
428430
}
429431
}

biojava-structure/src/test/java/org/biojava/nbio/structure/asa/TestAsaCalc.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,15 @@ public void testAsa3PIU() throws StructureException, IOException {
5858
}
5959

6060
for (GroupAsa groupAsa: groupAsas) {
61+
//System.out.println(groupAsa.getGroup().getPDBName() + " " + groupAsa.getGroup().getResidueNumber() + " " + groupAsa.getAsaU());
6162
totResidues+=groupAsa.getAsaU();
6263

6364
assertTrue(groupAsa.getRelativeAsaU()<=1.0);
6465
}
6566

6667
assertEquals(totAtoms, totResidues,0.000001);
6768

68-
assertEquals(17638.0, totAtoms, 1.0);
69+
assertEquals(17462.0, totAtoms, 1.0);
6970

7071
}
7172
}

0 commit comments

Comments
 (0)