Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions Mol_Analysis.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,8 @@ def process_data(threadName, q):
parser.add_argument("-end", type=int, default=None, help="End at time X (fs)")
parser.add_argument("-large", action="store_true", help="Can plot 9 plots")
parser.add_argument("-splitlen", metavar="slen", default=10, help="Length of timewindow for RMSF calculation (ns). If multiple than separated with comma")
parser.add_argument("-nomkndx", action="store_false",
help="Do not recreate index file; reuse existing ndxfile")
args = parser.parse_args()
timescales = []
try:
Expand All @@ -987,7 +989,7 @@ def process_data(threadName, q):
config.listread(args.f)
groupfolderlist = config.getlist()
# Storing defaults here:
settings = {"odir": "Mol_An", "f": None, "tpr": None,
settings = {"odir": "Mol_An", "f": None, "tpr": None,
"outf": "center_traj.xtc", "outs": "updated.gro",
"outp": "updated.tpr", "ndxfile": "index.ndx",
"ndxparams": None, "chains": ["Protein"], "center": "Protein",
Expand All @@ -998,7 +1000,7 @@ def process_data(threadName, q):
try:
option = config.get("Settings", key)
if "," in option:
option = map(lambda s: s.strip(), option.split(","))
option = list(map(lambda s: s.strip(), option.split(",")))
elif "none" in option.lower():
option = None
continue
Expand Down Expand Up @@ -1049,7 +1051,7 @@ def process_data(threadName, q):
def runandplot(folder, group=0):
runner = gTools_runner(wdir=folder, splitlen=timescales, dryrun=args.n, verbose=args.v,
group=group, **settings)
runner.runall(mindist=args.nomindist, pdbout=args.nopdb, num_cores=args.nt)
runner.runall(mkndx=args.nomkndx, mindist=args.nomindist, pdbout=args.nopdb, num_cores=args.nt)
files_to_plot.append(runner.getfilenames())

# Adding it all to the multithreader
Expand Down Expand Up @@ -1080,8 +1082,10 @@ def runandplot(folder, group=0):
groupedfnames = []
shift = 0
# Align chains here:
#if ("p62" in label_g) and (chain == "chB"):
# shift = 709
#if chain == "chA":
# shift = 124
#elif chain == "chB":
# shift = 7
for model in model_g:
try:
groupedfnames.extend(model["rmsf"+str(i)+"_"+chain+"_n_C-alpha"])
Expand Down
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ optional arguments:
-begin BEGIN Begin from time X (fs)
-end END End at time X (fs)
-large Can plot 9 plots
-nomkndx Use custom index for multiple chains
-splitlen slen Lenght of timewindow for RMSF calculation (in ns, default=10 ns)
if multiple times need to be calculated then separate with a comma

Expand Down
Binary file modified example/Mol_An/plot.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions example/Mol_An/r_gyrate.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:45 2025
# This file was created Tue May 5 11:22:02 2026
# Created by:
# :-) GROMACS - gmx gyrate, 2024 (-:
#
Expand All @@ -9,7 +9,7 @@
# gmx_mpi gyrate -f /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/center_traj.xtc -s /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/updated.tpr -o /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/r_gyrate.xvg
# gmx gyrate is part of G R O M A C S:
#
# Gallium Rubidium Oxygen Manganese Argon Carbon Silicon
# Georgetown Riga Oslo Madrid Amsterdam Chisinau Stockholm
#
@ title "Radius of gyration (total and around axes)"
@ xaxis label "Time (ps)"
Expand Down
4 changes: 2 additions & 2 deletions example/Mol_An/rmsd.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:52 2025
# This file was created Tue May 5 11:22:08 2026
# Created by:
# :-) GROMACS - gmx rms, 2024 (-:
#
Expand All @@ -9,7 +9,7 @@
# gmx_mpi rms -f /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/center_traj.xtc -s /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/updated.tpr -o /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsd.xvg -m /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsd_matrix.xpm -dt 200
# gmx rms is part of G R O M A C S:
#
# GROup of MAchos and Cynical Suckers
# GROwing Monsters And Cloning Shrimps
#
@ title "RMSD"
@ xaxis label "Time (ps)"
Expand Down
4 changes: 2 additions & 2 deletions example/Mol_An/rmsd_Protein.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:44 2025
# This file was created Tue May 5 11:22:02 2026
# Created by:
# :-) GROMACS - gmx rms, 2024 (-:
#
Expand All @@ -9,7 +9,7 @@
# gmx_mpi rms -f /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/center_traj.xtc -s /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/updated.tpr -o /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsd_Protein.xvg -n /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/index.ndx
# gmx rms is part of G R O M A C S:
#
# GROwing Monsters And Cloning Shrimps
# Georgetown Riga Oslo Madrid Amsterdam Chisinau Stockholm
#
@ title "RMSD"
@ xaxis label "Time (ps)"
Expand Down
4 changes: 2 additions & 2 deletions example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_10000.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:47 2025
# This file was created Tue May 5 11:22:03 2026
# Created by:
# :-) GROMACS - gmx rmsf, 2024 (-:
#
Expand All @@ -9,7 +9,7 @@
# gmx_mpi rmsf -f /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/center_traj.xtc -s /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/updated.tpr -o /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_10000.xvg -od /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_10000.xvg -b 0 -e 10000 -n /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/index.ndx -res
# gmx rmsf is part of G R O M A C S:
#
# Gnomes, ROck Monsters And Chili Sauce
# Good gRace! Old Maple Actually Chews Slate
#
@ title "RMS fluctuation"
@ xaxis label "Residue"
Expand Down
4 changes: 2 additions & 2 deletions example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_20000.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:47 2025
# This file was created Tue May 5 11:22:04 2026
# Created by:
# :-) GROMACS - gmx rmsf, 2024 (-:
#
Expand All @@ -9,7 +9,7 @@
# gmx_mpi rmsf -f /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/center_traj.xtc -s /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/updated.tpr -o /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_20000.xvg -od /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_20000.xvg -b 10020 -e 20000 -n /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/index.ndx -res
# gmx rmsf is part of G R O M A C S:
#
# Gnomes, ROck Monsters And Chili Sauce
# S C A M O R G
#
@ title "RMS fluctuation"
@ xaxis label "Residue"
Expand Down
4 changes: 2 additions & 2 deletions example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_30000.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:48 2025
# This file was created Tue May 5 11:22:05 2026
# Created by:
# :-) GROMACS - gmx rmsf, 2024 (-:
#
Expand All @@ -9,7 +9,7 @@
# gmx_mpi rmsf -f /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/center_traj.xtc -s /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/updated.tpr -o /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_30000.xvg -od /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_30000.xvg -b 20020 -e 30000 -n /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/index.ndx -res
# gmx rmsf is part of G R O M A C S:
#
# Glycine aRginine prOline Methionine Alanine Cystine Serine
# Gromacs Runs On Most of All Computer Systems
#
@ title "RMS fluctuation"
@ xaxis label "Residue"
Expand Down
2 changes: 1 addition & 1 deletion example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_40000.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:49 2025
# This file was created Tue May 5 11:22:06 2026
# Created by:
# :-) GROMACS - gmx rmsf, 2024 (-:
#
Expand Down
2 changes: 1 addition & 1 deletion example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_50000.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:50 2025
# This file was created Tue May 5 11:22:06 2026
# Created by:
# :-) GROMACS - gmx rmsf, 2024 (-:
#
Expand Down
4 changes: 2 additions & 2 deletions example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_10000.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:47 2025
# This file was created Tue May 5 11:22:03 2026
# Created by:
# :-) GROMACS - gmx rmsf, 2024 (-:
#
Expand All @@ -9,7 +9,7 @@
# gmx_mpi rmsf -f /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/center_traj.xtc -s /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/updated.tpr -o /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_10000.xvg -od /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_10000.xvg -b 0 -e 10000 -n /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/index.ndx -res
# gmx rmsf is part of G R O M A C S:
#
# Gnomes, ROck Monsters And Chili Sauce
# Good gRace! Old Maple Actually Chews Slate
#
@ title "RMS Deviation"
@ xaxis label "Residue"
Expand Down
4 changes: 2 additions & 2 deletions example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_20000.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:47 2025
# This file was created Tue May 5 11:22:04 2026
# Created by:
# :-) GROMACS - gmx rmsf, 2024 (-:
#
Expand All @@ -9,7 +9,7 @@
# gmx_mpi rmsf -f /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/center_traj.xtc -s /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/updated.tpr -o /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_20000.xvg -od /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_20000.xvg -b 10020 -e 20000 -n /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/index.ndx -res
# gmx rmsf is part of G R O M A C S:
#
# Gnomes, ROck Monsters And Chili Sauce
# S C A M O R G
#
@ title "RMS Deviation"
@ xaxis label "Residue"
Expand Down
4 changes: 2 additions & 2 deletions example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_30000.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:48 2025
# This file was created Tue May 5 11:22:05 2026
# Created by:
# :-) GROMACS - gmx rmsf, 2024 (-:
#
Expand All @@ -9,7 +9,7 @@
# gmx_mpi rmsf -f /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/center_traj.xtc -s /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/updated.tpr -o /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_30000.xvg -od /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_30000.xvg -b 20020 -e 30000 -n /data/user/pablosanchezb/devel/Mol-Analysis/example/Mol_An/index.ndx -res
# gmx rmsf is part of G R O M A C S:
#
# Glycine aRginine prOline Methionine Alanine Cystine Serine
# Gromacs Runs On Most of All Computer Systems
#
@ title "RMS Deviation"
@ xaxis label "Residue"
Expand Down
2 changes: 1 addition & 1 deletion example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_40000.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:49 2025
# This file was created Tue May 5 11:22:06 2026
# Created by:
# :-) GROMACS - gmx rmsf, 2024 (-:
#
Expand Down
2 changes: 1 addition & 1 deletion example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_50000.xvg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was created Mon May 26 12:01:50 2025
# This file was created Tue May 5 11:22:06 2026
# Created by:
# :-) GROMACS - gmx rmsf, 2024 (-:
#
Expand Down
Binary file modified example/Mol_Analysis/grouped_plot_rmsf10.pdf
Binary file not shown.