1212import org .biojava .nbio .structure .xtal .CrystalCell ;
1313import org .biojava .nbio .structure .xtal .SpaceGroup ;
1414import org .biojava .nbio .structure .xtal .SymoplibParser ;
15- import org .rcsb .cif .model .Category ;
16- import org .rcsb .cif .model .Column ;
17- import org .rcsb .cif .model .generated .atomsite .*;
18- import org .rcsb .cif .model .generated .atomsites .AtomSites ;
19- import org .rcsb .cif .model .generated .auditauthor .AuditAuthor ;
20- import org .rcsb .cif .model .generated .cell .Cell ;
21- import org .rcsb .cif .model .generated .chemcomp .ChemComp ;
22- import org .rcsb .cif .model .generated .chemcompbond .ChemCompBond ;
23- import org .rcsb .cif .model .generated .databasepdbremark .DatabasePDBRemark ;
24- import org .rcsb .cif .model .generated .databasepdbrev .DatabasePDBRev ;
25- import org .rcsb .cif .model .generated .databasepdbrevrecord .DatabasePDBRevRecord ;
26- import org .rcsb .cif .model .generated .entity .Entity ;
27- import org .rcsb .cif .model .generated .entitypoly .EntityPoly ;
28- import org .rcsb .cif .model .generated .entitypolyseq .EntityPolySeq ;
29- import org .rcsb .cif .model .generated .entitysrcgen .EntitySrcGen ;
30- import org .rcsb .cif .model .generated .entitysrcnat .EntitySrcNat ;
31- import org .rcsb .cif .model .generated .exptl .Exptl ;
32- import org .rcsb .cif .model .generated .pdbxauditrevisionhistory .PdbxAuditRevisionHistory ;
33- import org .rcsb .cif .model .generated .pdbxchemcompidentifier .PdbxChemCompIdentifier ;
34- import org .rcsb .cif .model .generated .pdbxdatabasestatus .PdbxDatabaseStatus ;
35- import org .rcsb .cif .model .generated .pdbxdatabasestatus .RecvdInitialDepositionDate ;
36- import org .rcsb .cif .model .generated .pdbxentitydescriptor .PdbxEntityDescriptor ;
37- import org .rcsb .cif .model .generated .pdbxentitysrcsyn .PdbxEntitySrcSyn ;
38- import org .rcsb .cif .model .generated .pdbxmolecule .PdbxMolecule ;
39- import org .rcsb .cif .model .generated .pdbxmoleculefeatures .PdbxMoleculeFeatures ;
40- import org .rcsb .cif .model .generated .pdbxnonpolyscheme .PdbxNonpolyScheme ;
41- import org .rcsb .cif .model .generated .pdbxreferenceentitylink .PdbxReferenceEntityLink ;
42- import org .rcsb .cif .model .generated .pdbxreferenceentitylist .PdbxReferenceEntityList ;
43- import org .rcsb .cif .model .generated .pdbxreferenceentitypolylink .PdbxReferenceEntityPolyLink ;
44- import org .rcsb .cif .model .generated .pdbxstructassembly .PdbxStructAssembly ;
45- import org .rcsb .cif .model .generated .pdbxstructassemblygen .PdbxStructAssemblyGen ;
46- import org .rcsb .cif .model .generated .pdbxstructmodresidue .PdbxStructModResidue ;
47- import org .rcsb .cif .model .generated .pdbxstructoperlist .PdbxStructOperList ;
48- import org .rcsb .cif .model .generated .refine .LsRFactorRFree ;
49- import org .rcsb .cif .model .generated .refine .LsRFactorRWork ;
50- import org .rcsb .cif .model .generated .refine .Refine ;
51- import org .rcsb .cif .model .generated .struct .Struct ;
52- import org .rcsb .cif .model .generated .structasym .StructAsym ;
53- import org .rcsb .cif .model .generated .structconf .StructConf ;
54- import org .rcsb .cif .model .generated .structconn .StructConn ;
55- import org .rcsb .cif .model .generated .structconntype .StructConnType ;
56- import org .rcsb .cif .model .generated .structkeywords .PdbxKeywords ;
57- import org .rcsb .cif .model .generated .structkeywords .StructKeywords ;
58- import org .rcsb .cif .model .generated .structncsoper .StructNcsOper ;
59- import org .rcsb .cif .model .generated .structref .StructRef ;
60- import org .rcsb .cif .model .generated .structrefseq .PdbxDbAlignBegInsCode ;
61- import org .rcsb .cif .model .generated .structrefseq .PdbxDbAlignEndInsCode ;
62- import org .rcsb .cif .model .generated .structrefseq .StructRefSeq ;
63- import org .rcsb .cif .model .generated .structrefseqdif .StructRefSeqDif ;
64- import org .rcsb .cif .model .generated .structsheetrange .StructSheetRange ;
65- import org .rcsb .cif .model .generated .structsite .StructSite ;
66- import org .rcsb .cif .model .generated .structsitegen .StructSiteGen ;
67- import org .rcsb .cif .model .generated .symmetry .Symmetry ;
15+ import org .rcsb .cif .model .*;
16+ import org .rcsb .cif .model .generated .*;
6817import org .slf4j .Logger ;
6918import org .slf4j .LoggerFactory ;
7019
@@ -145,30 +94,30 @@ public void consumeAtomSite(AtomSite atomSite) {
14594 return ;
14695 }
14796
148- LabelAsymId labelAsymId = atomSite .getLabelAsymId ();
149- AuthAsymId authAsymId = atomSite .getAuthAsymId ();
97+ StrColumn labelAsymId = atomSite .getLabelAsymId ();
98+ StrColumn authAsymId = atomSite .getAuthAsymId ();
15099
151- GroupPDB groupPDB = atomSite .getGroupPDB ();
152- AuthSeqId authSeqId = atomSite .getAuthSeqId ();
100+ StrColumn groupPDB = atomSite .getGroupPDB ();
101+ IntColumn authSeqId = atomSite .getAuthSeqId ();
153102
154- LabelCompId labelCompId = atomSite .getLabelCompId ();
103+ StrColumn labelCompId = atomSite .getLabelCompId ();
155104
156- Id id = atomSite .getId ();
157- LabelAtomId labelAtomId = atomSite .getLabelAtomId ();
105+ IntColumn id = atomSite .getId ();
106+ StrColumn labelAtomId = atomSite .getLabelAtomId ();
158107
159- CartnX cartnX = atomSite .getCartnX ();
160- CartnY cartnY = atomSite .getCartnY ();
161- CartnZ cartnZ = atomSite .getCartnZ ();
108+ FloatColumn cartnX = atomSite .getCartnX ();
109+ FloatColumn cartnY = atomSite .getCartnY ();
110+ FloatColumn cartnZ = atomSite .getCartnZ ();
162111
163- Occupancy occupancy = atomSite .getOccupancy ();
164- BIsoOrEquiv bIsoOrEquiv = atomSite .getBIsoOrEquiv ();
112+ FloatColumn occupancy = atomSite .getOccupancy ();
113+ FloatColumn bIsoOrEquiv = atomSite .getBIsoOrEquiv ();
165114
166- LabelAltId labelAltId = atomSite .getLabelAltId ();
167- TypeSymbol typeSymbol = atomSite .getTypeSymbol ();
115+ StrColumn labelAltId = atomSite .getLabelAltId ();
116+ StrColumn typeSymbol = atomSite .getTypeSymbol ();
168117
169- PdbxPDBInsCode pdbxPDBInsCode = atomSite .getPdbxPDBInsCode ();
170- LabelSeqId labelSeqId = atomSite .getLabelSeqId ();
171- PdbxPDBModelNum pdbx_pdb_model_num = atomSite .getPdbxPDBModelNum ();
118+ StrColumn pdbxPDBInsCode = atomSite .getPdbxPDBInsCode ();
119+ IntColumn labelSeqId = atomSite .getLabelSeqId ();
120+ IntColumn pdbx_pdb_model_num = atomSite .getPdbxPDBModelNum ();
172121
173122 for (int atomIndex = 0 ; atomIndex < atomSite .getRowCount (); atomIndex ++) {
174123 boolean startOfNewChain = false ;
@@ -726,6 +675,7 @@ public void consumePdbxAuditRevisionHistory(PdbxAuditRevisionHistory pdbxAuditRe
726675 if (pdbxAuditRevisionHistory .getOrdinal ().get (rowIndex ) == 1 ) {
727676 String release = pdbxAuditRevisionHistory .getRevisionDate ().get (rowIndex );
728677 try {
678+ // TODO java.lang.NumberFormatException: multiple points - failed for /var/bcif/z4/1z4s.bcif, failed for /var/bcif/he/4hec.bcif
729679 Date releaseDate = DATE_FORMAT .parse (release );
730680 pdbHeader .setRelDate (releaseDate );
731681 } catch (ParseException e ) {
@@ -737,6 +687,7 @@ public void consumePdbxAuditRevisionHistory(PdbxAuditRevisionHistory pdbxAuditRe
737687 // the last revision date will "stick"
738688 String revision = pdbxAuditRevisionHistory .getRevisionDate ().get (rowIndex );
739689 try {
690+ // TODO java.lang.NumberFormatException: multiple points - failed for /var/bcif/dz/1dzw.bcif, failed for /var/bcif/y2/2y28.bcif
740691 Date revisionDate = DATE_FORMAT .parse (revision );
741692 pdbHeader .setModDate (revisionDate );
742693 } catch (ParseException e ) {
@@ -755,11 +706,12 @@ public void consumePdbxChemCompIdentifier(PdbxChemCompIdentifier pdbxChemCompIde
755706 public void consumePdbxDatabaseStatus (PdbxDatabaseStatus pdbxDatabaseStatus ) {
756707 for (int rowIndex = 0 ; rowIndex < pdbxDatabaseStatus .getRowCount (); rowIndex ++) {
757708 // the deposition date field is only available in mmCIF 5.0
758- RecvdInitialDepositionDate col = pdbxDatabaseStatus .getRecvdInitialDepositionDate ();
759- if (col .isDefined ()) {
760- String deposition = col .get (rowIndex );
709+ StrColumn recvdInitialDepositionDate = pdbxDatabaseStatus .getRecvdInitialDepositionDate ();
710+ if (recvdInitialDepositionDate .isDefined ()) {
711+ String deposition = recvdInitialDepositionDate .get (rowIndex );
761712
762713 try {
714+ // TODO failed for /var/bcif/z4/2z4j.bcif java.lang.NumberFormatException: For input string: ".202717E4202717E4"
763715 Date depositionDate = DATE_FORMAT .parse (deposition );
764716 pdbHeader .setDepDate (depositionDate );
765717 } catch (ParseException e ) {
@@ -838,7 +790,7 @@ public void consumeRefine(Refine refine) {
838790 }
839791 pdbHeader .setResolution ((float ) lsDResHigh );
840792
841- LsRFactorRFree lsRFactorRFree = refine .getLsRFactorRFree ();
793+ FloatColumn lsRFactorRFree = refine .getLsRFactorRFree ();
842794 // RFREE
843795 if (pdbHeader .getRfree () != PDBHeader .DEFAULT_RFREE ) {
844796 logger .warn ("More than 1 Rfree value present, will use last one {} and discard previous {}" ,
@@ -852,7 +804,7 @@ public void consumeRefine(Refine refine) {
852804 }
853805
854806 // RWORK
855- LsRFactorRWork lsRFactorRWork = refine .getLsRFactorRWork ();
807+ FloatColumn lsRFactorRWork = refine .getLsRFactorRWork ();
856808 if (pdbHeader .getRwork () != PDBHeader .DEFAULT_RFREE ) {
857809 logger .warn ("More than 1 R work value present, will use last one {} and discard previous {} " ,
858810 lsRFactorRWork , String .format ("%4.2f" ,pdbHeader .getRwork ()));
@@ -898,7 +850,7 @@ public void consumeStructConnType(StructConnType structConnType) {
898850
899851 @ Override
900852 public void consumeStructKeywords (StructKeywords structKeywords ) {
901- PdbxKeywords pdbxKeywords = structKeywords .getPdbxKeywords ();
853+ StrColumn pdbxKeywords = structKeywords .getPdbxKeywords ();
902854 // TODO what is the correct format for these?
903855 pdbHeader .setDescription (pdbxKeywords .values ().collect (Collectors .joining (", " )));
904856 pdbHeader .setClassification (pdbxKeywords .values ().collect (Collectors .joining (", " )));
@@ -978,7 +930,7 @@ public void consumeStructRefSeq(StructRefSeq structRefSeq) {
978930 int dbSeqEnd = structRefSeq .getDbAlignEnd ().get (rowIndex );
979931
980932 char dbBeginInsCode = ' ' ;
981- PdbxDbAlignBegInsCode pdbxDbAlignBegInsCodeCol = structRefSeq .getPdbxDbAlignBegInsCode ();
933+ StrColumn pdbxDbAlignBegInsCodeCol = structRefSeq .getPdbxDbAlignBegInsCode ();
982934 if (pdbxDbAlignBegInsCodeCol .isDefined ()) {
983935 String pdbxDbAlignBegInsCode = pdbxDbAlignBegInsCodeCol .get (rowIndex );
984936 if (pdbxDbAlignBegInsCode .length () > 0 ) {
@@ -987,7 +939,7 @@ public void consumeStructRefSeq(StructRefSeq structRefSeq) {
987939 }
988940
989941 char dbEndInsCode = ' ' ;
990- PdbxDbAlignEndInsCode pdbxDbAlignEndInsCodeCol = structRefSeq .getPdbxDbAlignEndInsCode ();
942+ StrColumn pdbxDbAlignEndInsCodeCol = structRefSeq .getPdbxDbAlignEndInsCode ();
991943 if (pdbxDbAlignEndInsCodeCol .isDefined ()) {
992944 String pdbxDbAlignEndInsCode = pdbxDbAlignEndInsCodeCol .get (rowIndex );
993945 if (pdbxDbAlignEndInsCode .length () > 0 ) {
@@ -1157,6 +1109,7 @@ public void finish() {
11571109 SeqRes2AtomAligner .storeUnAlignedSeqRes (structure , seqResChains , params .isHeaderOnly ());
11581110 }
11591111
1112+ // TODO java.lang.NullPointerException - failed for /var/bcif/hm/2hmz.bcif
11601113 // Now make sure all altlocgroups have all the atoms in all the groups
11611114 StructureTools .cleanUpAltLocs (structure );
11621115
0 commit comments