peptidesim
Automated peptide simulation tool with gromacs, gromacswrapper, plumed
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.0%) to scientific vocabulary
Keywords
Repository
Automated peptide simulation tool with gromacs, gromacswrapper, plumed
Basic Info
Statistics
- Stars: 8
- Watchers: 4
- Forks: 1
- Open Issues: 5
- Releases: 4
Topics
Metadata Files
README.md
1. PeptideSim <!-- omit in toc -->
- 1. Release Notes
- 2. Installation
- 3. Running Tests
- 4. Developer Test Environment
- 5. Example Workflows
- 6. Restarting Simulations
1. Release Notes
See Changelog
2. Installation
2.1. Bluehive Install
Load required modules
bash module load anaconda3 packmol libmatheval gromacs-plumed/2019.4/b2 openblas gitCreate a virtual environment
bash conda create -n yourenvname python=3.7Peptidesim is no longer available for python2 versions. Once you create your environment, you should activate it for the next steps:bash source activate yourenvnameCheck on pip and python and make sure they are sourced to your environment directory: ```bash which pip #or which pythonThe output should look like this:
/.conda/envs/yourenvname/bin/pip
``
**Note**: In case the environment is not properly activated, i.e.,which pipoutputs a path not as mentioned above, tryconda init. Close and reopen a new terminal and doconda activate`. For installing PeptideSim, you need to clone the package from github.
bash git clone https://github.com/ur-whitelab/peptidesim.gitChange directory topackageand install the requirements and the module:bash cd package pip install -e .Setup a config file for Gromacswrapper to be able to find the gromacs installation. You can use the one given below and save it to
~/.gromacswrapper.cfg
.gromacswrapper.cfg
text
[ DEFAULT ]
qscriptdir = %( configdir )s/qscripts
templatesdir = %( configdir )s/templates
configdir = ~/.gromacswrapper
[ Gromacs ]
release = 2019.4
gmxrc = /software/gromacs-plumed/2019.4/b2/bin/GMXRC
extra =
tools = gmx gmx_mpi
groups = tools
[ Logging ]
logfilename = gromacs .log
loglevel_console = INFO
loglevel_file = DEBUG
Alternatively, on a non-head node use interactive python to do this:
python
import gromacs
gromacs.config.setup()
3. Running Tests
You must install pytest first, then you can run the tests using the following command:
sh
python -m pytest -x -v peptidesim/package/tests/
You should be on an interactive node if on bluehive. The tests generate a lot of files, so run it in a clean directory.
4. Developer Test Environment
4.1. Creating Docker Image
Load the plumed gromacs docker image from dockerhub:
sh
docker pull whitelab/plumed-gromacs
Now we build the peptidesim testing image
sh
cd test-docker
docker build -t peptidesim/test .
These two steps gather the plumed and gromacs version. Generally, you do not need to re-run them.
4.2. Running Unit Tests
From the repo root directory:
bash
[sudo] ./test.sh
You may need to have sudo depending on your docker configuration. This will run all tests and clean-up. If are using Windows or need to modify the command, use:
sh
docker run -it --rm -v [path_to_peptidesim_root]:/home/whitelab/peptidesim peptidesim/test
4.4. Running Unit Tests Interactively
If you want to leave all test files around and have python access to troubleshoot, including an editable install so code you change is reflected, use:
sh
[sudo] ./interact.sh
Type exit to leave the docker environment. See instructions that are printed after
running the command for how to interact/use the environment.
5. Example Workflows
5.1. NVT simulations with multiple peptides
A complete example can be found in peptidesim/inputs/simple.
5.1.1. Imports
Create a Python script simple.py and import the PeptideSim class
python
from pepsidesim import PeptideSim
5.1.2. Input Conditions
Specify peptides, conditions, and initialize. Note that all properties of the PeptideSim have defaults, so you do not necessarily need to specify a concentration or water model.
python
seq = 'EKEKEKEKEKEK' # input the sequence in one-letter-code
name = 'EK6' # naming the sequence
pep_copies = 1 # specify the number of copies, increase the number if running multiple chains to study self assembly and etc.
ps = PeptideSim(name, [seq], [pep_copies], job_name='2mer_{}'.format(name)) # input to PeptideSim
ps.peptide_density = 0.008 # g/mol
ps.water = 'spce' # specify water model
ps.mpi_np = 4 # Number of MPI processes to use
ps.initialize()
5.1.2.1 Using Arbitrary Forcefields
In case you want to use a forcefield X that is not available in GROMACS,
add the forcefield files to the peptidesim object and put it in the peptide_structures
directory. Then use the pdb2gmx_args input options to select the forcefield.
```python ps.addfile('path/to/forcefieldX.ff') ps.putindir('peptide_structures') ps.forcefield = 'select' ps.water = 'select'
Specify input options, here ('1', '1') are the strings you would enter for the
forcefield and water, respectively, when using gmx pdb2gmx command interactively.
ps.pdb2gmx_args['input'] = ('1', '1') ```
Note that if you want to use a water model that's not available in GROMACS,
you need to provide the water_model.gro file to solvate the system.
You will have to change the source code function _solvate()
in /package/peptidesim/peptidesim.py to specify this new water file.
5.1.3. Simulation Steps
Here we do energy minimization, annealing and NVT equilibration. Note that
we can pass specific gromacs mdp arguments as python objects. The tag is
the short name of the simulation we are doing. The mdpfile names used here
are templates found in the peptidesim package. You can provide your own files
if desired.
python
ps.run(mdpfile='peptidesim_emin.mdp', tag='init_emin', mdp_kwargs={'nsteps': 10**5})
ps.run(mdpfile='peptidesim_anneal.mdp', tag='anneal_nvt')
ps.run(mdpfile='peptidesim_nvt.mdp', tag='nvt_prod', mdp_kwargs={'nsteps': int(3 * 5*10**5), 'constraints': 'h-bonds'})
5.1.4. Run the script
If you are using a slurm job script, you could use this example: ```bash
!/bin/sh
SBATCH --partition=standard --time=120:00:00 --output=EK6.txt
SBATCH --mail-type ALL
SBATCH -N 2
python simple.py ```
5.2. Enhanced Sampling (PT-WTE)/ Experiment Directed simulation (EDS)
A complete example can be found in peptidesim/inputs/pte.
6. Restarting Simulations
Restarting is handled via the built-in gromacs restarts combined with python pickle objects. After each modification of the simulation (e.g., initialization or running a simulation), a current pickle file is saved in the peptidesim root directory. Its name matches your job name. Additionally, previous pickle files are saved in a directory called restarts that can be used to resume from previous stages. Your current pickle is always saved there too, so that you can simply move a pickle file from this directory to your root directory to restart from a different step. Pickle files are automatically used to restart your simulation in a script and simulations that have already completed will be skipped so that you need not edit your script if restarting.
You can disable restarting by passing the restartable=False argument to the PeptideSim initialization. If the restartable flag is not set but there are existing pickle objects, an error will occur to prevent you from accidentally overwriting a previous simulation.
© Andrew White at University of Rochester
Owner
- Name: White Laboratory
- Login: ur-whitelab
- Kind: organization
- Website: http://thewhitelab.org
- Repositories: 41
- Profile: https://github.com/ur-whitelab
Citation (CITATION.cff)
cff-version: "1.1.0"
message: "If you use this software, please cite it using these metadata."
authors:
-
affiliation: "Department of Chemical Engineering, University of Rochester"
family-names: Amirkulova
given-names: Dilnoza
orcid: "https://orcid.org/0000-0001-6961-3081"
-
affiliation: "Department of Chemical Engineering, University of Rochester"
family-names: Gandhi
given-names: Heta
orcid: "https://orcid.org/0000-0002-9465-3840"
-
affiliation: "Department of Chemical Engineering, University of Rochester"
family-names: Chakraborty
given-names: Maghesree
orcid: "https://orcid.org/0000-0001-5706-3027"
-
affiliation: "Department of Chemical Engineering, University of Rochester"
family-names: Ansari
given-names: Mehrad
orcid: "https://orcid.org/0000-0001-5696-9193"
-
affiliation: "Department of Chemical Engineering, University of Rochester"
family-names: Barrett
given-names: Rainier
orcid: "https://orcid.org/0000-0001-5706-3027"
-
affiliation: "Department of Chemical Engineering, University of Rochester"
family-names: Xu
given-names: Jinyu
-
affiliation: "Department of Chemical Engineering, University of Rochester"
family-names: White
given-names: Andrew
orcid: "https://orcid.org/0000-0002-6647-3965"
repository-code: "https://github.com/ur-whitelab/peptidesim"
title: "Peptidesim: Automated peptide simulation tool with gromacs, gromacswrapper, plumed"
version: "0.51"
...
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 55
- Total pull requests: 46
- Average time to close issues: 2 months
- Average time to close pull requests: 9 days
- Total issue authors: 5
- Total pull request authors: 6
- Average comments per issue: 1.13
- Average comments per pull request: 2.0
- Merged pull requests: 37
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- whitead (36)
- hgandhi2411 (10)
- dilnoza92 (3)
- mchakra2 (2)
- navneeth3005 (1)
Pull Request Authors
- whitead (19)
- dilnoza92 (10)
- hgandhi2411 (7)
- JinyuXu (3)
- mehradans92 (3)
- mchakra2 (2)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- GromacsWrapper *
- PeptideBuilder *
- biopython *
- dill *
- future *
- pandas *
- pytest *
- requests *
- tqdm *
- traitlets *