3939import org .rcsb .cif .model .FloatColumn ;
4040import org .rcsb .cif .model .IntColumn ;
4141import org .rcsb .cif .model .StrColumn ;
42+ import org .rcsb .cif .model .ValueKind ;
4243import org .rcsb .cif .schema .mm .AtomSite ;
4344import org .rcsb .cif .schema .mm .AtomSites ;
4445import org .rcsb .cif .schema .mm .AuditAuthor ;
@@ -829,7 +830,7 @@ public void consumeRefine(Refine refine) {
829830 logger .warn ("More than 1 Rfree value present, will use last one {} and discard previous {}" ,
830831 lsRFactorRFree , String .format ("%4.2f" ,pdbHeader .getRfree ()));
831832 }
832- if (lsRFactorRFree .isDefined ()) {
833+ if (lsRFactorRFree .isDefined () && lsRFactorRFree . getValueKind ( rowIndex ) == ValueKind . PRESENT ) {
833834 pdbHeader .setRfree ((float ) lsRFactorRFree .get (rowIndex ));
834835 } else {
835836 // some entries like 2ifo haven't got this field at all
@@ -842,7 +843,7 @@ public void consumeRefine(Refine refine) {
842843 logger .warn ("More than 1 R work value present, will use last one {} and discard previous {} " ,
843844 lsRFactorRWork , String .format ("%4.2f" ,pdbHeader .getRwork ()));
844845 }
845- if (lsRFactorRWork .isDefined ()) {
846+ if (lsRFactorRWork .isDefined () && lsRFactorRWork . getValueKind ( rowIndex ) == ValueKind . PRESENT ) {
846847 pdbHeader .setRwork ((float ) lsRFactorRWork .get (rowIndex ));
847848 } else {
848849 logger .info ("_refine.ls_R_factor_R_work not present, not parsing R-work value" );
0 commit comments