Skip to content

Commit

Permalink
added "Display extended PDB ID"
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezra Peisach committed Dec 10, 2024
1 parent 66683af commit 615c7d3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion wwpdb/apps/ccmodule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
__author__ = "Ezra Peisach"
__email__ = "[email protected]"
__license__ = "Apache 2.0"
__version__ = "0.30"
__version__ = "0.31"
3 changes: 3 additions & 0 deletions wwpdb/apps/ccmodule/chem/ChemCompAssignDepict.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
# 2017-04-11 RPS Updates to accommodate identification of ligands selected by depositor as "ligands of interest"
# 2017-05-03 RPS Updates so that LOI tracking can succeed even in cases where annotator reruns ligand search and consequently changes value for "author" assigned CCID
# 2023-06-21 ZF Added chemical descriptions provided by refinement packages
# 2024-12-07 ZF Added extpdbid
##
"""
Create HTML depiction chemical component assignment files.
Expand Down Expand Up @@ -186,6 +187,7 @@ def doRender_BatchSrchSummaryContainer(self, p_reqObj, p_bIsWorkflow):
classId = str(p_reqObj.getValue("classID")).lower()
fileSource = str(p_reqObj.getValue("filesource")).lower()
pdbId = str(p_reqObj.getValue("pdbid"))
extPdbId = str(p_reqObj.getValue("extpdbid"))
annotator = str(p_reqObj.getValue("annotator"))
entryTitle = str(p_reqObj.getValue("entry_title"))
tmpltPath = p_reqObj.getValue("TemplatePath")
Expand All @@ -211,6 +213,7 @@ def doRender_BatchSrchSummaryContainer(self, p_reqObj, p_bIsWorkflow):
myD['classid'] = classId
myD['filesource'] = fileSource
myD['pdbid'] = pdbId
myD['extpdbid'] = extPdbId
myD['entry_title'] = entryTitle
myD['annotator'] = annotator
# following params only for rcsb stand-alone version
Expand Down
21 changes: 14 additions & 7 deletions wwpdb/apps/ccmodule/webapp/ChemCompWebApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
# 2015-03-01 ZF Re-implemented _ccAssign_generateBatchData()
# 2019-11-12 ZF Added option for deposition id input in standalone mode
# 2020-08-27 ZF Added blocking 'REF_ONLY' status ligands
# 2024-12-09 ZF Added extpdbid
#
##
"""
Expand Down Expand Up @@ -757,25 +758,31 @@ def _ccAssign_BatchSrchSummary(self):
if self.__modelFilePath and os.access(self.__modelFilePath, os.R_OK):
cifObj = mmCIFUtil(filePath=self.__modelFilePath)
dlist = cifObj.GetValue('database_2')
for dir in dlist: # pylint: disable=redefined-builtin
if ('database_id' not in dir) or ('database_code' not in dir):
for Dict in dlist: # pylint: disable=redefined-builtin
if ('database_id' not in Dict) or ('database_code' not in Dict):
continue
#
dbname = dir['database_id'].upper()
dbcode = dir['database_code'].upper()
dbname = Dict['database_id'].upper().strip()
dbcode = Dict['database_code'].upper().strip()
if dbname == 'PDB':
self.__reqObj.setValue("pdbid", dbcode)
extpdbid = dbcode
if ('pdbx_database_accession' in Dict) and Dict['pdbx_database_accession']:
extpdbid = Dict['pdbx_database_accession'].strip()
#
self.__reqObj.setValue("extpdbid", extpdbid)
break
#
#
slist = cifObj.GetValue('struct')
for dir in slist:
if 'title' not in dir:
for Dict in slist:
if 'title' not in Dict:
continue
#
entryTitle = dir['title']
entryTitle = Dict['title']
self.__reqObj.setValue("entry_title", entryTitle)
break
#
# # END

ccAD = ChemCompAssignDepict(self.__verbose, self.__lfh)
Expand Down

0 comments on commit 615c7d3

Please sign in to comment.