Skip to content

Commit 6537ea4

Browse files
author
Joanna
committed
Updated for CSD 2023.1 directory structure NO_JIRA
1 parent f6a027e commit 6537ea4

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

scripts/multi_component_hydrogen_bond_propensity/ReadMe.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ optional arguments:
4444
the directory of the desired coformer library
4545
```
4646

47-
The default coformer library is the one supplied with your Mercury install in ```<CSD Install Location>\Mercury\molecular_libraries\ccdc_coformers```
47+
The default coformer library is the one supplied with your Mercury install
48+
- for 2023.1 or later, in ```<CSD Install Location>\ccdc-software\mercury\molecular_libraries\ccdc_coformers```
49+
- for 2022.3 or earlier, in ```<CSD Install Location>\Mercury\molecular_libraries\ccdc_coformers```
4850

4951
Ensure the input structure and coformers have the correct bond typing and any charges before running the script
5052

scripts/multi_component_hydrogen_bond_propensity/multi_component_hydrogen_bond_propensity_report.py

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -363,19 +363,30 @@ def main(structure, work_directory, library, csdrefcode):
363363

364364
if __name__ == '__main__':
365365
# Set up the necessary arguments to run the script
366+
# For CSD 2023.1
366367
if sys.platform == 'win32':
367368
ccdc_coformers_dir = os.path.join(
368-
os.path.dirname(io.csd_directory()),
369-
'Mercury',
369+
io.csd_directory(),
370+
os.pardir, os.pardir,
371+
'ccdc-software',
372+
'mercury',
370373
'molecular_libraries',
371-
'ccdc_coformers'
372-
)
373-
else:
374-
ccdc_coformers_dir = os.path.join(
375-
os.path.dirname(io.csd_directory()),
376-
'molecular_libraries',
377-
'ccdc_coformers'
378-
)
374+
'ccdc_coformers')
375+
# CSD 2022.3 or earlier
376+
if not os.path.exists(ccdc_coformers_dir):
377+
if sys.platform == 'win32':
378+
ccdc_coformers_dir = os.path.join(
379+
os.path.dirname(io.csd_directory()),
380+
'Mercury',
381+
'molecular_libraries',
382+
'ccdc_coformers'
383+
)
384+
else:
385+
ccdc_coformers_dir = os.path.join(
386+
os.path.dirname(io.csd_directory()),
387+
'molecular_libraries',
388+
'ccdc_coformers'
389+
)
379390
parser = argparse.ArgumentParser(
380391
formatter_class=argparse.RawDescriptionHelpFormatter,
381392
description=__doc__)

0 commit comments

Comments
 (0)