2222 * @since 5.2.1
2323 */
2424class CifFileSupplierImpl implements CifFileSupplier <Structure > {
25-
26-
2725 @ Override
2826 public CifFile get (Structure structure ) {
2927 // for now BioJava only considered 3 categories for create a Cif representation of a structure
@@ -47,27 +45,27 @@ public CifFile get(Structure structure) {
4745 if (crystalCell != null ) {
4846 // set cell category
4947 blockBuilder .enterCategory ("cell" )
50- .enterColumn ("length_a" )
48+ .enterFloatColumn ("length_a" )
5149 .floatValues (crystalCell .getA ())
5250 .leaveColumn ()
5351
54- .enterColumn ("length_b" )
52+ .enterFloatColumn ("length_b" )
5553 .floatValues (crystalCell .getB ())
5654 .leaveColumn ()
5755
58- .enterColumn ("length_c" )
56+ .enterFloatColumn ("length_c" )
5957 .floatValues (crystalCell .getC ())
6058 .leaveColumn ()
6159
62- .enterColumn ("angle_alpha" )
60+ .enterFloatColumn ("angle_alpha" )
6361 .floatValues (crystalCell .getAlpha ())
6462 .leaveColumn ()
6563
66- .enterColumn ("angle_beta" )
64+ .enterFloatColumn ("angle_beta" )
6765 .floatValues (crystalCell .getBeta ())
6866 .leaveColumn ()
6967
70- .enterColumn ("angle_gamma" )
68+ .enterFloatColumn ("angle_gamma" )
7169 .floatValues (crystalCell .getGamma ())
7270 .leaveColumn ()
7371 .leaveCategory ();
@@ -76,7 +74,7 @@ public CifFile get(Structure structure) {
7674 if (spaceGroup != null ) {
7775 // set symmetry category
7876 blockBuilder .enterCategory ("symmetry" )
79- .enterColumn ("space_group_name_H-M" )
77+ .enterStrColumn ("space_group_name_H-M" )
8078 .stringValues (spaceGroup .getShortSymbol ())
8179 .leaveColumn ()
8280 .leaveCategory ();
@@ -200,29 +198,28 @@ static class AtomSiteCollector implements Consumer<WrappedAtom> {
200198 private final Column .StrColumnBuilder authAsymId ;
201199 private final Column .StrColumnBuilder authAtomId ;
202200 private final Column .IntColumnBuilder pdbxPDBModelNum ;
203- private int atomId = 1 ;
204201
205202 AtomSiteCollector () {
206- this .groupPDB = Column .enterStrColumn ("group_PDB" );
207- this .id = Column .enterIntColumn ("id" );
208- this .typeSymbol = Column .enterStrColumn ("type_symbol" );
209- this .labelAtomId = Column .enterStrColumn ("label_atom_id" );
210- this .labelAltId = Column .enterStrColumn ("label_alt_id" );
211- this .labelCompId = Column .enterStrColumn ("label_comp_id" );
212- this .labelAsymId = Column .enterStrColumn ("label_asym_id" );
213- this .labelEntityId = Column .enterStrColumn ("label_entity_id" );
214- this .labelSeqId = Column .enterIntColumn ("label_seq_id" );
215- this .pdbxPDBInsCode = Column .enterStrColumn ("pdbx_PDB_ins_code" );
216- this .cartnX = Column .enterFloatColumn ("Cartn_x" );
217- this .cartnY = Column .enterFloatColumn ("Cartn_y" );
218- this .cartnZ = Column .enterFloatColumn ("Cartn_z" );
219- this .occupancy = Column .enterFloatColumn ("occupancy" );
220- this .bIsoOrEquiv = Column .enterFloatColumn ("B_iso_or_equiv" );
221- this .authSeqId = Column .enterIntColumn ("auth_seq_id" );
222- this .authCompId = Column .enterStrColumn ("auth_comp_id" );
223- this .authAsymId = Column .enterStrColumn ("auth_asym_id" );
224- this .authAtomId = Column .enterStrColumn ("auth_atom_id" );
225- this .pdbxPDBModelNum = Column .enterIntColumn ("pdbx_PDB_model_num" );
203+ this .groupPDB = Column .enterStrColumn ("atom_site" , " group_PDB" );
204+ this .id = Column .enterIntColumn ("atom_site" , " id" );
205+ this .typeSymbol = Column .enterStrColumn ("atom_site" , " type_symbol" );
206+ this .labelAtomId = Column .enterStrColumn ("atom_site" , " label_atom_id" );
207+ this .labelAltId = Column .enterStrColumn ("atom_site" , " label_alt_id" );
208+ this .labelCompId = Column .enterStrColumn ("atom_site" , " label_comp_id" );
209+ this .labelAsymId = Column .enterStrColumn ("atom_site" , " label_asym_id" );
210+ this .labelEntityId = Column .enterStrColumn ("atom_site" , " label_entity_id" );
211+ this .labelSeqId = Column .enterIntColumn ("atom_site" , " label_seq_id" );
212+ this .pdbxPDBInsCode = Column .enterStrColumn ("atom_site" , " pdbx_PDB_ins_code" );
213+ this .cartnX = Column .enterFloatColumn ("atom_site" , " Cartn_x" );
214+ this .cartnY = Column .enterFloatColumn ("atom_site" , " Cartn_y" );
215+ this .cartnZ = Column .enterFloatColumn ("atom_site" , " Cartn_z" );
216+ this .occupancy = Column .enterFloatColumn ("atom_site" , " occupancy" );
217+ this .bIsoOrEquiv = Column .enterFloatColumn ("atom_site" , " B_iso_or_equiv" );
218+ this .authSeqId = Column .enterIntColumn ("atom_site" , " auth_seq_id" );
219+ this .authCompId = Column .enterStrColumn ("atom_site" , " auth_comp_id" );
220+ this .authAsymId = Column .enterStrColumn ("atom_site" , " auth_asym_id" );
221+ this .authAtomId = Column .enterStrColumn ("atom_site" , " auth_atom_id" );
222+ this .pdbxPDBModelNum = Column .enterIntColumn ("atom_site" , " pdbx_PDB_model_num" );
226223 }
227224
228225 @ Override
@@ -275,8 +272,6 @@ public void accept(WrappedAtom wrappedAtom) {
275272 authAsymId .stringValues (wrappedAtom .getChainName ());
276273 authAtomId .stringValues (atom .getName ());
277274 pdbxPDBModelNum .intValues (wrappedAtom .getModel ());
278-
279- atomId ++;
280275 }
281276
282277 AtomSiteCollector combine (AtomSiteCollector other ) {
0 commit comments