Skip to content

Commit

Permalink
corrected spelling pertubation to be compatible with PyGromosV1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilia PecoradeBarros committed Nov 9, 2022
1 parent b34b3b9 commit b6a4f28
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ def do(in_simSystem: fM.System, in_imd_path: str,
check_path_dependencies_paths = [slave_script, in_simSystem.top.top_path, out_dir_path,
programm_path, ] # Coord file is used by repex in_imd_path prepared_im
##variable paths
if (not isinstance(in_simSystem.top.pertubation_path,
type(None)) and not in_simSystem.top.pertubation_path == "None"):
check_path_dependencies_paths.append(in_simSystem.top.pertubation_path)
if (not isinstance(in_simSystem.top.perturbation_path,
type(None)) and not in_simSystem.top.perturbation_path == "None"):
check_path_dependencies_paths.append(in_simSystem.top.perturbation_path)
if (not isinstance(in_simSystem.top.disres_path, type(None)) and not in_simSystem.top.disres_path == "None"):
check_path_dependencies_paths.append(in_simSystem.top.disres_path)
if (not isinstance(work_dir, type(None)) and work_dir != "None"):
Expand Down Expand Up @@ -169,7 +169,7 @@ def do(in_simSystem: fM.System, in_imd_path: str,
# formulate commands
md_script_command = prefix_command + " && python " + slave_script + " -imd " + tmp_in_imd + " -top " + in_simSystem.top.top_path + " -disres " + str(
in_simSystem.top.disres_path) + " -perttop " + str(
in_simSystem.top.pertubation_path) + " -coord " + in_simSystem.coordinates + " -nmpi " + str(
in_simSystem.top.perturbation_path) + " -coord " + in_simSystem.coordinates + " -nmpi " + str(
nmpi) + " -nomp " + str(nomp) \
+ " -bin " + programm_path + " -outdir " + tmp_outdir + " -workdir " + str(
work_dir) + add_options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ def do(in_simSystem: Simulation_System.System, in_imd_path: str, out_dir_path: s
# accounting for the different types of restraint used:
if(not simSystem.top.disres_path is None):
check_path_dependencies_paths = [slave_script, simSystem.top.top_path, simSystem.top.disres_path,
simSystem.top.pertubation_path,
simSystem.top.perturbation_path,
out_dir_path, ] # Coord file is used by repex in_imd_path prepared_imd
else:
check_path_dependencies_paths = [slave_script, simSystem.top.top_path, simSystem.top.posres_path, simSystem.top.refpos_path,
simSystem.top.pertubation_path,
simSystem.top.perturbation_path,
out_dir_path, ] # Coord file is used by repex in_imd_path prepared_imd

# optional paths
Expand Down Expand Up @@ -321,7 +321,7 @@ def do(in_simSystem: Simulation_System.System, in_imd_path: str, out_dir_path: s
additional_argparse_argument(name='in_coord_path', type=str, required=True, desc="input coordinate .cn file."),
additional_argparse_argument(name='in_top_path', type=str, required=True, desc="input topology .top file."),
additional_argparse_argument(name='in_perttop_path', type=str, required=True,
desc="input pertubation topology .ptp file."),
desc="input perturbation topology .ptp file."),
additional_argparse_argument(name='in_disres_path', type=str, required=True,
desc="input distance restraint .dat file.")
]
Expand All @@ -340,7 +340,7 @@ def do(in_simSystem: Simulation_System.System, in_imd_path: str, out_dir_path: s
in_disres_path = args.disres
in_perttopo_path = args.perttop

top = fM.Topology(top_path=in_topo_path, disres_path=in_disres_path, pertubation_path=in_perttopo_path)
top = fM.Topology(top_path=in_topo_path, disres_path=in_disres_path, perturbation_path=in_perttopo_path)
system = Simulation_System.System(top=top, coordinates=in_coord_path, name=in_system_name)

# do everything in here :)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def chain_submission(gromosXX_bin_dir: str, in_imd_path: str, simSystem:Simulati
else:
raise ValueError("No restraint file, suuuure?")

md_script_command += "-in_perttop " + simSystem.top.pertubation_path + "\n"
md_script_command += "-in_perttop " + simSystem.top.perturbation_path + "\n"
md_script_command += "-in_coord " + simSystem.coordinates + "\n"
md_script_command += "-nmpi " + str(nmpi) + "\n"
md_script_command += "-gromosXX_bin_dir " + gromosXX_bin_dir + "\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def work(out_dir: str, in_coord: str, in_imd_path: str, in_topo_path: str, in_pe
in_topo_path : str
input topology
in_perttopo_path : str
input pertubation
input perturbation
in_disres_path : str
input disres
nmpi : int, optional
Expand Down Expand Up @@ -103,7 +103,7 @@ def work(out_dir: str, in_coord: str, in_imd_path: str, in_topo_path: str, in_pe
parser.add_argument('-imd', type=str, required=True, help="give .imd file which should be used.")
parser.add_argument('-top', type=str, required=True, help="give input .top - file.")
parser.add_argument('-coord', type=str, required=True, help="give input coordinates .cnf file.")
parser.add_argument('-perttop', type=str, required=True, help="give input pertubation topology.")
parser.add_argument('-perttop', type=str, required=True, help="give input perturbation topology.")
parser.add_argument('-disres', type=str, required=False, default=False, help="give input distance restraints.")

parser.add_argument('-nmpi', type=int, required=False, default=1, help="number of MPI threads for the sopt_job.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def work(out_dir: str, in_coord: str, in_imd_path: str, in_topo_path: str, in_pe
in_topo_path : str
input topology
in_perttopo_path : str
input pertubation topology
input perturbation topology
in_disres_path : str, optional
input distance restraints (default: None)
in_posres_path : str, optional
Expand Down Expand Up @@ -154,7 +154,7 @@ def work(out_dir: str, in_coord: str, in_imd_path: str, in_topo_path: str, in_pe
parser.add_argument('-in_imd', type=str, required=True, help="give .imd file which should be used.")
parser.add_argument('-in_top', type=str, required=True, help="give input .top - file.")
parser.add_argument('-in_coord', type=str, required=True, help="give input coordinates .cnf file.")
parser.add_argument('-in_perttop', type=str, required=True, help="give input pertubation topology.")
parser.add_argument('-in_perttop', type=str, required=True, help="give input perturbation topology.")
parser.add_argument('-in_disres', type=str, required=False, default=None, help="give input distance restraints.")
parser.add_argument('-in_posres', type=str, required=False, default=None, help="give input for position restraints.")
parser.add_argument('-in_refpos', type=str, required=False, default=None, help="give input for reference positoins.")
Expand Down
2 changes: 1 addition & 1 deletion reeds/function_libs/utils/argument_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def execute_module_via_bash(module_doc: str, execute_function: callable,
print("ERROR - could not find Coordinate file: " + str(in_cnf_path))
exit(1)

top = fM.Topology(top_path=in_topo_path, disres_path=in_disres_path, pertubation_path=in_perttopo_path)
top = fM.Topology(top_path=in_topo_path, disres_path=in_disres_path, perturbation_path=in_perttopo_path)
system = fM.System(top=top, coordinates=in_coord_path, name=in_system_name)
args.update({"in_simSystem":system})

Expand Down
2 changes: 1 addition & 1 deletion reeds/modules/do_RE_EDS_eoffEstimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def do(out_root_dir: str, in_simSystem: fM.System, in_ene_ana_lib: str,
print(spacer + "\t\tRE-EDS ENERGY OFFSET ESTIMATION \n" + spacer + "\n")
requiers_gromos_files = [("in_top_path", "input topology .top file."),
("in_coord_path", "input coordinate .cn file."),
("in_perttop_path", "input pertubation topology .ptp file."),
("in_perttop_path", "input perturbation topology .ptp file."),
("in_disres_path", "input distance restraint .dat file.")]

execute_module_via_bash(__doc__, do, requiers_gromos_files)
2 changes: 1 addition & 1 deletion reeds/modules/do_RE_EDS_eoffRebalancing.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,6 @@ def do(out_root_dir: str, in_simSystem: fM.System, in_template_imd: str = None,
print(spacer + "\t\tRE-EDS S-OPTIMIZATION \n" + spacer + "\n")
requiers_gromos_files = [("in_top_path", "input topology .top file."),
("in_coord_path", "input coordinate .cn file."),
("in_perttop_path", "input pertubation topology .ptp file."),
("in_perttop_path", "input perturbation topology .ptp file."),
("in_disres_path", "input distance restraint .dat file.")]
execute_module_via_bash(__doc__, do, requiers_gromos_files)
2 changes: 1 addition & 1 deletion reeds/modules/do_RE_EDS_findLowerBound.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,6 @@ def do(out_root_dir: str, in_simSystem: fM.System, undersampling_occurrence_frac
print(spacer + "\t\tRE-EDS ENERGY OFFSET ESTIMATION \n" + spacer + "\n")
requiers_gromos_files = [("in_top_path", "input topology .top file."),
("in_coord_path", "input coordinate .cn file."),
("in_perttop_path", "input pertubation topology .ptp file."),
("in_perttop_path", "input perturbation topology .ptp file."),
("in_disres_path", "input distance restraint .dat file.")]
execute_module_via_bash(__doc__, do, requiers_gromos_files)
2 changes: 1 addition & 1 deletion reeds/modules/do_RE_EDS_generateOptimizedStates.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,6 @@ def do(out_root_dir: str, in_simSystem: fM.System,
print(spacer + "\t\tRE-EDS ENERGY OFFSET ESTIMATION \n" + spacer + "\n")
requiers_gromos_files = [("in_top_path", "input topology .top file."),
("in_coord_path", "input coordinate .cn file."),
("in_perttop_path", "input pertubation topology .ptp file."),
("in_perttop_path", "input perturbation topology .ptp file."),
("in_disres_path", "input distance restraint .dat file.")]
execute_module_via_bash(__doc__, do, requiers_gromos_files)
2 changes: 1 addition & 1 deletion reeds/modules/do_RE_EDS_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,6 @@ def do(out_root_dir: str, in_simSystem: fM.System, in_template_imd: str,
print(spacer + "\n\t\tRE_EDS PRODUCTION\n" + spacer + "\n")
requiers_gromos_files = [("in_top_path", "input topology .top file."),
("in_coord_path", "input coordinate .cn file."),
("in_perttop_path", "input pertubation topology .ptp file."),
("in_perttop_path", "input perturbation topology .ptp file."),
("in_disres_path", "input distance restraint .dat file.")]
execute_module_via_bash(__doc__, do, requiers_gromos_files)
2 changes: 1 addition & 1 deletion reeds/modules/do_RE_EDS_sOptimisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def do(out_root_dir: str, in_simSystem: fM.System, in_template_imd: str = None,
print(spacer + "\t\tRE-EDS S-OPTIMIZATION \n" + spacer + "\n")
requiers_gromos_files = [("in_top_path", "input topology .top file."),
("in_coord_path", "input coordinate .cn file."),
("in_perttop_path", "input pertubation topology .ptp file."),
("in_perttop_path", "input perturbation topology .ptp file."),
("in_disres_path", "input distance restraint .dat file.")]
execute_module_via_bash(__doc__, do, requiers_gromos_files)

Expand Down

0 comments on commit b6a4f28

Please sign in to comment.