Not sure whether anyone would care now that we got our marching orders to abandon PDB format and move to mmCIF, but the output of phenix.real_space_refine includes a number of lines that are not legit PDB records, i.e. this section ... REMARK 3 GEOMETRY RESTRAINTS LIBRARY: CDL v1.2 DEVIATIONS FROM IDEAL VALUES. BOND : 0.004 0.049 74053 ANGLE : 0.747 12.299 100513 CHIRALITY : 0.052 0.232 11312 PLANARITY : 0.006 0.069 13125 DIHEDRAL : 11.589 179.958 44947 MIN NONBONDED DISTANCE : 2.276 MOLPROBITY STATISTICS. ALL-ATOM CLASHSCORE : 5.04 RAMACHANDRAN PLOT: OUTLIERS : 0.30 % ALLOWED : 8.63 % FAVORED : 91.06 % ROTAMER OUTLIERS : 8.76 % CBETA DEVIATIONS : 0 PEPTIDE PLANE: CIS-PROLINE : 3.7037037037 CIS-GENERAL : 0.0 TWISTED PROLINE : 1.85185185185 TWISTED GENERAL : 0.316455696203 REMARK 3 ... This does result in errors when this output PDB file is used as input to other software that is more stringent with format compliance. Cheers, Ed.