Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

# PyCharm
.idea/
59 changes: 57 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,57 @@
# csd-python-api-scripts
Example scripts using the CSD Python API
<img src="assets/csd-python-api-logo.png" width="100px">

# CSD Python API Scripts


A repository containing scripts that have been created to leverage the toolkit found within
the [CCDC portfolio](https://www.ccdc.cam.ac.uk/solutions/) that are accessible via
the [CSD-Python API ](https://www.ccdc.cam.ac.uk/solutions/csd-core/components/csd-python-api/).

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.

> For feedback or to report any issues please contact [support@ccdc.cam.ac.uk](support@ccdc.cam.ac.uk)

## Content

```graphql
.
├─ assets # Images for documentation
├─ scripts # Python scripts
├─ LICENSE
└─ README.md
```

## Licensing Requirements

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.

Don’t have a licence? Contact us [here to request a quote or demonstration.](https://www.ccdc.cam.ac.uk/theccdcprofile/contactus/)

## Downloading Scripts

This section will focus on how to download multiple or individual scripts:

### 1. Downloading All Scripts


#### Downloading Zip file:
Click `Code` and Select `Download Zip`:

<img src="assets/download_zip.png" width="250px">


### 2. Downloading Individual Scripts

#### TODO - Add gif of downloading single file
#### TODO - write instructions on how to download


## Running scripts through the CSD Python API Miniconda installed

This requires you to already have the CSD Python API installed.

Windows:
```cmd
"<CCDC_INSTALL_LOCATION>\CCDC\Python_API_2022\miniconda\Scripts\activate.bat"
python script_example.py
```
Binary file added assets/csd-python-api-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/download_zip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions scripts/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Contents

This folder contains scripts submitted by users or CCDC scientists for anyone to use freely.

### Hydrogen bond propensity :
- Writes a .docx report of a hydrogen bond propensity calculation for any given mol2/refcode.

### Multi-component hydrogen bond propensity:
- Performs a multi-component HBP calculation for a given library of co-formers.

### Packing similarity dendrogram:
- Construct a dendrogram for an input set of structures based on packing-similarity
analysis

## Tips
### Searching tips:
51 changes: 51 additions & 0 deletions scripts/hydrogen_bond_propensity/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Hydrogen Bond Propensity

Writes a .docx report of a hydrogen bond propensity calculation

----
Included in the report:
- Hydrogen bond propensity chart.
- Table of Predicted intermolecular hydrogen bond propensities.
- Table of Hydrogen bond coordination likelihood.
- Table of Hydrogen Bond Donor/Acceptor Definitions
- Functional Group Definitions for CSD Substructure Searches
- Search Results
- Number of hits selected per functional group
- Hydrogen Bond Analysis of Training Dataset
- Hydrogen bond donor and acceptor outcomes

## Example

<img src="assets/HXACAN_Report_Screenshot_1.png" width="250px">
<img src="assets/HXACAN_Report_Screenshot_2.png" width="250px">

<img src="assets/HXACAN_Report_Screenshot_3.png" width="250px">
<img src="assets/HXACAN_Report_Screenshot_4.png" width="250px">

## Requirements

- ```matplotlib, docxtpl```

- hydrogen_bond_propensity_report.docx
## Licensing Requirements
- CSD-Core

## Instructions on running

Using mol2 file

```cmd
"C:\Program Files\CCDC\Python_API_2022\miniconda\Scripts\activate.bat"
python hydrogen_bond_propensity_report.py structure.mol2
```

Options:
```
- d | --directory - sets the working directory
- n | --noopen - Do not automatically open the generated output file.
```
## Author

_Andrew Maloney_ - CCDC (2017)

> For feedback or to report any issues please contact [support@ccdc.cam.ac.uk](support@ccdc.cam.ac.uk)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading