@@ -1161,7 +1161,7 @@ public void finish() {
11611161 currentModel .add (currentChain );
11621162 }
11631163 } else if (!params .isHeaderOnly ()) {
1164- logger .warn ("current chain is null at end of document." );
1164+ logger .warn ("No chains were instantiated after parsing the whole CIF document. This could be due to the atom_site category being absent " );
11651165 }
11661166
11671167 allModels .add (currentModel );
@@ -1297,17 +1297,21 @@ public void finish() {
12971297 SeqMisMatch seqMisMatch = new SeqMisMatchImpl ();
12981298 seqMisMatch .setDetails (structRefSeqDif .getDetails ().get (rowIndex ));
12991299
1300- String insCode = structRefSeqDif .getPdbxPdbInsCode ().get (rowIndex );
1300+ String insCode = null ;
1301+ if (structRefSeqDif .getPdbxPdbInsCode ().isDefined ()) {
1302+ insCode = structRefSeqDif .getPdbxPdbInsCode ().get (rowIndex );
13011303 if ("?" .equals (insCode )) {
1302- insCode = null ;
1304+ insCode = null ;
1305+ }
13031306 }
13041307 seqMisMatch .setInsCode (insCode );
13051308 seqMisMatch .setOrigGroup (structRefSeqDif .getDbMonId ().get (rowIndex ));
13061309 seqMisMatch .setPdbGroup (structRefSeqDif .getMonId ().get (rowIndex ));
1307- seqMisMatch .setPdbResNum (structRefSeqDif .getPdbxAuthSeqNum ().get (rowIndex ));
1308- seqMisMatch .setUniProtId (structRefSeqDif .getPdbxSeqDbAccessionCode ().get (rowIndex ));
1310+ seqMisMatch .setPdbResNum (structRefSeqDif .getPdbxAuthSeqNum ().isDefined ()? structRefSeqDif . getPdbxAuthSeqNum (). get (rowIndex ): null );
1311+ seqMisMatch .setUniProtId (structRefSeqDif .getPdbxSeqDbAccessionCode ().isDefined ()? structRefSeqDif . getPdbxSeqDbAccessionCode (). get (rowIndex ): null );
13091312 seqMisMatch .setSeqNum (structRefSeqDif .getSeqNum ().get (rowIndex ));
13101313
1314+ if (!structRefSeqDif .getPdbxPdbStrandId ().isDefined ()) continue ;
13111315 String strandId = structRefSeqDif .getPdbxPdbStrandId ().get (rowIndex );
13121316 List <SeqMisMatch > seqMisMatches = misMatchMap .computeIfAbsent (strandId , k -> new ArrayList <>());
13131317 seqMisMatches .add (seqMisMatch );
0 commit comments