https://github.com/acellera/moleculekit
MoleculeKit: Your favorite molecule manipulation kit
https://github.com/acellera/moleculekit
drug-discovery machine-learning molecular-modeling molecular-simulation molecule proteins
Last synced: 2 months ago
JSON representation
MoleculeKit: Your favorite molecule manipulation kit
- Host: GitHub
- URL: https://github.com/acellera/moleculekit
- Owner: Acellera
- License: other
- Created: 2019-03-28T10:51:36.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T10:36:51.000Z (over 1 year ago)
- Last Synced: 2024-10-29T17:36:39.357Z (over 1 year ago)
- Topics: drug-discovery, machine-learning, molecular-modeling, molecular-simulation, molecule, proteins
- Language: Python
- Homepage:
- Size: 92.4 MB
- Stars: 200
- Watchers: 12
- Forks: 37
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MoleculeKit
[](https://anaconda.org/acellera/moleculekit)
A molecule manipulation library
# Getting started
### Installing moleculekit
#### With pip
```
pip install moleculekit
```
#### With conda
[Installation Instructions](https://software.acellera.com/moleculekit/installation.html)
### Using moleculekit in ipython
Install ipython in the correct conda enviroment using the following command.
```
pip install ipython
```
Now you can start an ipython console with
```
ipython
```
In the ipython console you can now import any of the modules of moleculekit and use it as normal.
```python
from moleculekit.molecule import Molecule
mol = Molecule('3ptb')
mol.view()
```
### API
For the official documentation of the moleculekit API head over to https://software.acellera.com/moleculekit/index.html
### Issues
For any bugs or questions on usage feel free to use the issue tracker of this github repo.
### Dev
If you are using moleculekit without installing it by using the PYTHONPATH env var you will need to compile the C++ extensions in-place with the following command:
```
python setup.py build_ext --inplace
```
#### Building for WebAssembly
Install `emscripten` https://emscripten.org/docs/getting_started/downloads.html
```
conda create -n pyodide-build
conda activate pyodide-build
conda install python=3.11
pip install pyodide-build==0.25.1
# Activate the emscripten environment
cd ../emsdk
./emsdk install 3.1.46
./emsdk activate 3.1.46
source emsdk_env.sh
cd -
# Build the package
export PYO3_CROSS_INCLUDE_DIR="HACK"
export PYO3_CROSS_LIB_DIR="HACK"
rm -rf .pyodide-xbuildenv
pyodide build -o dist_pyodide
cp dist_pyodide/*.whl test_wasm/wheels/
cd test_wasm
python3 -m http.server
```
If you get an error at building about numpy missing, check this issue https://github.com/pyodide/pyodide/issues/4347
#### Debugging segmentation faults in Cython part
1. Put a reproducible script in a file like `segfault.py`
2. Modify setup.py to have `-g` as compile flag instead of `-O3`
3. Recompile extensions with `python setup.py build_ext --inplace`
4. Execute script with gdb like `gdb --args python segfault.py`
5. Execute `run` and then `bt 10` to show the backtrace
6. Have fun
## Citing MoleculeKit
If you use this software in your publication please cite:
Stefan Doerr, Matthew J. Harvey, Frank Noé, and Gianni De Fabritiis.
**HTMD: High-throughput molecular dynamics for molecular discovery.**
_Journal of Chemical Theory and Computation_, **2016**, _12_ (4), pp 1845–1852.
[doi:10.1021/acs.jctc.6b00049](http://pubs.acs.org/doi/abs/10.1021/acs.jctc.6b00049)