diff --git a/wwpdb/utils/nmr/NmrDpReport.py b/wwpdb/utils/nmr/NmrDpReport.py index cdf1bdea..68c68157 100644 --- a/wwpdb/utils/nmr/NmrDpReport.py +++ b/wwpdb/utils/nmr/NmrDpReport.py @@ -84,7 +84,7 @@ # 29-Jan-2024 M. Yokochi - add 'ambiguous_dihedral_angle' warning type (NMR restraint remediation, 6sy2) # 21-Feb-2024 M. Yokochi - add support for discontinuous model_id (NMR restraint remediation, 2n6j) # 01-May-2024 M. Yokochi - merge cs/mr sequence extensions containing unknown residues (e.g UNK, DN, N) if necessary (NMR restraint remediation, 6fw4) -# 07-Nov-2024 M. Yokochi - add 'nm-pea-ccp', 'nm-pea-pip', 'nm-pea-vie', 'nm-pea-spa', 'nm-pea-top', and 'nm-pea-xea' file types for NMR spectral peak remediation +# 07-Nov-2024 M. Yokochi - add 'nm-pea-ari', 'nm-pea-pip', 'nm-pea-vie', 'nm-pea-spa', 'nm-pea-top', 'nm-pea-xea', and 'nm-pea-xwi' file types for NMR spectral peak remediation # 14-Nov-2024 M. Yokochi - add 'nm-aux-cha' file type for CHARMM extended CRD (CARD) file acting as CHARMM topology definition # 19-Nov-2024 M. Yokochi - add support for pH titration data (NMR restraint remediation) # 22-Nov-2024 M. Yokochi - add 'nm-res-noa' file type for CYANA NOA (NOE Assignment) file @@ -1756,8 +1756,8 @@ def __init__(self, verbose=True, log=sys.stdout): 'nm-res-cya', 'nm-res-dyn', 'nm-res-gro', 'nm-res-isd', 'nm-res-mr', 'nm-res-noa', 'nm-res-oth', 'nm-res-ros', 'nm-res-sax', 'nm-res-syb', 'nm-res-xpl', - 'nm-pea-any', 'nm-pea-ccp', 'nm-pea-pip', 'nm-pea-spa', 'nm-pea-top', - 'nm-pea-vie', 'nm-pea-xea') + 'nm-pea-any', 'nm-pea-ari', 'nm-pea-pip', 'nm-pea-spa', 'nm-pea-top', + 'nm-pea-vie', 'nm-pea-xea', 'nm-pea-xwi') self.content_types = ('model', 'nmr-data-nef', 'nmr-data-str', 'nmr-chemical-shifts', 'nmr-restraints', 'nmr-peaks') diff --git a/wwpdb/utils/nmr/mr/DynamoMRParserListener.py b/wwpdb/utils/nmr/mr/DynamoMRParserListener.py index e4b73856..67aae94b 100644 --- a/wwpdb/utils/nmr/mr/DynamoMRParserListener.py +++ b/wwpdb/utils/nmr/mr/DynamoMRParserListener.py @@ -232,7 +232,6 @@ class DynamoMRParserListener(ParseTreeListener): __verbose = None __lfh = None __debug = False - __remediate = False __createSfDict = False __omitDistLimitOutlier = True diff --git a/wwpdb/utils/nmr/mr/ParserListenerUtil.py b/wwpdb/utils/nmr/mr/ParserListenerUtil.py index f82a5d8e..fe813a03 100644 --- a/wwpdb/utils/nmr/mr/ParserListenerUtil.py +++ b/wwpdb/utils/nmr/mr/ParserListenerUtil.py @@ -1948,6 +1948,25 @@ REMEDIATE_BACKBONE_ANGLE_NAME_PAT = re.compile(r'pseudo (PHI|PSI|OMEGA) \(0, (0|1|\-1), (0|1|\-1), 0\)') +SPECTRAL_DIM_TEMPLATE = {'axis_code': None, + 'spectrometer_frequency': None, + 'atom_type': None, + 'atom_isotope_number': None, + 'spectral_region': None, + 'magnetization_linkage_id': None, + 'sweep_width': None, + 'sweep_width_unit': None, + 'value_first_point': None, + 'absolute_peak_positions': None, + 'acquisition': None, + 'center_frequency_offset': None, + 'encoding_code': None, + 'encoded_reduced_dimension_id': None + } + +SPECTRAL_DIM_TRANSFER_TEMPLATE = {'indirect': None, + 'type': None} + def toRegEx(string): """ Return regular expression for a given string including XPLOR-NIH wildcard format. @@ -6744,9 +6763,9 @@ def getRestraintName(mrSubtype, title=False): if mrSubtype.startswith('pccr'): return "Paramagnetic CCR restraints" if title else "paramagnetic CCR restraints" if mrSubtype.startswith('ccr_d_csa'): - return "CCR D-CSA restraints" if title else "CCR D-CSA restraints" + return "CCR D-CSA restraints" if mrSubtype.startswith('ccr_dd'): - return "CCR D-D restraints" if title else "CCR D-D restraints" + return "CCR D-D restraints" if mrSubtype.startswith('geo'): return "Coordinate geometry restraints" if title else "coordinate geometry restraints" if mrSubtype.startswith('noepk'): @@ -6768,6 +6787,13 @@ def getRestraintName(mrSubtype, title=False): if mrSubtype == 'ph_param_data': return "pH titration data" + if mrSubtype == 'peak2d': + return "2D spectral peak list" + if mrSubtype == 'peak3d': + return "3D spectral peak list" + if mrSubtype == 'peak4d': + return "4D spectral peak list" + raise KeyError(f'Internal restraint subtype {mrSubtype!r} is not defined.') @@ -6799,6 +6825,9 @@ def contentSubtypeOf(mrSubtype): if mrSubtype in ('plane', 'adist', 'rama', 'radi', 'diff', 'nbase', 'ang', 'pang', 'geo'): return 'other_restraint' + if mrSubtype.startswth('peak'): + return 'spectral_peak' + raise KeyError(f'Internal restraint subtype {mrSubtype!r} is not defined.') @@ -6830,7 +6859,8 @@ def incListIdCounter(mrSubtype, listIdCounter, reduced=True): 'ccr_dd_restraint': 0, 'fchiral_restraint': 0, 'saxs_restraint': 0, - 'other_restraint': 0 + 'other_restraint': 0, + 'spectral_peak': 0 } contentSubtype = (contentSubtypeOf(mrSubtype) if reduced else mrSubtype) if mrSubtype is not None else 'other_restraint' @@ -6871,7 +6901,8 @@ def decListIdCounter(mrSubtype, listIdCounter, reduced=True): 'ccr_dd_restraint': 0, 'fchiral_restraint': 0, 'saxs_restraint': 0, - 'other_restraint': 0 + 'other_restraint': 0, + 'spectral_peak': 0 } contentSubtype = (contentSubtypeOf(mrSubtype) if reduced else mrSubtype) if mrSubtype is not None else 'other_restraint' diff --git a/wwpdb/utils/tests-nmr/json-schema/nmr-data-procesing-report-schema-v4.json b/wwpdb/utils/tests-nmr/json-schema/nmr-data-procesing-report-schema-v4.json index 6dbc866c..74330927 100644 --- a/wwpdb/utils/tests-nmr/json-schema/nmr-data-procesing-report-schema-v4.json +++ b/wwpdb/utils/tests-nmr/json-schema/nmr-data-procesing-report-schema-v4.json @@ -40,7 +40,6 @@ "nm-res-xpl", "nm-pea-any", "nm-pea-ari", - "nm-pea-ccp", "nm-pea-pip", "nm-pea-spa", "nm-pea-top",