826 auto refine = db[
"refine"].front();
827 auto ls_shell = db[
"refine_ls_shell"].front();
828 auto hist = db[
"refine_hist"].front();
829 auto reflns = db[
"reflns"].front();
830 auto analyze = db[
"refine_analyze"].front();
831 auto &ls_restr = db[
"refine_ls_restr"];
836 pdbFile <<
RM3(
"") << std::endl
837 <<
RM3(
" DATA USED IN REFINEMENT.") << std::endl
838 <<
RM3(
" RESOLUTION RANGE HIGH (ANGSTROMS) : ", 5, 2) << Ff(refine,
"ls_d_res_high") << std::endl
839 <<
RM3(
" RESOLUTION RANGE LOW (ANGSTROMS) : ", 5, 2) << Ff(refine,
"ls_d_res_low") << std::endl
840 <<
RM3(
" DATA CUTOFF (SIGMA(F)) : ", 6, 3) << Ff(refine,
"pdbx_ls_sigma_F") << std::endl
841 <<
RM3(
" COMPLETENESS FOR RANGE (%) : ", 6, 1) << Ff(refine,
"ls_percent_reflns_obs") << std::endl
842 <<
RM3(
" NUMBER OF REFLECTIONS : ", 12, 6) << Fi(refine,
"ls_number_reflns_obs") << std::endl
844 <<
RM3(
"") << std::endl
845 <<
RM3(
" FIT TO DATA USED IN REFINEMENT.") << std::endl
846 <<
RM3(
" CROSS-VALIDATION METHOD : ") << Fs(refine,
"pdbx_ls_cross_valid_method") << std::endl
847 <<
RM3(
" FREE R VALUE TEST SET SELECTION : ") << Fs(refine,
"pdbx_R_Free_selection_details") << std::endl
848 <<
RM3(
" R VALUE (WORKING + TEST SET) : ", 7, 3) << Ff(refine,
"ls_R_factor_obs") << std::endl
849 <<
RM3(
" R VALUE (WORKING SET) : ", 7, 3) << Ff(refine,
"ls_R_factor_R_work") << std::endl
850 <<
RM3(
" FREE R VALUE : ", 7, 3) << Ff(refine,
"ls_R_factor_R_free") << std::endl
851 <<
RM3(
" FREE R VALUE TEST SET SIZE (%) : ", 7, 3) << Ff(refine,
"ls_percent_reflns_R_free") << std::endl
852 <<
RM3(
" FREE R VALUE TEST SET COUNT : ", 12, 6) << Fi(refine,
"ls_number_reflns_R_free") << std::endl
853 <<
RM3(
" ESTIMATED ERROR OF FREE R VALUE : ", 7, 3) << Ff(refine,
"ls_R_factor_R_free_error") << std::endl
855 <<
RM3(
"") << std::endl
856 <<
RM3(
" FIT IN THE HIGHEST RESOLUTION BIN.") << std::endl
857 <<
RM3(
" TOTAL NUMBER OF BINS USED : ", 12, 6) << Fi(ls_shell,
"pdbx_total_number_of_bins_used") << std::endl
858 <<
RM3(
" BIN RESOLUTION RANGE HIGH (ANGSTROMS) : ", 5, 2) << Ff(ls_shell,
"d_res_high") << std::endl
859 <<
RM3(
" BIN RESOLUTION RANGE LOW (ANGSTROMS) : ", 5, 2) << Ff(ls_shell,
"d_res_low") << std::endl
860 <<
RM3(
" BIN COMPLETENESS (WORKING+TEST) (%) : ", 6, 2) << Ff(ls_shell,
"percent_reflns_obs") << std::endl
861 <<
RM3(
" REFLECTIONS IN BIN (WORKING + TEST SET) : ", 12, 6) << Fi(ls_shell,
"number_reflns_all") << std::endl
862 <<
RM3(
" BIN R VALUE (WORKING + TEST SET) : ", 8, 4) << Ff(ls_shell,
"R_factor_all") << std::endl
863 <<
RM3(
" REFLECTIONS IN BIN (WORKING SET) : ", 12, 6) << Fi(ls_shell,
"number_reflns_R_work") << std::endl
864 <<
RM3(
" BIN R VALUE (WORKING SET) : ", 8, 4) << Ff(ls_shell,
"R_factor_R_work") << std::endl
865 <<
RM3(
" BIN FREE R VALUE : ", 8, 4) << Ff(ls_shell,
"R_factor_R_free") << std::endl
866 <<
RM3(
" BIN FREE R VALUE TEST SET SIZE (%) : ", 6, 2) << Ff(ls_shell,
"percent_reflns_R_free") << std::endl
867 <<
RM3(
" BIN FREE R VALUE TEST SET COUNT : ", 12, 7) << Fi(ls_shell,
"number_reflns_R_free") << std::endl
868 <<
RM3(
" ESTIMATED ERROR OF BIN FREE R VALUE : ", 7, 3) << Ff(ls_shell,
"R_factor_R_free_error") << std::endl
870 <<
RM3(
"") << std::endl
871 <<
RM3(
" NUMBER OF NON-HYDROGEN ATOMS USED IN REFINEMENT.") << std::endl
872 <<
RM3(
" PROTEIN ATOMS : ", 12, 6) << Fi(hist,
"pdbx_number_atoms_protein") << std::endl
873 <<
RM3(
" NUCLEIC ACID ATOMS : ", 12, 6) << Fi(hist,
"pdbx_number_atoms_nucleic_acid") << std::endl
874 <<
RM3(
" HETEROGEN ATOMS : ", 12, 6) << Fi(hist,
"pdbx_number_atoms_ligand") << std::endl
875 <<
RM3(
" SOLVENT ATOMS : ", 12, 6) << Fi(hist,
"number_atoms_solvent") << std::endl
877 <<
RM3(
"") << std::endl
878 <<
RM3(
" B VALUES.") << std::endl
880 <<
RM3(
" FROM WILSON PLOT (A**2) : ", 7, 2) << Ff(reflns,
"B_iso_Wilson_estimate") << std::endl
881 <<
RM3(
" MEAN B VALUE (OVERALL, A**2) : ", 7, 2) << Ff(refine,
"B_iso_mean") << std::endl
883 <<
RM3(
" OVERALL ANISOTROPIC B VALUE.") << std::endl
884 <<
RM3(
" B11 (A**2) : ", -8, 5) << Ff(refine,
"aniso_B[1][1]") << std::endl
885 <<
RM3(
" B22 (A**2) : ", -8, 5) << Ff(refine,
"aniso_B[2][2]") << std::endl
886 <<
RM3(
" B33 (A**2) : ", -8, 5) << Ff(refine,
"aniso_B[3][3]") << std::endl
887 <<
RM3(
" B12 (A**2) : ", -8, 5) << Ff(refine,
"aniso_B[1][2]") << std::endl
888 <<
RM3(
" B13 (A**2) : ", -8, 5) << Ff(refine,
"aniso_B[1][3]") << std::endl
889 <<
RM3(
" B23 (A**2) : ", -8, 5) << Ff(refine,
"aniso_B[2][3]") << std::endl
891 <<
RM3(
"") << std::endl
892 <<
RM3(
" ESTIMATED COORDINATE ERROR.") << std::endl
893 <<
RM3(
" ESD FROM LUZZATI PLOT (A) : ", 7, 3) << Ff(analyze,
"Luzzati_coordinate_error_obs") << std::endl
894 <<
RM3(
" DPI (BLOW EQ-10) BASED ON R VALUE (A) : ", 5, 3) << Ff(refine,
"pdbx_overall_SU_R_Blow_DPI") << std::endl
895 <<
RM3(
" DPI (BLOW EQ-9) BASED ON FREE R VALUE (A) : ", 5, 3) << Ff(refine,
"pdbx_overall_SU_R_free_Blow_DPI") << std::endl
896 <<
RM3(
" DPI (CRUICKSHANK) BASED ON R VALUE (A) : ", 5, 3) << Ff(refine,
"overall_SU_R_Cruickshank_DPI") << std::endl
897 <<
RM3(
" DPI (CRUICKSHANK) BASED ON FREE R VALUE (A) : ", 5, 3) << Ff(refine,
"pdbx_overall_SU_R_free_Cruickshank_DPI") << std::endl
899 <<
RM3(
"") << std::endl
900 <<
RM3(
" REFERENCES: BLOW, D. (2002) ACTA CRYST D58, 792-797") << std::endl
901 <<
RM3(
" CRUICKSHANK, D.W.J. (1999) ACTA CRYST D55, 583-601") << std::endl
903 <<
RM3(
"") << std::endl
904 <<
RM3(
" CORRELATION COEFFICIENTS.") << std::endl
905 <<
RM3(
" CORRELATION COEFFICIENT FO-FC : ", 5, 3) << Ff(refine,
"correlation_coeff_Fo_to_Fc") << std::endl
906 <<
RM3(
" CORRELATION COEFFICIENT FO-FC FREE : ", 5, 3) << Ff(refine,
"correlation_coeff_Fo_to_Fc_free") << std::endl
908 <<
RM3(
"") << std::endl
909 <<
RM3(
" NUMBER OF GEOMETRIC FUNCTION TERMS DEFINED : 15") << std::endl
910 <<
RM3(
" TERM COUNT WEIGHT FUNCTION.") << std::endl
911 <<
RM3(
" BOND LENGTHS : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_bond_d",
"number")
912 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_bond_d",
"weight")
913 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_bond_d",
"pdbx_restraint_function") << std::endl
914 <<
RM3(
" BOND ANGLES : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_angle_deg",
"number")
915 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_angle_deg",
"weight")
916 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_angle_deg",
"pdbx_restraint_function") << std::endl
917 <<
RM3(
" TORSION ANGLES : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_dihedral_angle_d",
"number")
918 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_dihedral_angle_d",
"weight")
919 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_dihedral_angle_d",
"pdbx_restraint_function") << std::endl
920 <<
RM3(
" TRIGONAL CARBON PLANES : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_trig_c_planes",
"number")
921 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_trig_c_planes",
"weight")
922 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_trig_c_planes",
"pdbx_restraint_function") << std::endl
923 <<
RM3(
" GENERAL PLANES : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_gen_planes",
"number")
924 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_gen_planes",
"weight")
925 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_gen_planes",
"pdbx_restraint_function") << std::endl
926 <<
RM3(
" ISOTROPIC THERMAL FACTORS : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_it",
"number")
927 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_it",
"weight")
928 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_it",
"pdbx_restraint_function") << std::endl
929 <<
RM3(
" BAD NON-BONDED CONTACTS : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_nbd",
"number")
930 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_nbd",
"weight")
931 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_nbd",
"pdbx_restraint_function") << std::endl
932 <<
RM3(
" IMPROPER TORSIONS : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_improper_torsion",
"number")
933 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_improper_torsion",
"weight")
934 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_improper_torsion",
"pdbx_restraint_function") << std::endl
935 <<
RM3(
" PSEUDOROTATION ANGLES : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_pseud_angle",
"number")
936 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_pseud_angle",
"weight")
937 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_pseud_angle",
"pdbx_restraint_function") << std::endl
938 <<
RM3(
" CHIRAL IMPROPER TORSION : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_chiral_improper_torsion",
"number")
939 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_chiral_improper_torsion",
"weight")
940 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_chiral_improper_torsion",
"pdbx_restraint_function") << std::endl
941 <<
RM3(
" SUM OF OCCUPANCIES : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_sum_occupancies",
"number")
942 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_sum_occupancies",
"weight")
943 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_sum_occupancies",
"pdbx_restraint_function") << std::endl
944 <<
RM3(
" UTILITY DISTANCES : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_utility_distance",
"number")
945 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_utility_distance",
"weight")
946 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_utility_distance",
"pdbx_restraint_function") << std::endl
947 <<
RM3(
" UTILITY ANGLES : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_utility_angle",
"number")
948 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_utility_angle",
"weight")
949 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_utility_angle",
"pdbx_restraint_function") << std::endl
950 <<
RM3(
" UTILITY TORSION : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_utility_torsion",
"number")
951 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_utility_torsion",
"weight")
952 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_utility_torsion",
"pdbx_restraint_function") << std::endl
953 <<
RM3(
" IDEAL-DIST CONTACT TERM : ", 7, 0) << Ff(ls_restr, key(
"type") ==
"t_ideal_dist_contact",
"number")
954 <<
SEP(
"; ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_ideal_dist_contact",
"weight")
955 <<
SEP(
"; ", 12) << Fs(ls_restr, key(
"type") ==
"t_ideal_dist_contact",
"pdbx_restraint_function") << std::endl
957 <<
RM3(
"") << std::endl
958 <<
RM3(
" RMS DEVIATIONS FROM IDEAL VALUES.") << std::endl
959 <<
RM3(
" BOND LENGTHS (A) : ", 7, 3) << Ff(ls_restr, key(
"type") ==
"t_bond_d",
"dev_ideal") << std::endl
960 <<
RM3(
" BOND ANGLES (DEGREES) : ", 7, 2) << Ff(ls_restr, key(
"type") ==
"t_angle_deg",
"dev_ideal") << std::endl
961 <<
RM3(
" PEPTIDE OMEGA TORSION ANGLES (DEGREES) : ", 7, 2) << Ff(ls_restr, key(
"type") ==
"t_omega_torsion",
"dev_ideal") << std::endl
962 <<
RM3(
" OTHER TORSION ANGLES (DEGREES) : ", 7, 2) << Ff(ls_restr, key(
"type") ==
"t_other_torsion",
"dev_ideal") << std::endl;
964 auto &tls = db[
"pdbx_refine_tls"];
966 pdbFile <<
RM3(
"") << std::endl
967 <<
RM3(
" TLS DETAILS") << std::endl
968 <<
RM3(
" NUMBER OF TLS GROUPS : ") << (tls.size() ?
std::to_string(tls.size()) :
"NULL") << std::endl;
972 std::string
id = t[
"id"].as<std::string>();
973 auto g = db[
"pdbx_refine_tls_group"].find_first(key(
"refine_tls_id") ==
id);
975 pdbFile <<
RM3(
"") << std::endl
976 <<
RM3(
" TLS GROUP : ") <<
id << std::endl
977 <<
RM3(
" SELECTION: ") << Fs(g,
"selection_details") << std::endl;
979 pdbFile <<
RM3(
" ORIGIN FOR THE GROUP (A):", -9, 4) << Ff(t,
"origin_x")
980 <<
SEP(
"", -9, 4) << Ff(t,
"origin_y")
981 <<
SEP(
"", -9, 4) << Ff(t,
"origin_z") << std::endl
982 <<
RM3(
" T TENSOR") << std::endl
983 <<
RM3(
" T11:", -9, 4) << Ff(t,
"T[1][1]") <<
SEP(
" T22:", -9, 4) << Ff(t,
"T[2][2]") << std::endl
984 <<
RM3(
" T33:", -9, 4) << Ff(t,
"T[3][3]") <<
SEP(
" T12:", -9, 4) << Ff(t,
"T[1][2]") << std::endl
985 <<
RM3(
" T13:", -9, 4) << Ff(t,
"T[1][3]") <<
SEP(
" T23:", -9, 4) << Ff(t,
"T[2][3]") << std::endl
986 <<
RM3(
" L TENSOR") << std::endl
987 <<
RM3(
" L11:", -9, 4) << Ff(t,
"L[1][1]") <<
SEP(
" L22:", -9, 4) << Ff(t,
"L[2][2]") << std::endl
988 <<
RM3(
" L33:", -9, 4) << Ff(t,
"L[3][3]") <<
SEP(
" L12:", -9, 4) << Ff(t,
"L[1][2]") << std::endl
989 <<
RM3(
" L13:", -9, 4) << Ff(t,
"L[1][3]") <<
SEP(
" L23:", -9, 4) << Ff(t,
"L[2][3]") << std::endl
990 <<
RM3(
" S TENSOR") << std::endl
991 <<
RM3(
" S11:", -9, 4) << Ff(t,
"S[1][1]") <<
SEP(
" S12:", -9, 4) << Ff(t,
"S[1][2]") <<
SEP(
" S13:", -9, 4) << Ff(t,
"S[1][3]") << std::endl
992 <<
RM3(
" S21:", -9, 4) << Ff(t,
"S[2][1]") <<
SEP(
" S22:", -9, 4) << Ff(t,
"S[2][2]") <<
SEP(
" S23:", -9, 4) << Ff(t,
"S[2][3]") << std::endl
993 <<
RM3(
" S31:", -9, 4) << Ff(t,
"S[3][1]") <<
SEP(
" S32:", -9, 4) << Ff(t,
"S[3][2]") <<
SEP(
" S33:", -9, 4) << Ff(t,
"S[3][3]") << std::endl;
996 pdbFile <<
RM3(
"") << std::endl;
std::string to_string(bond_type bondType)