Skip to content

Commit a352d9b

Browse files
committed
update README & fix sterimol scan/output consistency
- Update README examples to match current output format and file paths - Add --radii, --sambvca, and uv install instructions to README - Resize images to 50% width - Add --measure CLI option for explicit classic/grid sterimol selection - Auto-switch to grid mode for sterimol scans (sterimol2vec) - Add Atom2 column to sterimol-only table output - Fix grid sterimol L for VDW: recompute grid bounds after rotation - Fix density grid sterimol: rotate occ_grid to match molecular orientation
1 parent 83963d4 commit a352d9b

2 files changed

Lines changed: 135 additions & 116 deletions

File tree

README.md

Lines changed: 128 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
1-
![DBSTEP](images/DBSTEP_banner.png)
2-
===
1+
<img src="images/DBSTEP_banner.png">
32

43
# DBSTEP
5-
DFT-based Steric Parameters
4+
DFT-based Steric Parameters
65

7-
[![DOI](https://zenodo.org/badge/198946518.svg)](https://zenodo.org/badge/latestdoi/198946518) [![PyPI version](https://badge.fury.io/py/dbstep.svg)](https://badge.fury.io/py/dbstep) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/dbstep.svg)](https://anaconda.org/conda-forge/dbstep) </a>
6+
[![DOI](https://zenodo.org/badge/198946518.svg)](https://zenodo.org/badge/latestdoi/198946518) [![PyPI version](https://badge.fury.io/py/dbstep.svg)](https://badge.fury.io/py/dbstep) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/dbstep.svg)](https://anaconda.org/conda-forge/dbstep)
87
[![CI](https://github.com/patonlab/DBSTEP/actions/workflows/ci.yml/badge.svg)](https://github.com/patonlab/DBSTEP/actions/workflows/ci.yml)
98

10-
Allows a user to compute steric parameters from chemical structures.
9+
Allows a user to compute steric parameters from chemical structures.
1110

1211
Calculate Sterimol parameters<sup>1</sup> (L, Bmin, Bmax), %Buried Volume<sup>2</sup>, Sterimol2Vec and Vol2Vec parameters
1312

1413
## Features
1514
* Compute requested steric parameters from molecular structure files with input options:
16-
* `-s` or `--sterimol` - Sterimol Parameters (L, Bmin, Bmax)
17-
* `-b` or `--volume` - Percent Buried Volume
18-
* `-s` or `--sterimol` AND `--scan [rmin:rmax:interval]` - Sterimol2Vec Parameters
19-
* `-b` or `--volume`AND `--scan [rmin:rmax:interval]` - Vol2Vec Parameters
15+
* `-s` or `--sterimol` - Sterimol Parameters (L, Bmin, Bmax)
16+
* `-b` or `--vbur` - Percent Buried Volume
17+
* `-s` or `--sterimol` AND `--scan [rmin:rmax:interval]` - Sterimol2Vec Parameters
18+
* `-b` or `--vbur` AND `--scan [rmin:rmax:interval]` - Vol2Vec Parameters
2019
* `-r` - Adjust radius of percent buried volume measurements (default 3.5 Angstrom)
2120
* Exclude atoms from steric measurement with `--exclude [atom indices]` option (no spaces, separated by commas)
22-
* Steric parameters can be computed from van der Waals radii or using a three dimensional grid (default is grid).
23-
* Change measurement type with `--measure ['classic' or 'grid']` where classic will use vdw radii.
24-
* Grid point spacing can be adjusted (default spacing is 0.05 Angstrom), adjust with `--grid [# in Angstrom]`
21+
* Sterimol parameters can be computed using the classic (Verloop) definition from van der Waals radii, or using a three-dimensional grid (default is classic).
22+
* Change measurement type with `--measure ['classic' or 'grid']`. Grid-based measurement is automatically used for scans and density surfaces.
23+
* Grid point spacing can be adjusted (default spacing is 0.1 Angstrom), adjust with `--grid [# in Angstrom]`
24+
* Two sets of VDW radii are available:
25+
* `--radii bondi` (default) - Bondi radii
26+
* `--radii charry-tkatchenko` - Charry-Tkatchenko free-atom radii derived from dipole polarizability
2527
* Steric parameters can be measured from electron density .cube files generated by Gaussian (see [Gaussian cubegen](https://gaussian.com/cubegen/) for information on how to generate these)
2628
* The `--surface density` command (default vdw) with a .cube input file will measure sterics from density values read in from the file.
2729
* Density values read from the cube file greater than a default cutoff of 0.002 determine if a molecule is occupying that point in space, this can be changed with `--isoval [number]`
2830
* `--noH` - exclude hydrogen atoms from steric measurements
2931
* `--nometals` - exclude metal atoms from steric measurements
32+
* `--sambvca` - SambVca 2.1 mode (Bondi radii scaled by 1.17, H atoms excluded)
3033

3134
### 2-D Graph contribution features (Requires RDKit and Pandas packages to be installed):
32-
* Compute graph-based steric contributions in layers spanning outward from a reference functional group with the following input options:
35+
* Compute graph-based steric contributions in layers spanning outward from a reference functional group with the following input options:
3336
* `--2d` - Toggle 2D measurements on
34-
* `--fg` - Specify an atom or functional group to use as a reference as a SMILES string
35-
* `--maxpath` - The number of layers to measure. A connectivity matrix is used to compute the shortest path to each atom from the reference functional group.
37+
* `--fg` - Specify an atom or functional group to use as a reference as a SMILES string
38+
* `--maxpath` - The number of layers to measure. A connectivity matrix is used to compute the shortest path to each atom from the reference functional group.
3639
* `--2d-type` - The type of steric contributions to use. Options include Crippen molar refractivities or McGowan volume
3740

3841
## Requirements & Dependencies
@@ -41,6 +44,11 @@ Calculate Sterimol parameters<sup>1</sup> (L, Bmin, Bmax), %Buried Volume<sup>2<
4144

4245
## Install
4346

47+
#### uv (recommended)
48+
```
49+
uv add dbstep
50+
```
51+
4452
#### Conda and PyPI (`pip`)
4553
- Install using conda
4654
`conda install -c conda-forge dbstep`
@@ -49,154 +57,158 @@ Calculate Sterimol parameters<sup>1</sup> (L, Bmin, Bmax), %Buried Volume<sup>2<
4957

5058
After installation, the `dbstep` command is available directly on the command line, or run as a module with `python -m dbstep`.
5159

60+
#### Development install
61+
```
62+
git clone https://github.com/patonlab/DBSTEP.git
63+
cd DBSTEP
64+
uv sync --extra dev
65+
```
66+
5267
## Citing DBSTEP
5368
Please reference the DOI of our Zenodo repository with:
5469
```
5570
Luchini, G.; Patterson, T.; Paton, R. S. DBSTEP: DFT Based Steric Parameters. 2022, DOI: 10.5281/zenodo.4702097
5671
```
5772

58-
## Usage
73+
## Usage
5974
File parsing is done by the [cclib module](https://onlinelibrary.wiley.com/doi/abs/10.1002/jcc.20823), which can parse many quantum chemistry output files along with other common chemical structure file formats (sdf, xyz, pdb). For a full list of acceptable cclib file types, see their documentation [here](https://cclib.github.io/). Additionally, if used in a Python script, DBSTEP can also read coordinate information from [RDKit](https://www.rdkit.org/) mol objects if three-dimensional coordinates are present along with Gaussian 16 cube files containing volumetric density information.
6075

6176
To execute the program:
6277
- Run as a command line module with: `python -m dbstep file --atom1 a1idx --atom2 a2idx`
6378

6479
- Run in a Python program by importing: `import dbstep.Dbstep as db` (example below)
65-
```
66-
import dbstep.Dbstep as db
67-
68-
#Create DBSTEP object
69-
mol = db.dbstep(file,atom1=atom1,atom2=atom2,verbose=True,sterimol=True,measure='classic')
70-
71-
#Grab Sterimol Parameters
72-
L = mol.L
73-
Bmin = mol.Bmin
74-
Bmax = mol.Bmax
80+
```python
81+
import dbstep.Dbstep as db
82+
83+
# Create DBSTEP object
84+
mol = db.dbstep(file, atom1=atom1, atom2=atom2, sterimol=True)
85+
86+
# Grab Sterimol Parameters
87+
L = mol.L
88+
Bmin = mol.Bmin
89+
Bmax = mol.Bmax
7590
```
7691

77-
DBSTEP currently takes a coordinate file (see information on appropriate file types above) along with reference atoms and other input options for steric measurement. Sterimol parameters are measured and output to the user using the `--sterimol` argument, volume parameters can be requested with the `--volume` option.
92+
DBSTEP currently takes a coordinate file (see information on appropriate file types above) along with reference atoms and other input options for steric measurement. Sterimol parameters are measured and output to the user using the `--sterimol` argument, volume parameters can be requested with the `--vbur` option.
7893

7994
Atoms are specified by referring to the index of an atom in a coordinate file, (ex: "2", referencing the second atom in the file, with indexing starting at 1).
8095

81-
For Sterimol parameters, two atoms need to be specified using the arguments `--atom1 [atom1idx]` and `--atom2 [atom2idx]`. The L parameter is measured starting from the specified atom1 coordinates, extending through the atom1-atom2 axis until the end of the molecule is reached. The Bmin and Bmax molecular width parameters are measured on the axis perpendicular to L.
96+
For Sterimol parameters, two atoms need to be specified using the arguments `--atom1 [atom1idx]` and `--atom2 [atom2idx]`. The L parameter is measured starting from the specified atom1 coordinates, extending through the atom1-atom2 axis until the end of the molecule is reached. The Bmin and Bmax molecular width parameters are measured on the axis perpendicular to L.
8297

83-
For buried volume parameters, only the `--atom1 [atom]` argument is necessary to specify.
98+
For buried volume parameters, only the `--atom1 [atom]` argument is necessary to specify.
8499

85-
If no atoms are specified, the first two atoms in the file will be used as reference.
100+
If no atoms are specified, the first two atoms in the file will be used as reference.
86101

87102
### Examples
88-
Examples for obtaining Sterimol, Sterimol2Vec, Percent Buried Volume and Vol2Vec parameter sets are shown below (all example files found in examples/ directory).
103+
Examples for obtaining Sterimol, Sterimol2Vec, Percent Buried Volume and Vol2Vec parameter sets are shown below (all example files found in dbstep/data/ directory).
89104

90105
1. Sterimol Parameters for Ethane
91-
106+
92107
Obtain the Sterimol parameters for an ethane molecule along the C2-C5 bond on the command line:
93108
```
94-
>>>python -m dbstep examples/Et.xyz --sterimol --atom1 2 --atom2 5
109+
>>>python -m dbstep dbstep/data/Et.xyz --sterimol --atom1 2 --atom2 5
95110
96-
Et.xyz / Bmin: 1.98 / Bmax: 2.13 / L: 3.20
97-
```
98-
where Et.xyz looks like:
99-
```
100-
8
101-
ethane
102-
H 0.00 0.00 0.00
103-
C 0.00 0.00 -1.10
104-
H -1.00 0.27 -1.47
105-
H 0.27 -1.00 -1.47
106-
C 1.03 1.03 -1.61
107-
H 1.03 1.03 -2.71
108-
H 2.03 0.76 -1.25
109-
H 0.76 2.03 -1.25
111+
File Atom1 Atom2 Bmin Bmax L
112+
-------------------------------------------------------
113+
Et.xyz 2 5 1.99 2.13 3.24
114+
-------------------------------------------------------
110115
```
111116

112-
A visualization of these parameters can be shown in the program PyMOL using the two output files created by DBSTEP, showing the L parameter in blue, Bmin parameter in green and Bmax parameter in red.
117+
A visualization of these parameters can be shown in PyMOL using the two output files created by DBSTEP, showing the L parameter in blue, Bmin parameter in green and Bmax parameter in red.
113118

114-
![Example1](images/Example1.png)
119+
<img src="images/Example1.png" width="50%">
115120

116121
2. Sterimol2Vec Parameters for Ph
117122

118123
The `--scan` argument is formatted as `rmin:rmax:interval` where rmin is the distance from the center along the L axis to start measurements, rmax dictates when to stop measurements, and interval is the frequency of measurements. In this case the length of the molecule (~6A) is measured in 1.0A intervals
119124

120125
```
121-
>>>python -m dbstep examples/Ph.xyz --sterimol --atom1 1 --atom2 2 --scan 0.0:6.0:1.0
126+
>>>python -m dbstep dbstep/data/Ph.xyz --sterimol --atom1 1 --atom2 2 --scan 0.0:6.0:1.0
127+
128+
File Atom1 Atom2 Bmin Bmax L
129+
-------------------------------------------------------
130+
Ph.xyz 1 2 1.65 3.16 1.00
131+
Ph.xyz 1 2 1.65 3.16 2.00
132+
Ph.xyz 1 2 1.65 3.16 3.00
133+
Ph.xyz 1 2 1.65 3.16 4.00
134+
Ph.xyz 1 2 1.65 3.16 5.00
135+
Ph.xyz 1 2 1.65 3.11 5.95
136+
Ph.xyz 1 2 1.15 1.17 5.95
137+
138+
L parameter is 5.95 Ang
139+
-------------------------------------------------------
140+
```
122141

123-
Ph.xyz / R: 0.00 / Bmin: 1.65 / Bmax: 3.16
124-
Ph.xyz / R: 1.00 / Bmin: 1.65 / Bmax: 3.16
125-
Ph.xyz / R: 2.00 / Bmin: 1.65 / Bmax: 3.16
126-
Ph.xyz / R: 3.00 / Bmin: 1.65 / Bmax: 3.16
127-
Ph.xyz / R: 4.00 / Bmin: 1.65 / Bmax: 3.16
128-
Ph.xyz / R: 5.00 / Bmin: 1.65 / Bmax: 3.11
129-
Ph.xyz / R: 6.00 / Bmin: 1.15 / Bmax: 1.17
142+
Displayed in PyMOL, each new Bmin and Bmax axis is added along the L axis.
130143

131-
L parameter is 5.95 Ang
144+
<img src="images/Example2.png" width="50%">
145+
146+
3. Percent Buried Volume
132147

133-
```
134-
135-
Displayed in PyMOL, each new Bmin and Bmax axis is added along the L axis.
136-
![Example2](images/Example2.png)
137-
138-
139-
3. Percent Buried Volume
140-
141148
%Vb is measured by constructing a sphere (typically with a 3.5A radius) around the center atom and measuring how much of the sphere is occupied by the molecule. Output will include the sphere radius, percent buried volume (%V_Bur) and percent buried shell volume (%S_Bur) (zero in all cases unless a scan is being done simultaneously).
142-
```
143-
>>>python -m dbstep examples/1Nap.xyz --atom1 2 --volume
144-
145-
R/Å %V_Bur %S_Bur
146-
3.50 41.77 0.00
147-
```
148-
149-
For percent buried volume, the PyMOL script will overlay an appropriate sized sphere where measurement took place.
150-
![Example3](images/Example3.png)
151-
149+
```
150+
>>>python -m dbstep dbstep/data/1Nap.xyz --atom1 2 --vbur
151+
152+
File Atom R/Å Mol_Vol %V_Bur %S_Bur
153+
---------------------------------------------------------
154+
1Nap.xyz 2 3.50 118.65 41.77 0.00
155+
---------------------------------------------------------
156+
```
157+
158+
For percent buried volume, the PyMOL script will overlay an appropriate sized sphere where measurement took place.
159+
160+
<img src="images/Example3.png" width="50%">
161+
152162
4. Vol2Vec Parameters
153-
154-
When invoking the --volume and --scan parameters simultaneously, vol2vec parameters can be obtained. In this case, a scan is performed using spheres with radii from 2.0A to 4.0A in 0.5A increments.
155-
```
156-
>>>python -m dbstep examples/CHiPr2.xyz --atom1 1 --volume --scan 2.0:4.0:0.5
157-
158-
R/Å %V_Bur %S_Bur
159-
2.00 58.27 49.54
160-
2.50 53.53 46.14
161-
3.00 48.78 38.11
162-
3.50 43.37 29.19
163-
4.00 36.73 16.81
164-
```
165-
166-
5. 2D Additive sterics
167-
168-
To calculate 2d graph-based additive sterics, the arguments --2d --fg --maxpath and --2d-type can be used. An input file listing SMILES strings of desired molecule measurements is necessary for calculation. The --fg argument specifies a SMILES string that is common in all provided SMILES inputs to use as a reference point for layer 0. A connectivity matrix will then be used to find atoms 1, 2, 3... N bonds away where N is the max path length specified with the --maxpath argument. One of two types of measurements will be summed at each layer, either Crippen molar refractivities or McGowan volumes, computed for each atom. This can be changed with the --2d-type argument.
169-
163+
164+
When invoking the --vbur and --scan parameters simultaneously, vol2vec parameters can be obtained. In this case, a scan is performed using spheres with radii from 2.0A to 4.0A in 0.5A increments.
165+
```
166+
>>>python -m dbstep dbstep/data/CHiPr2.xyz --atom1 1 -b --scan 2.0:4.0:0.5
167+
168+
File Atom R/Å Mol_Vol %V_Bur %S_Bur
169+
-----------------------------------------------------------
170+
CHiPr2.xyz 1 2.00 116.50 58.27 49.52
171+
CHiPr2.xyz 1 2.50 116.50 53.53 46.22
172+
CHiPr2.xyz 1 3.00 116.50 48.78 38.14
173+
CHiPr2.xyz 1 3.50 116.50 43.37 29.17
174+
CHiPr2.xyz 1 4.00 116.50 36.73 16.82
175+
-----------------------------------------------------------
176+
```
177+
178+
5. 2D Additive sterics
179+
180+
To calculate 2d graph-based additive sterics, the arguments --2d --fg --maxpath and --2d-type can be used. An input file listing SMILES strings of desired molecule measurements is necessary for calculation. The --fg argument specifies a SMILES string that is common in all provided SMILES inputs to use as a reference point for layer 0. A connectivity matrix will then be used to find atoms 1, 2, 3... N bonds away where N is the max path length specified with the --maxpath argument. One of two types of measurements will be summed at each layer, either Crippen molar refractivities or McGowan volumes, computed for each atom. This can be changed with the --2d-type argument.
181+
170182
```
171183
>>>python -m dbstep examples/smiles.txt --2d --fg "C(O)=O" --maxpath 5 --2d-type mcgowan
172184
```
173-
where smiles.txt looks like:
185+
where smiles.txt looks like:
174186
```
175187
CC(O)=O
176-
CCC(O)=O
177-
CCCC(O)=O
188+
CCC(O)=O
189+
CCCC(O)=O
178190
CCCCC(O)=O
179191
CC(C)C(O)=O
180192
CCC(C)C(O)=O
181193
```
182-
The output will then be written to the file "smiles_2d_output.csv" in the format:
183-
|0_mcgowan| 1_mcgowan| 2_mcgowan| 3_mcgowan| 4_mcgowan| Structure|
194+
The output will then be written to the file "smiles_2d_output.csv" in the format:
195+
196+
|0_mcgowan|1_mcgowan|2_mcgowan|3_mcgowan|4_mcgowan|Structure|
184197
| ------- | ------- | ------- | ------- | ------- | ------- |
185-
|4.55| 11.68| 0| 0| 0| CC(O)=O|
186-
|4.55| 8.21| 11.68| 0| 0| CCC(O)=O|
187-
|4.55| 8.21| 8.21| 11.68| 0| CCCC(O)=O|
188-
|4.55| 8.21| 8.21| 8.21| 11.68| CCCCC(O)=O|
189-
|4.55| 4.74| 23.36| 0| 0| CC(C)C(O)=O|
190-
|4.55| 4.74| 19.89| 11.68| 0| CCC(C)C(O)=O|
191-
192-
193-
### Acknowledgements
194-
195-
This work is developed by Guilian Luchini, Toby Patterson and Robert Paton and is supported by the [NSF Center for Computer-Assisted Synthesis](https://ccas.nd.edu/), grant number [CHE-1925607](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1925607&HistoricalAwards=false)
196-
197-
<img src="https://www.nsf.gov/images/logos/NSF_4-Color_bitmap_Logo.png" width="50" height="50"> <img src="https://pbs.twimg.com/profile_images/1168617043106521088/SOLQaZ8M_400x400.jpg" width="50" height="50">
198-
199-
### References
200-
201-
1. Verloop, A., Drug Design. Ariens, E. J., Ed. Academic Press: New York, **1976**; Vol. III
202-
2. Hillier, A. C.; Sommer, W. J.; Yong, B. S.; Petersen, J. L.; Cavallo, L.; Nolan, S. P. *Organometallics* **2003**, *22*, 4322-4326.
198+
|4.55|11.68|0|0|0|CC(O)=O|
199+
|4.55|8.21|11.68|0|0|CCC(O)=O|
200+
|4.55|8.21|8.21|11.68|0|CCCC(O)=O|
201+
|4.55|8.21|8.21|8.21|11.68|CCCCC(O)=O|
202+
|4.55|4.74|23.36|0|0|CC(C)C(O)=O|
203+
|4.55|4.74|19.89|11.68|0|CCC(C)C(O)=O|
204+
205+
### Acknowledgements
206+
207+
This work is developed by Guilian Luchini, Toby Patterson and Robert Paton and is supported by the [NSF Center for Computer-Assisted Synthesis](https://ccas.nd.edu/), grant number [CHE-1925607](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1925607&HistoricalAwards=false)
208+
209+
<img src="https://www.nsf.gov/images/logos/NSF_4-Color_bitmap_Logo.png" width="50" height="50"> <img src="https://pbs.twimg.com/profile_images/1168617043106521088/SOLQaZ8M_400x400.jpg" width="50" height="50">
210+
211+
### References
212+
213+
1. Verloop, A., Drug Design. Ariens, E. J., Ed. Academic Press: New York, **1976**; Vol. III
214+
2. Hillier, A. C.; Sommer, W. J.; Yong, B. S.; Petersen, J. L.; Cavallo, L.; Nolan, S. P. *Organometallics* **2003**, *22*, 4322-4326.

dbstep/Dbstep.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def __init__(self, *args, **kwargs):
5959
# flag volume if buried shell requested
6060
if options.vshell:
6161
options.volume = True
62+
# sterimol scan requires grid-based measurement for per-radius slicing
63+
if options.sterimol and options.scan and options.measure == "classic":
64+
options.measure = "grid"
6265

6366
origin = np.array([0, 0, 0])
6467
self._get_spec_atoms(options)
@@ -477,6 +480,10 @@ def main():
477480
options.SCALE_VDW = 1.17
478481
options.noH = True
479482

483+
# Sterimol scan requires grid-based measurement for per-radius slicing
484+
if options.sterimol and options.scan and options.measure == "classic":
485+
options.measure = "grid"
486+
480487
# make sure upper/lower case doesn't matter
481488
options.surface = options.surface.lower()
482489

0 commit comments

Comments
 (0)