Commit 28620841 by maarten

prolsq/nuclsq

git-svn-id: svn+ssh://gitlab/srv/svn-repos/pdb-redo/trunk@364 a1961a4f-ab94-4bcc-80e8-33b5a54de466
parent e0d2c132
...@@ -1853,6 +1853,110 @@ void WriteRemark3XPlor(ostream& pdbFile, Datablock& db) ...@@ -1853,6 +1853,110 @@ void WriteRemark3XPlor(ostream& pdbFile, Datablock& db)
<< RM3("") << endl; << RM3("") << endl;
} }
void WriteRemark3NuclSQ(ostream& pdbFile, Datablock& db)
{
auto refine = db["refine"].front();
auto pdbx_refine = db["pdbx_refine"].front();
auto hist = db["refine_hist"].front();
auto reflns = db["reflns"].front();
auto analyze = db["refine_analyze"].front();
auto& ls_restr = db["refine_ls_restr"];
pdbFile << RM3("") << endl
<< RM3(" DATA USED IN REFINEMENT.") << endl
<< RM3(" RESOLUTION RANGE HIGH (ANGSTROMS) : ", 5, 2) << Ff(refine, "ls_d_res_high") << endl
<< RM3(" RESOLUTION RANGE LOW (ANGSTROMS) : ", 5, 2) << Ff(refine, "ls_d_res_low") << endl
<< RM3(" DATA CUTOFF (SIGMA(F)) : ", 6, 3) << Ff(refine, "pdbx_ls_sigma_F") << endl
<< RM3(" COMPLETENESS FOR RANGE (%) : ", 5, 2) << Ff(refine, "ls_percent_reflns_obs") << endl
<< RM3(" NUMBER OF REFLECTIONS : ", 12, 6) << Fi(refine, "ls_number_reflns_obs") << endl
<< RM3("") << endl
<< RM3(" FIT TO DATA USED IN REFINEMENT.") << endl
<< RM3(" CROSS-VALIDATION METHOD : ") << Fs(refine, "pdbx_ls_cross_valid_method") << endl
<< RM3(" FREE R VALUE TEST SET SELECTION : ") << Fs(refine, "pdbx_R_Free_selection_details") << endl
<< RM3(" R VALUE (WORKING + TEST SET) : ", 7, 3) << Ff(refine, "ls_R_factor_obs") << endl
<< RM3(" R VALUE (WORKING SET) : ", 7, 3) << Ff(refine, "ls_R_factor_R_work") << endl
<< RM3(" FREE R VALUE : ", 7, 3) << Ff(refine, "ls_R_factor_R_free") << endl
<< RM3(" FREE R VALUE TEST SET SIZE (%) : ", 7, 3) << Ff(refine, "ls_percent_reflns_R_free") << endl
<< RM3(" FREE R VALUE TEST SET COUNT : ", 12, 6) << Fi(refine, "ls_number_reflns_R_free") << endl
<< RM3("") << endl
<< RM3(" FIT/AGREEMENT OF MODEL WITH ALL DATA.") << endl
<< RM3(" R VALUE (WORKING + TEST SET, NO CUTOFF) : ") << Fs(pdbx_refine, "R_factor_all_no_cutoff") << endl
<< RM3(" R VALUE (WORKING SET, NO CUTOFF) : ") << Fs(pdbx_refine, "R_factor_obs_no_cutoff") << endl
<< RM3(" FREE R VALUE (NO CUTOFF) : ") << Fs(pdbx_refine, "free_R_factor_no_cutoff") << endl
<< RM3(" FREE R VALUE TEST SET SIZE (%, NO CUTOFF) : ") << Fs(pdbx_refine, "free_R_val_test_set_size_perc_no_cutoff") << endl
<< RM3(" FREE R VALUE TEST SET COUNT (NO CUTOFF) : ") << Fs(pdbx_refine, "free_R_val_test_set_ct_no_cutoff") << endl
<< RM3(" TOTAL NUMBER OF REFLECTIONS (NO CUTOFF) : ") << Fs(refine, "ls_number_reflns_all") << endl
<< RM3("") << endl
<< RM3(" NUMBER OF NON-HYDROGEN ATOMS USED IN REFINEMENT.") << endl
<< RM3(" PROTEIN ATOMS : ", 12, 6) << Fi(hist, "pdbx_number_atoms_protein") << endl
<< RM3(" NUCLEIC ACID ATOMS : ", 12, 6) << Fi(hist, "pdbx_number_atoms_nucleic_acid") << endl
<< RM3(" HETEROGEN ATOMS : ", 12, 6) << Fi(hist, "pdbx_number_atoms_ligand") << endl
<< RM3(" SOLVENT ATOMS : ", 12, 6) << Fi(hist, "number_atoms_solvent") << endl
// << RM3(" ALL ATOMS : ", 12, 6) << Fi(hist, "pdbx_number_atoms_protein") << endl
<< RM3("") << endl
<< RM3(" B VALUES.") << endl
<< RM3(" B VALUE TYPE : ", 7, 2) << Fs(refine, "pdbx_TLS_residual_ADP_flag") << endl
<< RM3(" FROM WILSON PLOT (A**2) : ", 7, 2) << Ff(reflns, "B_iso_Wilson_estimate") << endl
<< RM3(" MEAN B VALUE (OVERALL, A**2) : ", 7, 2) << Ff(refine, "B_iso_mean") << endl
<< RM3(" OVERALL ANISOTROPIC B VALUE.") << endl
<< RM3(" B11 (A**2) : ", -7, 2) << Ff(refine, "aniso_B[1][1]") << endl
<< RM3(" B22 (A**2) : ", -7, 2) << Ff(refine, "aniso_B[2][2]") << endl
<< RM3(" B33 (A**2) : ", -7, 2) << Ff(refine, "aniso_B[3][3]") << endl
<< RM3(" B12 (A**2) : ", -7, 2) << Ff(refine, "aniso_B[1][2]") << endl
<< RM3(" B13 (A**2) : ", -7, 2) << Ff(refine, "aniso_B[1][3]") << endl
<< RM3(" B23 (A**2) : ", -7, 2) << Ff(refine, "aniso_B[2][3]") << endl
<< RM3("") << endl
<< RM3(" ESTIMATED COORDINATE ERROR.") << endl
<< RM3(" ESD FROM LUZZATI PLOT (A) : ", 7, 2) << Ff(analyze, "Luzzati_coordinate_error_obs") << endl
<< RM3(" ESD FROM SIGMAA (A) : ", 7, 2) << Ff(analyze, "Luzzati_sigma_a_obs") << endl
<< RM3(" LOW RESOLUTION CUTOFF (A) : ", 7, 2) << Ff(analyze, "Luzzati_d_res_low_obs") << endl
<< RM3("") << endl
<< RM3(" RMS DEVIATIONS FROM IDEAL VALUES.") << endl
<< RM3(" DISTANCE RESTRAINTS. RMS SIGMA") << endl
<< RM3(" SUGAR-BASE BOND DISTANCE (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_sugar_bond_d", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_sugar_bond_d", "dev_ideal_target") << endl
<< RM3(" SUGAR-BASE BOND ANGLE DISTANCE (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_sugar_bond_angle_d", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_sugar_bond_angle_d", "dev_ideal_target") << endl
<< RM3(" PHOSPHATE BONDS DISTANCE (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_phos_bond_d", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_phos_bond_d", "dev_ideal_target") << endl
<< RM3(" PHOSPHATE BOND ANGLE, H-BOND (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_phos_bond_angle_d", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_phos_bond_angle_d", "dev_ideal_target") << endl
<< RM3("") << endl
<< RM3(" PLANE RESTRAINT (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_plane_restr", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_plane_restr", "dev_ideal_target") << endl
<< RM3(" CHIRAL-CENTER RESTRAINT (A**3) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_chiral_restr", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_chiral_restr", "dev_ideal_target") << endl
<< RM3("") << endl
<< RM3(" NON-BONDED CONTACT RESTRAINTS.") << endl
<< RM3(" SINGLE TORSION CONTACT (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_singtor_nbd", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_singtor_nbd", "dev_ideal_target") << endl
<< RM3(" MULTIPLE TORSION CONTACT (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_multtor_nbd", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_multtor_nbd", "dev_ideal_target") << endl
<< RM3("") << endl
<< RM3(" ISOTROPIC THERMAL FACTOR RESTRAINTS. RMS SIGMA") << endl
<< RM3(" SUGAR-BASE BONDS (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_sugar_bond_it", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_sugar_bond_it", "dev_ideal_target") << endl
<< RM3(" SUGAR-BASE ANGLES (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_sugar_angle_it", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_sugar_angle_it", "dev_ideal_target") << endl
<< RM3(" PHOSPHATE BONDS (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_phos_bond_it", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_phos_bond_it", "dev_ideal_target") << endl
<< RM3(" PHOSPHATE BOND ANGLE, H-BOND (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "n_phos_angle_it", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "n_phos_angle_it", "dev_ideal_target") << endl
<< RM3("") << endl;
}
void WriteRemark3ProlSQ(ostream& pdbFile, Datablock& db) void WriteRemark3ProlSQ(ostream& pdbFile, Datablock& db)
{ {
auto refine = db["refine"].front(); auto refine = db["refine"].front();
...@@ -1883,8 +1987,8 @@ void WriteRemark3ProlSQ(ostream& pdbFile, Datablock& db) ...@@ -1883,8 +1987,8 @@ void WriteRemark3ProlSQ(ostream& pdbFile, Datablock& db)
<< RM3("") << endl << RM3("") << endl
<< RM3(" FIT/AGREEMENT OF MODEL WITH ALL DATA.") << endl << RM3(" FIT/AGREEMENT OF MODEL WITH ALL DATA.") << endl
<< RM3(" R VALUE (WORKING + TEST SET, NO CUTOFF) : ") << Fs(refine, "R_factor_all_no_cutoff") << endl << RM3(" R VALUE (WORKING + TEST SET, NO CUTOFF) : ") << Fs(pdbx_refine, "R_factor_all_no_cutoff") << endl
<< RM3(" R VALUE (WORKING SET, NO CUTOFF) : ") << Fs(refine, "R_factor_obs_no_cutoff") << endl << RM3(" R VALUE (WORKING SET, NO CUTOFF) : ") << Fs(pdbx_refine, "R_factor_obs_no_cutoff") << endl
<< RM3(" FREE R VALUE (NO CUTOFF) : ") << Fs(pdbx_refine, "free_R_factor_no_cutoff") << endl << RM3(" FREE R VALUE (NO CUTOFF) : ") << Fs(pdbx_refine, "free_R_factor_no_cutoff") << endl
<< RM3(" FREE R VALUE TEST SET SIZE (%, NO CUTOFF) : ") << Fs(pdbx_refine, "free_R_val_test_set_size_perc_no_cutoff") << endl << RM3(" FREE R VALUE TEST SET SIZE (%, NO CUTOFF) : ") << Fs(pdbx_refine, "free_R_val_test_set_size_perc_no_cutoff") << endl
...@@ -1913,66 +2017,63 @@ void WriteRemark3ProlSQ(ostream& pdbFile, Datablock& db) ...@@ -1913,66 +2017,63 @@ void WriteRemark3ProlSQ(ostream& pdbFile, Datablock& db)
<< RM3(" B23 (A**2) : ", -7, 2) << Ff(refine, "aniso_B[2][3]") << endl << RM3(" B23 (A**2) : ", -7, 2) << Ff(refine, "aniso_B[2][3]") << endl
<< RM3("") << endl << RM3("") << endl
<< RM3(" ESTIMATED OVERALL COORDINATE ERROR.") << endl << RM3(" ESTIMATED COORDINATE ERROR.") << endl
<< RM3(" ESU BASED ON R VALUE (A) : ", 7, 2) << Ff(analyze, "pdbx_overall_ESU_R") << endl << RM3(" ESD FROM LUZZATI PLOT (A) : ", 7, 2) << Ff(analyze, "Luzzati_coordinate_error_obs") << endl
<< RM3(" ESU BASED ON FREE R VALUE (A) : ", 7, 2) << Ff(analyze, "pdbx_overall_ESU_R_Free") << endl << RM3(" ESD FROM SIGMAA (A) : ", 7, 2) << Ff(analyze, "Luzzati_sigma_a_obs") << endl
<< RM3(" ESU BASED ON MAXIMUM LIKELIHOOD (A) : ", 7, 2) << Ff(analyze, "overall_SU_ML") << endl << RM3(" LOW RESOLUTION CUTOFF (A) : ", 7, 2) << Ff(analyze, "Luzzati_d_res_low_obs") << endl
<< RM3(" ESU FOR B VALUES BASED ON MAXIMUM LIKELIHOOD (A) : ", 7, 2) << Ff(analyze, "overall_SU_B") << endl
<< RM3("") << endl << RM3("") << endl
<< RM3(" RMS DEVIATIONS FROM IDEAL VALUES.") << endl << RM3(" RMS DEVIATIONS FROM IDEAL VALUES.") << endl
<< RM3(" DISTANCE RESTRAINTS. RMS SIGMA") << endl << RM3(" DISTANCE RESTRAINTS. RMS SIGMA") << endl
<< RM3(" BOND LENGTH (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_bond_d", "dev_ideal") << " ; " << RM3(" BOND LENGTH (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_bond_d", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_bond_d", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_bond_d", "dev_ideal_target") << endl
<< RM3(" ANGLE DISTANCE (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_angle_d", "dev_ideal") << " ; " << RM3(" ANGLE DISTANCE (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_angle_d", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_angle_d", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_angle_d", "dev_ideal_target") << endl
<< RM3(" INTRAPLANAR 1-4 DISTANCE (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_planar_d", "dev_ideal") << " ; " << RM3(" INTRAPLANAR 1-4 DISTANCE (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_planar_d", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_planar_d", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_planar_d", "dev_ideal_target") << endl
<< RM3(" H-BOND OR METAL COORDINATION (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_hb_or_metal_coord", "dev_ideal") << " ; " << RM3(" H-BOND OR METAL COORDINATION (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_hb_or_metal_coord", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_hb_or_metal_coord", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_hb_or_metal_coord", "dev_ideal_target") << endl
<< RM3("") << endl << RM3("") << endl
<< RM3(" PLANE RESTRAINT (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_plane_restr", "dev_ideal") << " ; " << RM3(" PLANE RESTRAINT (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_plane_restr", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_plane_restr", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_plane_restr", "dev_ideal_target") << endl
<< RM3(" CHIRAL-CENTER RESTRAINT (A**3) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_chiral_restr", "dev_ideal") << " ; " << RM3(" CHIRAL-CENTER RESTRAINT (A**3) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_chiral_restr", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_chiral_restr", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_chiral_restr", "dev_ideal_target") << endl
<< RM3("") << endl << RM3("") << endl
<< RM3(" NON-BONDED CONTACT RESTRAINTS.") << endl << RM3(" NON-BONDED CONTACT RESTRAINTS.") << endl
<< RM3(" SINGLE TORSION (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_singtor_nbd", "dev_ideal") << " ; " << RM3(" SINGLE TORSION (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_singtor_nbd", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_singtor_nbd", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_singtor_nbd", "dev_ideal_target") << endl
<< RM3(" MULTIPLE TORSION (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_multtor_nbd", "dev_ideal") << " ; " << RM3(" MULTIPLE TORSION (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_multtor_nbd", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_multtor_nbd", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_multtor_nbd", "dev_ideal_target") << endl
<< RM3(" H-BOND (X...Y) (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_xyhbond_nbd", "dev_ideal") << " ; " << RM3(" H-BOND (X...Y) (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_xyhbond_nbd", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_xyhbond_nbd", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_xyhbond_nbd", "dev_ideal_target") << endl
<< RM3(" H-BOND (X-H...Y) (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_xhyhbond_nbd", "dev_ideal") << " ; " << RM3(" H-BOND (X-H...Y) (A) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_xhyhbond_nbd", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_xhyhbond_nbd", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_xhyhbond_nbd", "dev_ideal_target") << endl
<< RM3("") << endl << RM3("") << endl
<< RM3(" CONFORMATIONAL TORSION ANGLE RESTRAINTS.") << endl << RM3(" CONFORMATIONAL TORSION ANGLE RESTRAINTS.") << endl
<< RM3(" SPECIFIED (DEGREES) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_special_tor", "dev_ideal") << " ; " << RM3(" SPECIFIED (DEGREES) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_special_tor", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_special_tor", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_special_tor", "dev_ideal_target") << endl
<< RM3(" PLANAR (DEGREES) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_planar_tor", "dev_ideal") << " ; " << RM3(" PLANAR (DEGREES) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_planar_tor", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_planar_tor", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_planar_tor", "dev_ideal_target") << endl
<< RM3(" STAGGERED (DEGREES) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_staggered_tor", "dev_ideal") << " ; " << RM3(" STAGGERED (DEGREES) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_staggered_tor", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_staggered_tor", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_staggered_tor", "dev_ideal_target") << endl
<< RM3(" TRANSVERSE (DEGREES) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_transverse_tor", "dev_ideal") << " ; " << RM3(" TRANSVERSE (DEGREES) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_transverse_tor", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_transverse_tor", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_transverse_tor", "dev_ideal_target") << endl
<< RM3("") << endl << RM3("") << endl
<< RM3(" ISOTROPIC THERMAL FACTOR RESTRAINTS. RMS SIGMA") << endl << RM3(" ISOTROPIC THERMAL FACTOR RESTRAINTS. RMS SIGMA") << endl
<< RM3(" MAIN-CHAIN BOND (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_mcbond_it", "dev_ideal") << " ; " << RM3(" MAIN-CHAIN BOND (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_mcbond_it", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_mcbond_it", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_mcbond_it", "dev_ideal_target") << endl
<< RM3(" MAIN-CHAIN ANGLE (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_mcangle_it", "dev_ideal") << " ; " << RM3(" MAIN-CHAIN ANGLE (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_mcangle_it", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_mcangle_it", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_mcangle_it", "dev_ideal_target") << endl
<< RM3(" SIDE-CHAIN BOND (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_scbond_it", "dev_ideal") << " ; " << RM3(" SIDE-CHAIN BOND (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_scbond_it", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_scbond_it", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_scbond_it", "dev_ideal_target") << endl
<< RM3(" SIDE-CHAIN ANGLE (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_scangle_it", "dev_ideal") << " ; " << RM3(" SIDE-CHAIN ANGLE (A**2) : ", 7, 3) << Ff(ls_restr, cif::Key("type") == "p_scangle_it", "dev_ideal") << " ; "
<< Ff(ls_restr, cif::Key("type") == "p_scangle_it", "dev_ideal_target") << endl << Ff(ls_restr, cif::Key("type") == "p_scangle_it", "dev_ideal_target") << endl
<< RM3("") << endl; << RM3("") << endl;
} }
void WriteRemark3(ostream& pdbFile, Datablock& db) void WriteRemark3(ostream& pdbFile, Datablock& db)
...@@ -2038,7 +2139,9 @@ void WriteRemark3(ostream& pdbFile, Datablock& db) ...@@ -2038,7 +2139,9 @@ void WriteRemark3(ostream& pdbFile, Datablock& db)
WriteRemark3Shelxl(pdbFile, db); WriteRemark3Shelxl(pdbFile, db);
else if (cif::iequals(program, "PHENIX")) else if (cif::iequals(program, "PHENIX"))
WriteRemark3Phenix(pdbFile, db); WriteRemark3Phenix(pdbFile, db);
else if (cif::iequals(program, "PROLSQ") or cif::iequals(program, "NUCLSQ")) else if (cif::iequals(program, "NUCLSQ"))
WriteRemark3NuclSQ(pdbFile, db);
else if (cif::iequals(program, "PROLSQ"))
WriteRemark3ProlSQ(pdbFile, db); WriteRemark3ProlSQ(pdbFile, db);
} }
......
...@@ -327,6 +327,74 @@ void PHENIX_Remark3Parser::fixup() ...@@ -327,6 +327,74 @@ void PHENIX_Remark3Parser::fixup()
} }
} }
const TemplateLine kNUCLSQ_Template[] = {
/* 0 */ { R"(DATA USED IN REFINEMENT\.)", 1 },
/* 1 */ { R"(RESOLUTION RANGE HIGH \(ANGSTROMS\)\s*:\s*(.+))", 1, "refine", { "ls_d_res_high" } },
/* 2 */ { R"(RESOLUTION RANGE LOW \(ANGSTROMS\)\s*:\s*(.+))", 1, "refine", { "ls_d_res_low" } },
/* 3 */ { R"(DATA CUTOFF \(SIGMA\(F\)\)\s*:\s*(.+))", 1, "refine", { "pdbx_ls_sigma_F" } },
/* 4 */ { R"(COMPLETENESS FOR RANGE \(%\)\s*:\s*(.+))", 1, "refine", { "ls_percent_reflns_obs" } },
/* 5 */ { R"(NUMBER OF REFLECTIONS\s*:\s*(.+))", 1, "refine", { "ls_number_reflns_obs" } },
/* 6 */ { R"(FIT TO DATA USED IN REFINEMENT\.)", 1 },
/* 7 */ { R"(CROSS-VALIDATION METHOD\s*:\s*(.+))", 1, "refine", { "pdbx_ls_cross_valid_method" } },
/* 8 */ { R"(FREE R VALUE TEST SET SELECTION\s*:\s*(.+))", 1, "refine", { "pdbx_R_Free_selection_details" } },
/* 9 */ { R"(R VALUE \(WORKING \+ TEST SET\)\s*:\s*(.+))", 1, "refine", { "ls_R_factor_obs" } },
/* 10 */ { R"(R VALUE \(WORKING SET\)\s*:\s*(.+))", 1, "refine", { "ls_R_factor_R_work" } },
/* 11 */ { R"(FREE R VALUE\s*:\s*(.+))", 1, "refine", { "ls_R_factor_R_free" } },
/* 12 */ { R"(FREE R VALUE TEST SET SIZE \(%\)\s*:\s*(.+))", 1, "refine", { "ls_percent_reflns_R_free" } },
/* 13 */ { R"(FREE R VALUE TEST SET COUNT\s*:\s*(.+))", 1, "refine", { "ls_number_reflns_R_free" } },
/* 14 */ { R"(FIT/AGREEMENT OF MODEL WITH ALL DATA\.)", 1 },
/* 15 */ { R"(R VALUE \(WORKING \+ TEST SET, NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "R_factor_all_no_cutoff" } },
/* 16 */ { R"(R VALUE \(WORKING SET, NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "R_factor_obs_no_cutoff" } },
/* 17 */ { R"(FREE R VALUE \(NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "free_R_factor_no_cutoff" } },
/* 18 */ { R"(FREE R VALUE TEST SET SIZE \(%, NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "free_R_val_test_set_size_perc_no_cutoff" } },
/* 19 */ { R"(FREE R VALUE TEST SET COUNT \(NO CUTOFF\)\s*:\s*(.+))", 1, "pdbx_refine", { "free_R_val_test_set_ct_no_cutoff" } },
/* 20 */ { R"(TOTAL NUMBER OF REFLECTIONS \(NO CUTOFF\)\s*:\s*(.+))", 1, "refine", { "ls_number_reflns_all" } },
/* 21 */ { R"(NUMBER OF NON-HYDROGEN ATOMS USED IN REFINEMENT\.)", 1 },
/* 22 */ { R"(PROTEIN ATOMS\s*:\s*(.+))", 1, "refine_hist", { "pdbx_number_atoms_protein" } },
/* 23 */ { R"(NUCLEIC ACID ATOMS\s*:\s*(.+))", 1, "refine_hist", { "pdbx_number_atoms_nucleic_acid" } },
/* 24 */ { R"(HETEROGEN ATOMS\s*:\s*(.+))", 1, "refine_hist", { "pdbx_number_atoms_ligand" } },
/* 25 */ { R"(SOLVENT ATOMS\s*:\s*(.+))", 1, "refine_hist", { "number_atoms_solvent" } },
/* 26 */ { R"(B VALUES\.)", 1 },
/* 27 */ { R"(B VALUE TYPE\s*:\s*(.+))", 1, "refine", { "pdbx_TLS_residual_ADP_flag" } },
/* 28 */ { R"(FROM WILSON PLOT \(A\*\*2\)\s*:\s*(.+))", 1, "reflns", { "B_iso_Wilson_estimate" } },
/* 29 */ { R"(MEAN B VALUE \(OVERALL, A\*\*2\)\s*:\s*(.+))", 1, "refine", { "B_iso_mean" } },
/* 30 */ { R"(OVERALL ANISOTROPIC B VALUE\.)", 1 },
/* 31 */ { R"(B11 \(A\*\*2\)\s*:\s*(.+))", 1, "refine", { "aniso_B[1][1]" } },
/* 32 */ { R"(B22 \(A\*\*2\)\s*:\s*(.+))", 1, "refine", { "aniso_B[2][2]" } },
/* 33 */ { R"(B33 \(A\*\*2\)\s*:\s*(.+))", 1, "refine", { "aniso_B[3][3]" } },
/* 34 */ { R"(B12 \(A\*\*2\)\s*:\s*(.+))", 1, "refine", { "aniso_B[1][2]" } },
/* 35 */ { R"(B13 \(A\*\*2\)\s*:\s*(.+))", 1, "refine", { "aniso_B[1][3]" } },
/* 36 */ { R"(B23 \(A\*\*2\)\s*:\s*(.+))", 1, "refine", { "aniso_B[2][3]" } },
/* 37 */ { R"(ESTIMATED COORDINATE ERROR\.)", 1 },
/* 38 */ { R"(ESD FROM LUZZATI PLOT \(A\)\s*:\s*(.+))", 1, "refine_analyze", { "Luzzati_coordinate_error_obs" } },
/* 39 */ { R"(ESD FROM SIGMAA \(A\)\s*:\s*(.+))", 1, "refine_analyze", { "Luzzati_sigma_a_obs" } },
/* 40 */ { R"(LOW RESOLUTION CUTOFF \(A\)\s*:\s*(.+))", 1, "refine_analyze", { "Luzzati_d_res_low_obs" } },
/* 41 */ { R"(RMS DEVIATIONS FROM IDEAL VALUES\.)", 1 },
/* 42 */ { R"(DISTANCE RESTRAINTS\. RMS SIGMA)", 1 },
/* 43 */ { R"(SUGAR-BASE BOND DISTANCE \(A\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_sugar_bond_d", false },
/* 44 */ { R"(SUGAR-BASE BOND ANGLE DISTANCE \(A\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_sugar_bond_angle_d", false },
/* 45 */ { R"(PHOSPHATE BONDS DISTANCE \(A\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_phos_bond_d", false },
/* 46 */ { R"(PHOSPHATE BOND ANGLE, H-BOND \(A\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_phos_bond_angle_d", false },
/* 47 */ { R"(PLANE RESTRAINT \(A\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_plane_restr", false },
/* 48 */ { R"(CHIRAL-CENTER RESTRAINT \(A\*\*3\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_chiral_restr", false },
/* 49 */ { R"(NON-BONDED CONTACT RESTRAINTS\.)", 1 },
/* 50 */ { R"(SINGLE TORSION \(A\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_singtor_nbd", false },
/* 51 */ { R"(MULTIPLE TORSION \(A\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_multtor_nbd", false },
/* 59 */ { R"(ISOTROPIC THERMAL FACTOR RESTRAINTS\. RMS SIGMA)", 1 },
/* 60 */ { R"(SUGAR-BASE BONDS \(A\*\*2\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_sugar_bond_it", false },
/* 61 */ { R"(SUGAR-BASE ANGLES \(A\*\*2\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_sugar_angle_it", false },
/* 62 */ { R"(PHOSPHATE BONDS \(A\*\*2\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_phos_bond_it", false },
/* 63 */ { R"(PHOSPHATE BOND ANGLE, H-BOND \(A\*\*2\)\s*:\s*(.+)\s*;\s*(.+))", 1, "refine_ls_restr", { "dev_ideal", "dev_ideal_target" }, "n_phos_angle_it", false },
};
class NUCLSQ_Remark3Parser : public Remark3Parser
{
public:
NUCLSQ_Remark3Parser(const string& name, const string& expMethod, PDBRecord* r, cif::Datablock& db)
: Remark3Parser(name, expMethod, r, db, kNUCLSQ_Template, sizeof(kNUCLSQ_Template) / sizeof(TemplateLine),
regex(R"((NUCLSQ)(?: (\d+(?:\.\d+)?))?)")) {}
};
const TemplateLine kPROLSQ_Template[] = { const TemplateLine kPROLSQ_Template[] = {
/* 0 */ { R"(DATA USED IN REFINEMENT\.)", 1 }, /* 0 */ { R"(DATA USED IN REFINEMENT\.)", 1 },
/* 1 */ { R"(RESOLUTION RANGE HIGH \(ANGSTROMS\)\s*:\s*(.+))", 1, "refine", { "ls_d_res_high" } }, /* 1 */ { R"(RESOLUTION RANGE HIGH \(ANGSTROMS\)\s*:\s*(.+))", 1, "refine", { "ls_d_res_high" } },
...@@ -399,7 +467,7 @@ class PROLSQ_Remark3Parser : public Remark3Parser ...@@ -399,7 +467,7 @@ class PROLSQ_Remark3Parser : public Remark3Parser
public: public:
PROLSQ_Remark3Parser(const string& name, const string& expMethod, PDBRecord* r, cif::Datablock& db) PROLSQ_Remark3Parser(const string& name, const string& expMethod, PDBRecord* r, cif::Datablock& db)
: Remark3Parser(name, expMethod, r, db, kPROLSQ_Template, sizeof(kPROLSQ_Template) / sizeof(TemplateLine), : Remark3Parser(name, expMethod, r, db, kPROLSQ_Template, sizeof(kPROLSQ_Template) / sizeof(TemplateLine),
regex(R"((PROLSQ|NUCLSQ)(?: (\d+(?:\.\d+)?))?)")) {} regex(R"((PROLSQ)(?: (\d+(?:\.\d+)?))?)")) {}
}; };
const TemplateLine kREFMAC_Template[] = { const TemplateLine kREFMAC_Template[] = {
...@@ -1257,7 +1325,9 @@ bool Remark3Parser::parse(const string& expMethod, PDBRecord* r, cif::Datablock& ...@@ -1257,7 +1325,9 @@ bool Remark3Parser::parse(const string& expMethod, PDBRecord* r, cif::Datablock&
tryParser(new CNS_Remark3Parser(program, expMethod, r, db)); tryParser(new CNS_Remark3Parser(program, expMethod, r, db));
else if (ba::starts_with(program, "PHENIX")) else if (ba::starts_with(program, "PHENIX"))
tryParser(new PHENIX_Remark3Parser(program, expMethod, r, db)); tryParser(new PHENIX_Remark3Parser(program, expMethod, r, db));
else if (ba::starts_with(program, "PROLSQ") or ba::starts_with(program, "NUCLSQ")) else if (ba::starts_with(program, "NUCLSQ"))
tryParser(new NUCLSQ_Remark3Parser(program, expMethod, r, db));
else if (ba::starts_with(program, "PROLSQ"))
tryParser(new PROLSQ_Remark3Parser(program, expMethod, r, db)); tryParser(new PROLSQ_Remark3Parser(program, expMethod, r, db));
else if (ba::starts_with(program, "REFMAC")) else if (ba::starts_with(program, "REFMAC"))
{ {
......
// Lib for working with structures as contained in mmCIF and PDB files // Lib for working with structures as contained in mmCIF and PDB files
#include <random> #include <random>
#include <valarray>
#include "cif++/Point.h" #include "cif++/Point.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment