Skip to content

Commit

Permalink
Drop 'nm-res-ccp' file type because CCPN can export NEF
Browse files Browse the repository at this point in the history
  • Loading branch information
yokochi47 committed Nov 29, 2024
1 parent fee3dfa commit c10eba7
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
6 changes: 3 additions & 3 deletions wwpdb/utils/nmr/NmrDpReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down
1 change: 0 additions & 1 deletion wwpdb/utils/nmr/mr/DynamoMRParserListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ class DynamoMRParserListener(ParseTreeListener):
__verbose = None
__lfh = None
__debug = False
__remediate = False

__createSfDict = False
__omitDistLimitOutlier = True
Expand Down
39 changes: 35 additions & 4 deletions wwpdb/utils/nmr/mr/ParserListenerUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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'):
Expand All @@ -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.')


Expand Down Expand Up @@ -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.')


Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c10eba7

Please sign in to comment.