diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 6d079f5..04c9b28 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.0.25 +current_version = 0.0.26 commit = True tag = True diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f945aa3..7b89045 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: platforms: linux/amd64 load: true push: false - tags: ghcr.io/${{ github.repository }}:0.0.25, ghcr.io/${{ github.repository }}:latest + tags: ghcr.io/${{ github.repository }}:0.0.26, ghcr.io/${{ github.repository }}:latest - name: 'Install Nextflow' uses: stracquadaniolab/gh-action-setup-nextflow@v0.2.0 - name: 'Testing Nextflow pipeline with test profile' @@ -39,4 +39,4 @@ jobs: file: containers/Dockerfile platforms: linux/amd64 push: true - tags: ghcr.io/${{ github.repository }}:0.0.25, ghcr.io/${{ github.repository }}:latest \ No newline at end of file + tags: ghcr.io/${{ github.repository }}:0.0.26, ghcr.io/${{ github.repository }}:latest \ No newline at end of file diff --git a/bin/openmmMD.py b/bin/openmmMD.py index 18dc06e..83ae975 100755 --- a/bin/openmmMD.py +++ b/bin/openmmMD.py @@ -142,11 +142,11 @@ def md_nvt(simulation, csvname: str, totalsteps: int, reprate: int, pdbname, int simulation.context.setVelocitiesToTemperature(300*kelvin) simulation.reporters.append(app.PDBReporter(pdbname, reprate)) simulation.reporters.append(app.StateDataReporter(stdout, reprate, step=True, potentialEnergy=True, temperature=True, volume=True)) - prepdf = {'Step':[], 'Potential Energy (kJ/mole)':[], 'Temperature (K)':[], 'Box Volume (nm^3)':[]} + prepdf = {'Step':[], 'Potential Energy (kJ/mole)':[], 'Temperature (K)':[], 'Box Volume (nm^3)':[], 'Pressure (kPa)':[]} inidf = pd.DataFrame(prepdf) inidf.to_csv(csvname, index=False) simulation.reporters.append(app.StateDataReporter(csvname, reprate, step=True, - potentialEnergy=True, temperature=True, volume=True, append=True)) + potentialEnergy=True, temperature=True, volume=True, pressure=True, append=True)) simulation.step(totalsteps) final_state = simulation.context.getState(getEnergy=True, getPositions=True) final_pe = final_state.getPotentialEnergy().value_in_unit(kilocalories_per_mole) @@ -167,7 +167,7 @@ def md_nvt(simulation, csvname: str, totalsteps: int, reprate: int, pdbname, int def rmsf_analysis(pdb_traj: str, rmsfcsv: str): u = mda.Universe(pdb_traj) - u.trajectory.dt = 0.001 + #u.trajectory.dt = 0.001 average = align.AverageStructure(u, u, select='protein and name CA', ref_frame=0).run() ref = average.results.universe aligner = align.AlignTraj(u, ref, select='protein and name CA', in_memory=True).run() @@ -177,6 +177,7 @@ def rmsf_analysis(pdb_traj: str, rmsfcsv: str): residue_names = [residue.resname for residue in c_alphas.residues] rmsf_values = R.rmsf df = pd.DataFrame({'Res_ID': residue_ids, 'Res_Name': residue_names, 'RMSF': rmsf_values }) + print(df) df.to_csv(rmsfcsv, index=False) def main(): @@ -199,6 +200,21 @@ def main(): app.PDBFile.writeFile(sim_run[4], sim_run[5], open(wt_ref, "w"), keepIds=True) rmsfout = str("wt_rmsf" + strj + ".csv") rmsf_analysis(pdbname, rmsfout) + for mutant in new_rep_cleaned.splitlines(): + mutpdb = create_mutants(wt_out, mutant, arguments['--chain'], arguments['--pH']) + modeller = setup_modeller(mutpdb) + mut_pdb = energy_minimization(modeller) + mut_out = str(mutant + "_minimised" + strj + ".pdb") + app.PDBFile.writeFile(mut_pdb[0], mut_pdb[1], open(mut_out, "w"), keepIds=True) + simulation = mut_pdb[3] + integrator = mut_pdb[4] + csvname = str(mutant + "_traj" + strj + ".csv") + pdbname = str(mutant + "_traj" + strj + ".pdb") + sim_run = md_nvt(simulation, csvname, 10000, 1000, pdbname, integrator) + mut_ref = str(mutant + "reference" + strj + ".pdb") + app.PDBFile.writeFile(sim_run[4], sim_run[5], open(mut_ref, "w"), keepIds=True) + rmsfout = str(mutant + "_rmsf" + strj + ".csv") + rmsf_analysis(pdbname, rmsfout) if __name__ == '__main__': arguments = docopt(__doc__, version='openmmMD.py') diff --git a/conf/base.config b/conf/base.config index 187fc29..44364a9 100644 --- a/conf/base.config +++ b/conf/base.config @@ -2,7 +2,7 @@ manifest { name = 'quickmd-nf' description = 'A workflow to anperform molecular dynamics (MD) simulations and analysis of proteins in solution' - version = '0.0.25' + version = '0.0.26' homePage = 'https://github.com/stracquadaniolab/quickmd-nf.git' author = 'Josh David Littlefair' nextflowVersion = '>=20.07.1' @@ -40,7 +40,7 @@ profiles { shifter.enabled = false charliecloud.enabled = false - process.container = "ghcr.io/stracquadaniolab/quickmd-nf:0.0.25" + process.container = "ghcr.io/stracquadaniolab/quickmd-nf:0.0.26" } singularity { @@ -51,7 +51,7 @@ profiles { shifter.enabled = false charliecloud.enabled = false - process.container = "docker://ghcr.io/stracquadaniolab/quickmd-nf:0.0.25" + process.container = "docker://ghcr.io/stracquadaniolab/quickmd-nf:0.0.26" } slurm { diff --git a/containers/Dockerfile b/containers/Dockerfile index a49c6c7..ea9a7d2 100644 --- a/containers/Dockerfile +++ b/containers/Dockerfile @@ -22,7 +22,7 @@ LABEL org.opencontainers.image.documentation="https://github.com/stracquadaniola LABEL org.opencontainers.image.source="https://github.com/stracquadaniolab/quickmd-nf" LABEL org.opencontainers.image.vendor="stracquadaniolab" LABEL org.opencontainers.image.authors="Josh David Littlefair" -LABEL org.opencontainers.image.revision="v0.0.25" +LABEL org.opencontainers.image.revision="v0.0.26" COPY --chown=micromamba:micromamba ${CONDA_FILE} /tmp RUN micromamba install -y -n base -f /tmp/`basename ${CONDA_FILE}` && \ diff --git a/readme.md b/readme.md index 3334a57..ae768dd 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # quickmd-nf -![](https://img.shields.io/badge/current_version-0.0.25-blue) +![](https://img.shields.io/badge/current_version-0.0.26-blue) ![](https://github.com/stracquadaniolab/quickmd-nf/workflows/build/badge.svg) ## Overview A workflow to anperform molecular dynamics (MD) simulations and analysis of proteins in solution