Skip to content

Commit

Permalink
updated codes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulshamrat committed Jun 11, 2023
1 parent 10ad2a7 commit 311df8c
Show file tree
Hide file tree
Showing 64 changed files with 278,763 additions and 1 deletion.
Binary file added 1aki/#em.tpr.1#
Binary file not shown.
18,675 changes: 18,675 additions & 0 deletions 1aki/#topol.top.1#

Large diffs are not rendered by default.

18,676 changes: 18,676 additions & 0 deletions 1aki/#topol.top.2#

Large diffs are not rendered by default.

1,436 changes: 1,436 additions & 0 deletions 1aki/1AKI.pdb

Large diffs are not rendered by default.

1,357 changes: 1,357 additions & 0 deletions 1aki/1AKI_clean.pdb

Large diffs are not rendered by default.

1,963 changes: 1,963 additions & 0 deletions 1aki/1AKI_newbox.gro

Large diffs are not rendered by default.

1,963 changes: 1,963 additions & 0 deletions 1aki/1AKI_processed.gro

Large diffs are not rendered by default.

33,895 changes: 33,895 additions & 0 deletions 1aki/1AKI_solv.gro

Large diffs are not rendered by default.

33,879 changes: 33,879 additions & 0 deletions 1aki/1AKI_solv_ions.gro

Large diffs are not rendered by default.

177 changes: 177 additions & 0 deletions 1aki/auto_md_230504.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# AUTO MD"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'/mnt/c/Users/paul/works/1aki/1aki_2'"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pwd"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"! gmx"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"! wget -O ions.mdp https://raw.githubusercontent.com/paulshamrat/ColabMDA/main/mdps/ions.mdp\n",
"! wget -O md.mdp https://raw.githubusercontent.com/paulshamrat/ColabMDA/main/mdps/md.mdp\n",
"! wget -O minim.mdp https://raw.githubusercontent.com/paulshamrat/ColabMDA/main/mdps/minim.mdp\n",
"! wget -O npt.mdp https://raw.githubusercontent.com/paulshamrat/ColabMDA/main/mdps/npt.mdp\n",
"! wget -O nvt.mdp https://raw.githubusercontent.com/paulshamrat/ColabMDA/main/mdps/nvt.mdp\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\n",
"# Download pdb structure\n",
"! wget https://files.rcsb.org/download/1AKI.pdb\n",
"\n",
"# Strip out Water\n",
"! grep -v HOH 1AKI.pdb > 1AKI_clean.pdb\n",
"\n",
"# cleaned file\n",
"! gmx pdb2gmx -f 1AKI_clean.pdb -o 1AKI_processed.gro -water spce -ignh -ff amber99sb-ildn\n",
"\n",
"# add box\n",
"! gmx editconf -f 1AKI_processed.gro -o 1AKI_newbox.gro -c -d 1.0 -bt cubic\n",
"\n",
"# solvate\n",
"! gmx solvate -cp 1AKI_newbox.gro -cs spc216.gro -o 1AKI_solv.gro -p topol.top\n",
"\n",
"# final sove\n",
"! gmx grompp -f ions.mdp -c 1AKI_solv.gro -p topol.top -o ions.tpr\n",
"\n",
"\n",
"#This is a trick to provide interactive options to gmx\n",
"! echo \"SOL\" > options\n",
"! echo \" \" >> options\n",
"# Now we have an atomic-level description of our system in the binary file ions.tpr. We will pass this file to genion:\n",
"# When prompted, choose group 13 \"SOL\" for embedding ions.\n",
"! gmx genion -s ions.tpr -o 1AKI_solv_ions.gro -p topol.top -pname NA -nname CL -neutral < options\n",
"\n",
"\n",
"# Assemble the binary input using grompp using [](this) input parameter file:\n",
"! gmx grompp -f minim.mdp -c 1AKI_solv_ions.gro -p topol.top -o em.tpr\n",
"\n",
"#Using grompp to prepare our minimization MD\n",
"! gmx grompp -f minim.mdp -c 1AKI_solv_ions.gro -p topol.top -o em.tpr\n",
"\n",
"#Run our minimization\n",
"! gmx mdrun -v -deffnm em\n",
"\n",
"\n",
"#This is a trick to provide interactive options to gmx\n",
"! echo \"Potential\" > options\n",
"! echo \" \" >> options\n",
"\n",
"# Let's do a bit of analysis. The em.edr file contains all of the energy terms that GROMACS collects during EM. \n",
"# You can analyze any .edr file using the GROMACS energy module:\n",
"! gmx energy -f em.edr -o potential.xvg < options\n",
"# At the prompt, type \"10 0\" to select Potential (10); zero (0) terminates input.\n",
"\n",
"\n",
"# We will call grompp and mdrun just as we did at the EM step:\n",
"! gmx grompp -f nvt.mdp -c em.gro -r em.gro -p topol.top -o nvt.tpr\n",
"! gmx mdrun -deffnm nvt\n",
"\n",
"#################################\n",
"\n",
"\n",
"#This is a trick to provide interactive options to gmx\n",
"! echo \"Temperature\" > options\n",
"! echo \" \" >> options\n",
"# Let's analyze the temperature progression, again using energy:\n",
"! gmx energy -f nvt.edr -o temperature.xvg < options\n",
"# Type \"16 0\" at the prompt to select the temperature of the system and exit.\n",
"\n",
"\n",
"# We will call grompp and mdrun just as we did for NVT equilibration. \n",
"! gmx grompp -f npt.mdp -c nvt.gro -r nvt.gro -t nvt.cpt -p topol.top -o npt.tpr\n",
"! gmx mdrun -deffnm npt\n",
"\n",
"\n",
"\n",
"#This is a trick to provide interactive options to gmx\n",
"! echo \"Pressure\" > options\n",
"! echo \" \" >> options\n",
"# Let's analyze the pressure progression, again using energy:\n",
"! gmx energy -f npt.edr -o pressure.xvg < options\n",
"# Type \"18 0\" at the prompt to select the pressure of the system and exit. \n",
"\n",
"\n",
"\n",
"#This is a trick to provide interactive options to gmx\n",
"! echo \"Density\" > options\n",
"! echo \" \" >> options\n",
"\n",
"# Let's take a look at density as well\n",
"! gmx energy -f npt.edr -o density.xvg < options\n",
"# this time using energy and entering \"24 0\" at the prompt.\n",
"\n",
"\n",
"# We will run a 1-ns MD simulation,\n",
"! gmx grompp -f md.mdp -c npt.gro -t npt.cpt -p topol.top -o md_0_1.tpr\n",
"\n",
"\n",
"# Assuming you have one GPU available, the mdrun command to make use of it is as simple as:\n",
"! gmx mdrun -deffnm md_0_1"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
35 changes: 35 additions & 0 deletions 1aki/density.xvg
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This file was created Thu May 4 15:06:59 2023
# Created by:
# :-) GROMACS - gmx energy, 2021.4-Ubuntu-2021.4-2 (-:
#
# Executable: /bin/gmx
# Data prefix: /usr
# Working dir: /mnt/c/Users/paul/works/1aki/1aki_2
# Command line:
# gmx energy -f npt.edr -o density.xvg
# gmx energy is part of G R O M A C S:
#
# GROup of MAchos and Cynical Suckers
#
@ title "GROMACS Energies"
@ xaxis label "Time (ps)"
@ yaxis label "(kg/m^3)"
@TYPE xy
@ view 0.15, 0.15, 0.75, 0.85
@ legend on
@ legend box on
@ legend loctype view
@ legend 0.78, 0.8
@ legend length 2
@ s0 legend "Density"
0.000000 994.001953
1.000000 1019.782715
2.000000 1016.534729
3.000000 1014.574158
4.000000 1020.538635
5.000000 1019.669861
6.000000 1017.436218
7.000000 1021.530579
8.000000 1019.994568
9.000000 1017.937988
10.000000 1013.635864
Binary file added 1aki/em.edr
Binary file not shown.
Loading

0 comments on commit 311df8c

Please sign in to comment.