Download scripts for the CSD Python API from the CSD GitHub repository
March 18, 2022
The CSD GitHub repository is the place to download, edit, and share python scripts to perform chemistry tasks and analyses using the CSD Python API. Here we’ll explain how to access it.
Find scripts for the CSD Python APIYou can now download scripts to use with the CSD Python API from our new CSD GitHub repository. This replaces the old CSD Python API forum, making it easier to merge changes and manage the scripts.
>> Access the CSD GitHub repository here to download, edit and submit scripts for the CSD Python API. <<Jump to:
- What can you do with the CSD Python API
- How to use the CSD Python API
- How to use the CSD GitHub repo
- How to download CSD Python API scripts from the CSD GitHub repo
- How to submit scripts to the CSD GitHub repo
- How to get help on the CSD Python API or the CSD GitHub repo
- Use SMARTS and SMILES - from searching, to selecting, to generating a SMILES from a structure. See how in this blog.
- Generate a 3D molecular structure from a SMILES string - learn how in this blog.
- Mine data from the CSD to isolate only what is relevant for your work—as shown in this case study with webinar.
- Perform docking with GOLD, as described here.
- Run advanced search and analysis, as described in this step-by-step tutorial.
- Perform ligand-based virtual screening, as described in this step-by-step tutorial.
- Go to the CSD GitHub Repo.
- Click on the green “Code” button
- Download ZIP
- Unpack the compressed file.
- Navigate to your script of choice (each script contains a ReadMe describing what it does and how to use it)
- Run the script using the CSD Python API conda environment (or your own!).
1 "CCDCPython_API_2022minicondaScriptsactivate.bat" 2 python script_example.py
- Create a Fork of the repository (A fork is a copy of a repository that you manage. Forks let you make changes to a project without affecting the CSD GitHub repo. You can fetch updates from or submit changes to the CSD GitHub repo with pull requests.
- Commit your changes to the forked repository.
- Create a Pull Request on the CSD GitHub repo.
- Once the code has been reviewed it will be merged into the CSD GitHub repo by our team.
- Create a Form of the CSD Python API Scripts Repo
- Clone the forked repository onto your PC
git clone <username/forked-repo>
- Make changes/add new script and don't forget the ReadMe file. Example script can be found in the repo.
- Create a new branch to add to your script
1 git branch <new_script_branch> 2 git checkout <new_script_branch>
- Commit changes
1 git add new_script.py 2 git commit -m "Adding new_script" 3 git push --set-upstream origin <new_script_branch>
- Switching to your new branch in GitHub, you can click on the "Contribute" button in your forked repo
- Click Pull Request
- Select the appropriate target and base
- Add information in the header and description
- Click create Pull Request
- Now wait for our team to read your code and provide feedback.
CSD Python API (12)