Skip to content

Commit

Permalink
readme and one more example
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Schwalbe-Koda committed Jul 15, 2020
1 parent 6de5761 commit eaf2c13
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ Zeo++ and its interface to pymatgen are required to use the Voronoi sampler. Ple
The simplest way to use the `moldocker` package is to use the premade script `dock.py` (in the `scripts`) folder. As an example, we provide a molecule and a zeolite in [moldocker/tests/files](moldocker/tests/files). With `moldocker` installed, you can dock the molecule to the zeolite using the following command:

```bash
dock.py moldocker/tests/files/{AFI.cif,molecule.xyz} -o ~/Desktop/dock -d batch -s voronoi_cluster -f min_distance
dock.py moldocker/tests/files/{AFI.cif,molecule.xyz} -o ~/Desktop/docked -d batch -s voronoi_cluster -f min_distance
```

This will dock the molecule contained in `molecule.xyz` to the zeolite in `AFI.cif` using the batch docker, Voronoi sampler with predefined number of clusters and a fitness function that considers the minimum distance between the host and the guest. All output files are saved in the folder `~/Desktop/dock`.
This will dock the molecule contained in `molecule.xyz` to the zeolite in `AFI.cif` using the batch docker, Voronoi sampler with predefined number of clusters and a fitness function that considers the minimum distance between the host and the guest. All output files are saved in the folder `~/Desktop/docked`. All input files for crystals and molecules supported by pymatgen can be given as inputs, including [xyz, Gaussian inputs and outputs for molecules](https://pymatgen.org/pymatgen.core.structure.html#pymatgen.core.structure.IMolecule.from_file) and [CIF, VASP inputs and outputs, CSSR and others for crystals](https://pymatgen.org/pymatgen.core.structure.html#pymatgen.core.structure.IStructure.from_file).

For more information on the dockers, samplers and fitness functions available, run `dock.py --help`. Help on further commands are available once the choice of dockers, samplers and fitness functions are made, e.g. `dock.py -d batch -s voronoi_cluster -f min_distance --help`.

Expand Down
99 changes: 99 additions & 0 deletions examples/AFI/AFI.cif
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# AFI zeolite
data_SiO2
_symmetry_space_group_name_H-M 'P 1'
_cell_length_a 13.86655914
_cell_length_b 13.86655914
_cell_length_c 8.60047456
_cell_angle_alpha 90.00000000
_cell_angle_beta 90.00000000
_cell_angle_gamma 120.00000000
_symmetry_Int_Tables_number 1
_chemical_formula_structural SiO2
_chemical_formula_sum 'Si24 O48'
_cell_volume 1432.15645170
_cell_formula_units_Z 24
loop_
_symmetry_equiv_pos_site_id
_symmetry_equiv_pos_as_xyz
1 'x, y, z'
loop_
_atom_site_type_symbol
_atom_site_label
_atom_site_symmetry_multiplicity
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_occupancy
O O0 1 0.457007 0.334333 0.000000 1
O O1 1 0.665666 0.122673 0.000000 1
O O2 1 0.877327 0.542993 0.000000 1
O O3 1 0.542993 0.665667 0.000000 1
O O4 1 0.334334 0.877327 0.000000 1
O O5 1 0.122674 0.457007 0.000000 1
O O6 1 0.334333 0.457007 0.499999 1
O O7 1 0.122674 0.665667 0.499999 1
O O8 1 0.542993 0.877327 0.499999 1
O O9 1 0.665666 0.542993 0.499999 1
O O10 1 0.877326 0.334333 0.499999 1
O O11 1 0.457006 0.122673 0.499999 1
O O12 1 0.367814 0.367814 0.250000 1
O O13 1 0.632186 0.000000 0.250000 1
O O14 1 0.000000 0.632186 0.250000 1
O O15 1 0.632186 0.632186 0.250000 1
O O16 1 0.367813 0.000000 0.250000 1
O O17 1 0.999999 0.367814 0.250000 1
O O18 1 0.632186 0.632186 0.750000 1
O O19 1 0.367813 0.000000 0.750000 1
O O20 1 0.999999 0.367814 0.750000 1
O O21 1 0.367814 0.367814 0.750000 1
O O22 1 0.632186 0.000000 0.750000 1
O O23 1 0.000000 0.632186 0.750000 1
O O24 1 0.417358 0.208679 0.250000 1
O O25 1 0.791321 0.208679 0.250000 1
O O26 1 0.791321 0.582642 0.250000 1
O O27 1 0.582642 0.791321 0.250000 1
O O28 1 0.208678 0.791321 0.250000 1
O O29 1 0.208679 0.417358 0.250000 1
O O30 1 0.582642 0.791321 0.750000 1
O O31 1 0.208678 0.791321 0.750000 1
O O32 1 0.208679 0.417358 0.750000 1
O O33 1 0.417358 0.208679 0.750000 1
O O34 1 0.791321 0.208679 0.750000 1
O O35 1 0.791321 0.582642 0.750000 1
O O36 1 0.581212 0.418789 0.250000 1
O O37 1 0.581212 0.162424 0.250000 1
O O38 1 0.837576 0.418789 0.250000 1
O O39 1 0.418788 0.581211 0.250000 1
O O40 1 0.418788 0.837576 0.250000 1
O O41 1 0.162423 0.581211 0.250000 1
O O42 1 0.418788 0.581211 0.750000 1
O O43 1 0.418788 0.837576 0.750000 1
O O44 1 0.162423 0.581211 0.750000 1
O O45 1 0.581212 0.418789 0.750000 1
O O46 1 0.581212 0.162424 0.750000 1
O O47 1 0.837576 0.418789 0.750000 1
Si Si48 1 0.456260 0.332886 0.187394 1
Si Si49 1 0.667114 0.123373 0.187394 1
Si Si50 1 0.876626 0.543741 0.187394 1
Si Si51 1 0.543740 0.667114 0.187394 1
Si Si52 1 0.332886 0.876626 0.187394 1
Si Si53 1 0.123375 0.456259 0.187394 1
Si Si54 1 0.332885 0.456259 0.312606 1
Si Si55 1 0.123373 0.667114 0.312606 1
Si Si56 1 0.543740 0.876626 0.312606 1
Si Si57 1 0.667115 0.543741 0.312606 1
Si Si58 1 0.876626 0.332886 0.312606 1
Si Si59 1 0.456260 0.123373 0.312606 1
Si Si60 1 0.543740 0.667114 0.812605 1
Si Si61 1 0.332886 0.876626 0.812605 1
Si Si62 1 0.123375 0.456259 0.812605 1
Si Si63 1 0.456260 0.332886 0.812605 1
Si Si64 1 0.667114 0.123373 0.812605 1
Si Si65 1 0.876626 0.543741 0.812605 1
Si Si66 1 0.667115 0.543741 0.687394 1
Si Si67 1 0.876626 0.332886 0.687394 1
Si Si68 1 0.456260 0.123373 0.687394 1
Si Si69 1 0.332885 0.456259 0.687394 1
Si Si70 1 0.123373 0.667114 0.687394 1
Si Si71 1 0.543740 0.876626 0.687394 1

3 changes: 3 additions & 0 deletions examples/AFI/job.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

python3 ../../scripts/dock.py AFI.cif molecule.xyz -d batch -s voronoi_cluster -f min_distance --threshold 1.8
50 changes: 50 additions & 0 deletions examples/AFI/molecule.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
47
SMILES=C[N+]12CCCCC1C1CC(C2)C2CCCCN2C1
C 1.66019 -1.37884 -1.852542
N 1.465705 -0.755625 -0.495565
C 2.714981 -1.043204 0.341328
C 3.938436 -0.233678 -0.076844
C 3.626873 1.264761 -0.154269
C 2.462512 1.496145 -1.121957
C 1.187888 0.764978 -0.687185
C 0.490305 1.427258 0.536415
C 0.372462 0.521292 1.764689
C -0.412115 -0.720405 1.325502
C 0.250384 -1.442218 0.127954
C -1.847343 -0.267977 0.931466
C -2.769 -1.45882 0.624581
C -4.133518 -1.014553 0.090447
C -3.931149 -0.108163 -1.126989
C -3.050455 1.081391 -0.754584
N -1.74931 0.66766 -0.201992
C -0.936852 1.836796 0.126509
H 2.575321 -0.984162 -2.321832
H 0.78461 -1.142753 -2.482079
H 1.749457 -2.473154 -1.729902
H 2.450096 -0.831986 1.389686
H 2.887557 -2.133773 0.25611
H 4.332807 -0.592688 -1.051075
H 4.734802 -0.444746 0.665553
H 3.371901 1.653395 0.855661
H 4.521526 1.826278 -0.487214
H 2.201982 2.571389 -1.195583
H 2.758848 1.192827 -2.148191
H 0.45045 0.755372 -1.512983
H 1.053374 2.344687 0.801044
H -0.205321 1.051747 2.5486
H 1.350051 0.289089 2.227518
H -0.498644 -1.436276 2.166775
H 0.591667 -2.463586 0.38114
H -0.481421 -1.506802 -0.697767
H -2.27062 0.260962 1.828124
H -2.294685 -2.120885 -0.133463
H -2.875436 -2.062871 1.549466
H -4.683278 -0.458652 0.881752
H -4.753354 -1.897639 -0.164514
H -3.450279 -0.681472 -1.949819
H -4.899907 0.264529 -1.516469
H -3.597761 1.725042 -0.016505
H -2.850816 1.718805 -1.641138
H -1.387556 2.439251 0.957989
H -0.905166 2.501373 -0.76315

2 changes: 1 addition & 1 deletion examples/MOR_loading/job.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

# Runs until the first success is found
# Runs until the zeolite is fully loaded with molecules
python3 ../../scripts/dock.py MOR.cif triethylamine.xyz -d batch -s voronoi_cluster -f min_distance --subdock
11 changes: 7 additions & 4 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

The following examples are currently available in this repository:

1. [Docking TMAda+ to CHA zeolite](CHA_TMada): one molecule is docked to CHA with Voronoi (sequential) and Monte Carlo dockers.
2. [Docking triethylamine to MOR zeolite](MOR_loading): several triethylamine molecules are docked to MOR zeolite with Voronoi batch docker.
3. [Docking benzene to MOF-5](MOF-5): several benzene molecules are docked to MOF-5 using the Voronoi batched docker. The MOF-5 structure was retrieved from the Cambridge Structural Database (ID [SAHYIK](https://www.ccdc.cam.ac.uk/structures/search?identifier=SAHYIK))
4. [Docking water to a Ni(111) surface](Ni111): one water molecule is docked to a Ni(111) surface using the Gaussian target fitness function. The Ni(111) surface structure was retrieved from the [Materials Project](https://materialsproject.org) (ID [mp-23](https://materialsproject.org/materials/mp-23/surfaces/[1,%201,%201]/cif))
1. [Docking a molecule to AFI zeolite](AFI): one molecule is docked to AFI using the Voronoi batch docker.
2. [Docking TMAda+ to CHA zeolite](CHA_TMada): one molecule is docked to CHA with Voronoi (sequential) and Monte Carlo dockers.
3. [Docking triethylamine to MOR zeolite](MOR_loading): several triethylamine molecules are docked to MOR zeolite with Voronoi batch docker.
4. [Docking benzene to MOF-5](MOF-5): several benzene molecules are docked to MOF-5 using the Voronoi batched docker. The MOF-5 structure was retrieved from the Cambridge Structural Database (ID [SAHYIK](https://www.ccdc.cam.ac.uk/structures/search?identifier=SAHYIK))
5. [Docking water to a Ni(111) surface](Ni111): one water molecule is docked to a Ni(111) surface using the Gaussian target fitness function. The Ni(111) surface structure was retrieved from the [Materials Project](https://materialsproject.org) (ID [mp-23](https://materialsproject.org/materials/mp-23/surfaces/[1,%201,%201]/cif))

Each example has a `job.sh` script file showing how to run the docker.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def read(fname):
packages=find_packages("."),
scripts=["scripts/dock.py",],
python_requires=">=3.5",
install_requires=["numpy", "networkx", "pymatgen>=2020.3.2",],
install_requires=["numpy", "networkx", "pymatgen>=2020.3.2", "scikit-learn"],
license="MIT",
description="Tools to dock molecules to crystal structures",
long_description=read("README.md"),
Expand Down

0 comments on commit eaf2c13

Please sign in to comment.