diff --git a/Mol_Analysis.py b/Mol_Analysis.py old mode 100755 new mode 100644 index a398fd4..805505f --- a/Mol_Analysis.py +++ b/Mol_Analysis.py @@ -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: @@ -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", @@ -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 @@ -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 @@ -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"]) diff --git a/README b/README index 3c2921a..da20499 100644 --- a/README +++ b/README @@ -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 diff --git a/example/Mol_An/plot.pdf b/example/Mol_An/plot.pdf index 3b4d263..775a1cd 100644 Binary files a/example/Mol_An/plot.pdf and b/example/Mol_An/plot.pdf differ diff --git a/example/Mol_An/r_gyrate.xvg b/example/Mol_An/r_gyrate.xvg index cac2341..aa025fc 100644 --- a/example/Mol_An/r_gyrate.xvg +++ b/example/Mol_An/r_gyrate.xvg @@ -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 (-: # @@ -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)" diff --git a/example/Mol_An/rmsd.xvg b/example/Mol_An/rmsd.xvg index 0fa82a2..dda2cc6 100644 --- a/example/Mol_An/rmsd.xvg +++ b/example/Mol_An/rmsd.xvg @@ -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 (-: # @@ -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)" diff --git a/example/Mol_An/rmsd_Protein.xvg b/example/Mol_An/rmsd_Protein.xvg index e7808b2..a01959e 100644 --- a/example/Mol_An/rmsd_Protein.xvg +++ b/example/Mol_An/rmsd_Protein.xvg @@ -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 (-: # @@ -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)" diff --git a/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_10000.xvg b/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_10000.xvg index 2624fee..a9926a3 100644 --- a/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_10000.xvg +++ b/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_10000.xvg @@ -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 (-: # @@ -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" diff --git a/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_20000.xvg b/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_20000.xvg index cec92f7..2094b5a 100644 --- a/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_20000.xvg +++ b/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_20000.xvg @@ -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 (-: # @@ -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" diff --git a/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_30000.xvg b/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_30000.xvg index 921c7e5..1b17eaf 100644 --- a/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_30000.xvg +++ b/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_30000.xvg @@ -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 (-: # @@ -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" diff --git a/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_40000.xvg b/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_40000.xvg index a9b3cec..fea8d21 100644 --- a/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_40000.xvg +++ b/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_40000.xvg @@ -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 (-: # diff --git a/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_50000.xvg b/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_50000.xvg index 0366b31..4c5a2c6 100644 --- a/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_50000.xvg +++ b/example/Mol_An/rmsf10/rmsf_Protein_n_C-alpha_50000.xvg @@ -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 (-: # diff --git a/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_10000.xvg b/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_10000.xvg index 99c8f3a..bbdd3fc 100644 --- a/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_10000.xvg +++ b/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_10000.xvg @@ -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 (-: # @@ -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" diff --git a/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_20000.xvg b/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_20000.xvg index 132fc91..0f00407 100644 --- a/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_20000.xvg +++ b/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_20000.xvg @@ -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 (-: # @@ -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" diff --git a/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_30000.xvg b/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_30000.xvg index e38d22f..0da5711 100644 --- a/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_30000.xvg +++ b/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_30000.xvg @@ -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 (-: # @@ -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" diff --git a/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_40000.xvg b/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_40000.xvg index fe5cb89..06539e8 100644 --- a/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_40000.xvg +++ b/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_40000.xvg @@ -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 (-: # diff --git a/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_50000.xvg b/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_50000.xvg index 6469149..9b4ae40 100644 --- a/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_50000.xvg +++ b/example/Mol_An/rmsf10/rmsf_od_Protein_n_C-alpha_50000.xvg @@ -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 (-: # diff --git a/example/Mol_Analysis/grouped_plot_rmsf10.pdf b/example/Mol_Analysis/grouped_plot_rmsf10.pdf index 72e86ca..4634082 100644 Binary files a/example/Mol_Analysis/grouped_plot_rmsf10.pdf and b/example/Mol_Analysis/grouped_plot_rmsf10.pdf differ