This PR introduces the building of custom OPLS3e/OPLS4 parameters and optimization of conformers using the OPLS force fields with Schrodinger tools
This PR replaces #63 so that the Schrodinger command tree can be built alongside the season 1 infrastructure, which uses openforcefield version 0.8.4
Installation of schrodinger command group in a dev environment
First, follow the installation procedures for the openff-benchmark-optimization environment described in Deployment Procedure document
Once this is done, you can clone the environment into a development environment:
General help about new command group:
openff-benchmark schrodinger --help
General comments
The schrodinger command group needs access to Schrodinger binaries. They will try to use the SCHRODINGER environment variable. If it is not set, the path to the Schrodinger binaries can be set in the --schrodinger-path command line option of the following commands.
Additionally, the OPLS force field makes use of custom parameters. The custom parameter directory can be set with the --opls-dir command line option.
The commands ffbuilder and optimize have the additional options to set --host and --max-jobs. With the --host option, you can specify the host (queue) on which the ffbuilder or optimization should be run. The name of the host has to be specified in your schrodinger.hosts configuration file. With --max-jobs, you can set the maximal number of parallel subjobs run on the host. If these options are not specified, default settings will be used.
OPLS3e vs OPLS4
Whether OPLS3e or OPLS4 is used, is automatically specified by the Schrodinger version you are using. If you use Schrodinger versions 2020-4 or below, the force field will be OPLS3e, if you use Schrodinger versions 2021-1 or above, the force field will be OPLS4.
If you ran the ffbuilder command for OPLS3e already, you can use the ffbuilder output to fit OPLS4 (not included in the openff-benchmark commands).
Step 1: Build custom parameters
Start up a ffbuilder custom parameter calculation using default arguments and the QM optimized molecules:
It takes into account already available custom parameters in the path given as the option --opls-dir. If --opls-dir is not given or the specified path is not available (i.e. if you are a new user), all parameters will be calculated from scratch. If you run the ffbuilder for the first time and don't have custom parameters yet, do not specify the --opls-dir as this will lead to an error. The same counts if you used OPLS3e before and run the ffbuilder for the first time with OPLS4. The command will create a ffbuilder job ffb_openff_benchmark in the directory 7-schrodinger-ffb. If there are already output files in the output directory, they will be moved to a backup directory 7-schrodinger-ffb/ffb_openff_benchmark.bk[.x] and previously build custom parameters will be automatically merged with the custom parameter path. The output directory can be changed with the -o/--output-path option.
Now you have to wait until the ffbuilder job has finished. You can check the progress of the calculations in the file 7-schrodinger-ffb/ffb_openff_benchmark.log.
Note: You might realize that the ffbuilder input file ffb_input.sdf includes less conformers than you gave as an input. That is correct as the ffbuilder needs only one conformer per molecule.
Step 2: Merge parameters in custom parameter path
This command merges the newly built parameters to your custom parameter path.
The input path must be the output path of step 1. The custom parameters path can be specified with the option --opls-dir, which defaults to ~/.schrodinger/opls_dir/. If the specified or the default --opls-dir does not exist, the directory will be created and initialized. This could be the case if you are a new user or you want to create a separate custom parameter directory.
Step 3a: Run optimization without custom parameters
Optimization using OPLS3e using NO custom parameters:
This will create a Schrodinger macromodel optimization run in the directory 8-schrodinger-mm-default. The latter directory can be changed with the -o/--output-path option. If the directory already exists and you want to replace the data, you need to run the command with the option --delete-existing.
Step 3b: Run optimization with custom parameters
By adding a custom parameter path to the optimize command, the optimization will use OPLS3e with custom parameters. Warning: If you have not built the custom parameters correctly and merged them to your custom parameter path, (steps 1 and 2), the command will use the available custom parameters, but the newly built parameters will be missing.
This will create a Schrodinger macromodel optimization run in the directory 9-schrodinger-mm-custom. The latter directory can be changed with the -o/--output-path option. If the directory already exists and you want to replace the data, you need to run the command with the option --delete-existing.
Step 4: Postprocessing
The output files mmod_output.maegz in the respective directories will be postprocessed with the commands:
This will save the postprocessed SDF files in 4-compute-mm/opls3e_default/4-compute-mm/opls3e_custom (if you used Schrodinger versions 2020-4 or below) or in 4-compute-mm/opls4_default/4-compute-mm/opls4_custom (if you used Schrodinger versions 2021-1 or above). If these directories exist already and you want to replace the data, you need to run the commands with the option --delete-existing.
Hint:
The last two commands can be run together:
openff-benchmark schrodinger postprocess -o 4-compute-mm 8-schrodinger-mm-default/mmod_output.maegz 9-schrodinger-mm-custom/mmod_output.maegz
)
The respective output directories can be included in the final analysis steps.
Todos
[x] inclusion of Schrodinger ffbuilder
[x] postprocessing of ffbuilder
[x] schrodinger optimize optimization with Schrodinger macromodel
[x] schrodinger postprocess postprocessing of macromodel output
[ ] (possibly) minimization with ANI using Schrodinger Jaguar
Questions
[x] ffbuilder: Split the calculation up in several subjobs with batches of e.g. 100 molecules?
-> This can be done by the user, i.e.
for i in `seq 0 9`; do
`openff-benchmark schrodinger ffbuilder -o 7-schrodinger-ffb-${i} 4-compute-qm/b3lyp-d3bj/dzvp/TST-00${i}*.sdf`
done
will create 10 ffbuilder jobs with batches of 100 molecules for molecules with molecule_index from 00000 to 00999
Merging #84 (5b26466) into season-1 (06ff926) will not change coverage.
The diff coverage is 96.00%.
:exclamation: Current head 5b26466 differs from pull request most recent head f37b907. Consider uploading reports for the commit f37b907 to get more accurate results
Description
This PR introduces the building of custom OPLS3e/OPLS4 parameters and optimization of conformers using the OPLS force fields with Schrodinger tools This PR replaces #63 so that the Schrodinger command tree can be built alongside the season 1 infrastructure, which uses
openforcefield
version0.8.4
Installation of
schrodinger
command group in a dev environmentFirst, follow the installation procedures for the
openff-benchmark-optimization
environment described in Deployment Procedure documentOnce this is done, you can clone the environment into a development environment:
Install the
schrodinger
branch from github:Docs
General help about new command group:
openff-benchmark schrodinger --help
General comments
The
schrodinger
command group needs access to Schrodinger binaries. They will try to use the SCHRODINGER environment variable. If it is not set, the path to the Schrodinger binaries can be set in the--schrodinger-path
command line option of the following commands.Additionally, the OPLS force field makes use of custom parameters. The custom parameter directory can be set with the
--opls-dir
command line option.The commands
ffbuilder
andoptimize
have the additional options to set--host
and--max-jobs
. With the--host
option, you can specify the host (queue) on which the ffbuilder or optimization should be run. The name of the host has to be specified in your schrodinger.hosts configuration file. With--max-jobs
, you can set the maximal number of parallel subjobs run on the host. If these options are not specified, default settings will be used.OPLS3e vs OPLS4
Whether OPLS3e or OPLS4 is used, is automatically specified by the Schrodinger version you are using. If you use Schrodinger versions 2020-4 or below, the force field will be OPLS3e, if you use Schrodinger versions 2021-1 or above, the force field will be OPLS4. If you ran the
ffbuilder
command for OPLS3e already, you can use the ffbuilder output to fit OPLS4 (not included in theopenff-benchmark
commands).Step 1: Build custom parameters
Start up a ffbuilder custom parameter calculation using default arguments and the QM optimized molecules:
openff-benchmark schrodinger ffbuilder [--opls-dir ~/.schrodinger/opls_dir] 4-compute-qm/b3lyp-d3bj/dzvp/
It takes into account already available custom parameters in the path given as the option
--opls-dir
. If--opls-dir
is not given or the specified path is not available (i.e. if you are a new user), all parameters will be calculated from scratch. If you run the ffbuilder for the first time and don't have custom parameters yet, do not specify the--opls-dir
as this will lead to an error. The same counts if you used OPLS3e before and run the ffbuilder for the first time with OPLS4. The command will create a ffbuilder jobffb_openff_benchmark
in the directory7-schrodinger-ffb
. If there are already output files in the output directory, they will be moved to a backup directory7-schrodinger-ffb/ffb_openff_benchmark.bk[.x]
and previously build custom parameters will be automatically merged with the custom parameter path. The output directory can be changed with the-o/--output-path
option.Now you have to wait until the ffbuilder job has finished. You can check the progress of the calculations in the file
7-schrodinger-ffb/ffb_openff_benchmark.log
.Note: You might realize that the ffbuilder input file
ffb_input.sdf
includes less conformers than you gave as an input. That is correct as the ffbuilder needs only one conformer per molecule.Step 2: Merge parameters in custom parameter path
This command merges the newly built parameters to your custom parameter path.
openff-benchmark schrodinger ffmerge 7-schrodinger-ffb
The input path must be the output path of step 1. The custom parameters path can be specified with the option
--opls-dir
, which defaults to~/.schrodinger/opls_dir/
. If the specified or the default--opls-dir
does not exist, the directory will be created and initialized. This could be the case if you are a new user or you want to create a separate custom parameter directory.Step 3a: Run optimization without custom parameters
Optimization using OPLS3e using NO custom parameters:
openff-benchmark schrodinger optimize 4-compute-qm/b3lyp-d3bj/dzvp/
This will create a Schrodinger macromodel optimization run in the directory
8-schrodinger-mm-default
. The latter directory can be changed with the-o/--output-path
option. If the directory already exists and you want to replace the data, you need to run the command with the option--delete-existing
.Step 3b: Run optimization with custom parameters
By adding a custom parameter path to the
optimize
command, the optimization will use OPLS3e with custom parameters. Warning: If you have not built the custom parameters correctly and merged them to your custom parameter path, (steps 1 and 2), the command will use the available custom parameters, but the newly built parameters will be missing.openff-benchmark schrodinger optimize --opls-dir ${HOME}/.schrodinger/opls_dir 4-compute-qm/b3lyp-d3bj/dzvp/
This will create a Schrodinger macromodel optimization run in the directory
9-schrodinger-mm-custom
. The latter directory can be changed with the-o/--output-path
option. If the directory already exists and you want to replace the data, you need to run the command with the option--delete-existing
.Step 4: Postprocessing
The output files
mmod_output.maegz
in the respective directories will be postprocessed with the commands:openff-benchmark schrodinger postprocess -o 4-compute-mm 8-schrodinger-mm-default/mmod_output.maegz
and
openff-benchmark schrodinger postprocess -o 4-compute-mm 9-schrodinger-mm-custom/mmod_output.maegz
This will save the postprocessed SDF files in
4-compute-mm/opls3e_default
/4-compute-mm/opls3e_custom
(if you used Schrodinger versions 2020-4 or below) or in4-compute-mm/opls4_default
/4-compute-mm/opls4_custom
(if you used Schrodinger versions 2021-1 or above). If these directories exist already and you want to replace the data, you need to run the commands with the option--delete-existing
.Hint: The last two commands can be run together:
openff-benchmark schrodinger postprocess -o 4-compute-mm 8-schrodinger-mm-default/mmod_output.maegz 9-schrodinger-mm-custom/mmod_output.maegz
)The respective output directories can be included in the final analysis steps.
Todos
ffbuilder
ffbuilder
schrodinger optimize
optimization with Schrodinger macromodelschrodinger postprocess
postprocessing of macromodel outputQuestions
ffbuilder
: Split the calculation up in several subjobs with batches of e.g. 100 molecules? -> This can be done by the user, i.e.will create 10 ffbuilder jobs with batches of 100 molecules for molecules with
molecule_index
from00000
to00999
Status