Skip to content

Commit 1364fb4

Browse files
authored
Merge pull request #1 from ccdc-opensource/initial_transfer
Initial transfer of CSD Python API scripts
2 parents 82e7e39 + a985cc6 commit 1364fb4

22 files changed

+1591
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,6 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
131+
# PyCharm
132+
.idea/

README.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,57 @@
1-
# csd-python-api-scripts
2-
Example scripts using the CSD Python API
1+
<img src="assets/csd-python-api-logo.png" width="100px">
2+
3+
# CSD Python API Scripts
4+
5+
6+
A repository containing scripts that have been created to leverage the toolkit found within
7+
the [CCDC portfolio](https://www.ccdc.cam.ac.uk/solutions/) that are accessible via
8+
the [CSD-Python API ](https://www.ccdc.cam.ac.uk/solutions/csd-core/components/csd-python-api/).
9+
10+
The purpose of this platform is to distribute knowledge and allow for scientific collaborations. Scripts are provided on an as-is basis and while their use is not supported we do welcome feedback on potential improvements. All scripts are tested against the latest version of the CSD Python API as installed with the CSD Portfolio.
11+
12+
> For feedback or to report any issues please contact [support@ccdc.cam.ac.uk](support@ccdc.cam.ac.uk)
13+
14+
## Content
15+
16+
```graphql
17+
.
18+
├─ assets # Images for documentation
19+
├─ scripts # Python scripts
20+
├─ LICENSE
21+
└─ README.md
22+
```
23+
24+
## Licensing Requirements
25+
26+
Valid CSD Portfolio licence is required for all scripts, some will require additional licence levels for use, such as Discovery and Materials. Requirements are clearly displayed in the `ReadMe` that accompanies each script.
27+
28+
Don’t have a licence? Contact us [here to request a quote or demonstration.](https://www.ccdc.cam.ac.uk/theccdcprofile/contactus/)
29+
30+
## Downloading Scripts
31+
32+
This section will focus on how to download multiple or individual scripts:
33+
34+
### 1. Downloading All Scripts
35+
36+
37+
#### Downloading Zip file:
38+
Click `Code` and Select `Download Zip`:
39+
40+
<img src="assets/download_zip.png" width="250px">
41+
42+
43+
### 2. Downloading Individual Scripts
44+
45+
#### TODO - Add gif of downloading single file
46+
#### TODO - write instructions on how to download
47+
48+
49+
## Running scripts through the CSD Python API Miniconda installed
50+
51+
This requires you to already have the CSD Python API installed.
52+
53+
Windows:
54+
```cmd
55+
"<CCDC_INSTALL_LOCATION>\CCDC\Python_API_2022\miniconda\Scripts\activate.bat"
56+
python script_example.py
57+
```

assets/csd-python-api-logo.png

13.1 KB
Loading

assets/download_zip.png

36.9 KB
Loading

scripts/ReadMe.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Contents
2+
3+
This folder contains scripts submitted by users or CCDC scientists for anyone to use freely.
4+
5+
### Hydrogen bond propensity :
6+
- Writes a .docx report of a hydrogen bond propensity calculation for any given mol2/refcode.
7+
8+
### Multi-component hydrogen bond propensity:
9+
- Performs a multi-component HBP calculation for a given library of co-formers.
10+
11+
### Packing similarity dendrogram:
12+
- Construct a dendrogram for an input set of structures based on packing-similarity
13+
analysis
14+
15+
## Tips
16+
### Searching tips:
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Hydrogen Bond Propensity
2+
3+
Writes a .docx report of a hydrogen bond propensity calculation
4+
5+
----
6+
Included in the report:
7+
- Hydrogen bond propensity chart.
8+
- Table of Predicted intermolecular hydrogen bond propensities.
9+
- Table of Hydrogen bond coordination likelihood.
10+
- Table of Hydrogen Bond Donor/Acceptor Definitions
11+
- Functional Group Definitions for CSD Substructure Searches
12+
- Search Results
13+
- Number of hits selected per functional group
14+
- Hydrogen Bond Analysis of Training Dataset
15+
- Hydrogen bond donor and acceptor outcomes
16+
17+
## Example
18+
19+
<img src="assets/HXACAN_Report_Screenshot_1.png" width="250px">
20+
<img src="assets/HXACAN_Report_Screenshot_2.png" width="250px">
21+
22+
<img src="assets/HXACAN_Report_Screenshot_3.png" width="250px">
23+
<img src="assets/HXACAN_Report_Screenshot_4.png" width="250px">
24+
25+
## Requirements
26+
27+
- ```matplotlib, docxtpl```
28+
29+
- hydrogen_bond_propensity_report.docx
30+
## Licensing Requirements
31+
- CSD-Core
32+
33+
## Instructions on running
34+
35+
Using mol2 file
36+
37+
```cmd
38+
"C:\Program Files\CCDC\Python_API_2022\miniconda\Scripts\activate.bat"
39+
python hydrogen_bond_propensity_report.py structure.mol2
40+
```
41+
42+
Options:
43+
```
44+
- d | --directory - sets the working directory
45+
- n | --noopen - Do not automatically open the generated output file.
46+
```
47+
## Author
48+
49+
_Andrew Maloney_ - CCDC (2017)
50+
51+
> For feedback or to report any issues please contact [support@ccdc.cam.ac.uk](support@ccdc.cam.ac.uk)
61.7 KB
Loading
22.1 KB
Loading
26.6 KB
Loading
28.4 KB
Loading

0 commit comments

Comments
 (0)