Skip to content

Commit a6b34a4

Browse files
committed
Better logging and removing some warnings
1 parent 30752e1 commit a6b34a4

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ protected void comparePDB2cif(String id, String chainId){
226226
private void checkGroups(Group g1, Group g2){
227227

228228
//System.out.print("comparing " +g1 + " " + g2);
229-
String pdbId1 = g1.getChain().getParent().getPDBCode();
230-
String pdbId2 = g1.getChain().getParent().getPDBCode();
229+
String pdbId1 = g1.getChain().getStructure().getPDBCode();
230+
String pdbId2 = g1.getChain().getStructure().getPDBCode();
231231
assertEquals(pdbId1, pdbId2);
232232

233233
assertEquals(g1.getType(),g2.getType());

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ private void testSingleChain(Chain cPdb, Chain cCif) {
418418
}
419419

420420

421-
assertNotNull("getParent is null in pdb (chain "+chainId+")",cPdb.getParent());
422-
assertNotNull("getParent is null in cif (chain "+chainId+")",cCif.getParent());
421+
assertNotNull("getParent is null in pdb (chain "+chainId+")",cPdb.getStructure());
422+
assertNotNull("getParent is null in cif (chain "+chainId+")",cCif.getStructure());
423423

424424

425425
assertEquals("failed for getAtomLength (chain "+chainId+"):",cPdb.getAtomLength(),cCif.getAtomLength());

biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/SimpleMMcifConsumer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,9 @@ private Atom convertAtom(AtomSite atom){
492492
Element element = Element.R;
493493
try {
494494
element = Element.valueOfIgnoreCase(atom.getType_symbol());
495-
} catch (IllegalArgumentException e){}
495+
} catch (IllegalArgumentException e) {
496+
logger.warn("Element {} was not recognised as a BioJava-known element, the element will be represented as the generic element {}", atom.getType_symbol(), Element.R.name());
497+
}
496498
a.setElement(element);
497499

498500
return a;
@@ -1690,7 +1692,7 @@ public void newPdbxPolySeqScheme(PdbxPolySeqScheme ppss) {
16901692
if (asymStrandId.containsKey(ppss.getAsym_id()))
16911693
return;
16921694

1693-
// this is one of the interal mmcif rules it seems...
1695+
// this is one of the internal mmcif rules it seems...
16941696
if ( ppss.getPdb_strand_id() == null) {
16951697
asymStrandId.put(ppss.getAsym_id(), ppss.getAuth_mon_id());
16961698
return;

0 commit comments

Comments
 (0)