diff --git a/src/multiego/arguments.py b/src/multiego/arguments.py index 6e64b5fa..760ee854 100644 --- a/src/multiego/arguments.py +++ b/src/multiego/arguments.py @@ -120,6 +120,12 @@ "type": str, "help": "Explicit name for the output directory stored in outputs/system", }, + "--regtest": { + "type": bool, + "default": False, + "action": "store_true", + "help": "Use old rules for regtests check.", + }, "--config": { "default": "", "type": str, diff --git a/src/multiego/ensemble.py b/src/multiego/ensemble.py index fdd83458..2f471582 100644 --- a/src/multiego/ensemble.py +++ b/src/multiego/ensemble.py @@ -111,7 +111,8 @@ def initialize_topology(topology, custom_dict, args): + "_" + ensemble_topology_dataframe["resnum"].astype(str) ) - ensemble_topology_dataframe.rename(columns={"epsilon": "c12"}, inplace=True) + # TODO remove, not sure why it was here (it was overwritten immidiately after) + ensemble_topology_dataframe.rename(columns={"epsilon": "to_remove_c12"}, inplace=True) atp_c12_map = {k: v for k, v in zip(type_definitions.gromos_atp["name"], type_definitions.gromos_atp["rc_c12"])} atp_mg_c6_map = {k: v for k, v in zip(type_definitions.gromos_atp["name"], type_definitions.gromos_atp["mg_c6"])} @@ -125,8 +126,8 @@ def initialize_topology(topology, custom_dict, args): ensemble_topology_dataframe["charge"] = 0.0 ensemble_topology_dataframe["rc_c6"] = 0.0 ensemble_topology_dataframe["rc_c12"] = ensemble_topology_dataframe["type"].map(atp_c12_map) - ensemble_topology_dataframe["c6"] = ensemble_topology_dataframe["type"].map(atp_mg_c6_map) - ensemble_topology_dataframe["c12"] = ensemble_topology_dataframe["type"].map(atp_mg_c12_map) + ensemble_topology_dataframe["mg_c6"] = ensemble_topology_dataframe["type"].map(atp_mg_c6_map) + ensemble_topology_dataframe["mg_c12"] = ensemble_topology_dataframe["type"].map(atp_mg_c12_map) ensemble_topology_dataframe["molecule_type"] = ensemble_topology_dataframe["molecule_name"].map(molecule_type_dict) for molecule in ensemble_molecules_idx_sbtype_dictionary.keys(): @@ -349,8 +350,12 @@ def init_meGO_matrices(ensemble, args, custom_dict): for reference in args.reference: # reference_paths: print("\t-", f"Initializing {reference} ensemble data") reference_path = f"{args.root_dir}/inputs/{args.system}/{reference}" + topol_files = [f for f in os.listdir(reference_path) if ".top" in f] # path = f"{args.root_dir}/inputs/{args.system}/{reference_path}" - topology_path = f"{reference_path}/topol.top" + if len(topol_files) > 1: + raise RuntimeError(f"More than 1 topology file found in {reference_path}. Only one should be used") + + topology_path = f"{reference_path}/{topol_files[0]}" if not os.path.isfile(topology_path): raise FileNotFoundError(f"{topology_path} not found.") @@ -362,10 +367,12 @@ def init_meGO_matrices(ensemble, args, custom_dict): lj_data = topology.get_lj_params(topol) lj_pairs = topology.get_lj_pairs(topol) - lj_data_dict = {key: val for key, val in zip(lj_data["ai"], lj_data[["c6", "c12"]].values)} + lj_data_dict = {str(key): val for key, val in zip(lj_data["ai"], lj_data[["c6", "c12"]].values)} lj_pairs_dict = { (ai, aj): (epsilon, sigma) for ai, aj, epsilon, sigma in lj_pairs[["ai", "aj", "epsilon", "sigma"]].to_numpy() } + ensemble["topology_dataframe"]["c6"] = lj_data["c6"].to_numpy() + ensemble["topology_dataframe"]["c12"] = lj_data["c12"].to_numpy() matrix_paths = glob.glob(f"{reference_path}/int??mat_?_?.ndx") matrix_paths = matrix_paths + glob.glob(f"{reference_path}/int??mat_?_?.ndx.gz") @@ -384,28 +391,21 @@ def init_meGO_matrices(ensemble, args, custom_dict): path, ensemble["molecules_idx_sbtype_dictionary"], reference, path.endswith(".h5") ) reference_contact_matrices[name] = reference_contact_matrices[name].add_prefix("rc_") - reference_contact_matrices[name]["c6_i"] = [ - lj_data_dict[x][0] for x in reference_contact_matrices[name]["rc_ai"].str.split(r"_.+_").str[0] - ] - reference_contact_matrices[name]["c6_j"] = [ - lj_data_dict[x][0] for x in reference_contact_matrices[name]["rc_aj"].str.split(r"_.+_").str[0] - ] + reference_contact_matrices[name]["c6_i"] = [lj_data_dict[x][0] for x in reference_contact_matrices[name]["rc_ai"]] + reference_contact_matrices[name]["c6_j"] = [lj_data_dict[x][0] for x in reference_contact_matrices[name]["rc_aj"]] reference_contact_matrices[name]["c6"] = np.sqrt( reference_contact_matrices[name]["c6_i"] * reference_contact_matrices[name]["c6_j"] ) - reference_contact_matrices[name]["c12_i"] = [ - lj_data_dict[x][1] for x in reference_contact_matrices[name]["rc_ai"].str.split(r"_.+_").str[0] - ] - reference_contact_matrices[name]["c12_j"] = [ - lj_data_dict[x][1] for x in reference_contact_matrices[name]["rc_aj"].str.split(r"_.+_").str[0] - ] + reference_contact_matrices[name]["c12_i"] = [lj_data_dict[x][1] for x in reference_contact_matrices[name]["rc_ai"]] + reference_contact_matrices[name]["c12_j"] = [lj_data_dict[x][1] for x in reference_contact_matrices[name]["rc_aj"]] reference_contact_matrices[name]["c12"] = np.sqrt( reference_contact_matrices[name]["c12_i"] * reference_contact_matrices[name]["c12_j"] ) reference_contact_matrices[name]["sigma_prior"] = np.where( reference_contact_matrices[name]["c6"] > 0, (reference_contact_matrices[name]["c12"] / reference_contact_matrices[name]["c6"]) ** (1 / 6), - reference_contact_matrices[name]["rc_cutoff"] / (2.0 ** (1.0 / 6.0)), + # reference_contact_matrices[name]["rc_cutoff"]/ (2.0 ** (1.0 / 6.0)), + reference_contact_matrices[name]["c12"] ** (1 / 12) / (2.0 ** (1.0 / 6.0)), ) reference_contact_matrices[name]["epsilon_prior"] = np.where( reference_contact_matrices[name]["c6"] > 0, @@ -779,7 +779,7 @@ def init_LJ_datasets(meGO_ensemble, matrices, pairs14, exclusion_bonds14, args): ) train_dataset["rep"] = train_dataset["rep"].fillna(pd.Series(pairwise_c12)) train_dataset.loc[oxygen_mask.flatten(), "epsilon_prior"] = 0 - train_dataset.loc[oxygen_mask.flatten(), "sigma_prior"] = train_dataset["cutoff"] + train_dataset.loc[oxygen_mask.flatten(), "sigma_prior"] = train_dataset["rep"] ** (1.0 / 12.0) / (2.0 ** (1.0 / 6.0)) return train_dataset @@ -807,7 +807,7 @@ def generate_rc_LJ(meGO_ensemble): rc_LJ["c12"] = 11.4 * np.sqrt( rc_LJ["ai"].map(meGO_ensemble["sbtype_c12_dict"]) * rc_LJ["aj"].map(meGO_ensemble["sbtype_c12_dict"]) ) - + rc_LJ.sort_values(by=["ai", "aj"], ascending=[True, True], inplace=True) return rc_LJ @@ -961,7 +961,7 @@ def generate_basic_LJ(meGO_ensemble, args, matrices=None): return basic_LJ -def set_sig_epsilon(meGO_LJ, needed_fields): +def set_sig_epsilon(meGO_LJ, needed_fields, parameters): """ Set the epsilon parameter for LJ interactions based on probability and distance. @@ -985,23 +985,37 @@ def set_sig_epsilon(meGO_LJ, needed_fields): consistent with the given probability and distance thresholds, maintaining the accuracy of simulations or calculations. """ # when distance estimates are poor we use the cutoff value - meGO_LJ.loc[(meGO_LJ["probability"] <= meGO_LJ["md_threshold"]), "distance"] = meGO_LJ["sigma_prior"] * 2.0 ** (1.0 / 6.0) - meGO_LJ.loc[(meGO_LJ["rc_probability"] <= meGO_LJ["md_threshold"]), "rc_distance"] = meGO_LJ["sigma_prior"] * 2.0 ** ( - 1.0 / 6.0 - ) + if not parameters.regtest: + meGO_LJ.loc[(meGO_LJ["probability"] <= meGO_LJ["md_threshold"]), "distance"] = meGO_LJ["sigma_prior"] * 2.0 ** ( + 1.0 / 6.0 + ) + meGO_LJ.loc[(meGO_LJ["rc_probability"] <= meGO_LJ["md_threshold"]), "rc_distance"] = meGO_LJ["sigma_prior"] * 2.0 ** ( + 1.0 / 6.0 + ) + else: + meGO_LJ.loc[(meGO_LJ["probability"] <= meGO_LJ["md_threshold"]), "distance"] = ( + meGO_LJ["sigma_prior"] * 2.0 ** (1.0 / 6.0) / meGO_LJ["epsilon_0"] ** (1.0 / 12.0) + ) + meGO_LJ.loc[(meGO_LJ["rc_probability"] <= meGO_LJ["md_threshold"]), "rc_distance"] = ( + meGO_LJ["sigma_prior"] * 2.0 ** (1.0 / 6.0) / meGO_LJ["epsilon_0"] ** (1.0 / 12.0) + ) # by default epsilon is set to the prior epsilon meGO_LJ["epsilon"] = meGO_LJ["epsilon_prior"] - # meGO_LJ.loc[meGO_LJ["epsilon_prior"]>0, "epsilon"] = meGO_LJ["epsilon_prior"] - # #meGO_LJ.loc[meGO_LJ["epsilon_prior"]==0, "epsilon"] = meGO_LJ["rep"] # Epsilon is initialised to a rescaled C12 # This is always correct becasue distance is always well defined by either training data # or using default C12 values # negative epsilon are used to identify non-attractive interactions - meGO_LJ.loc[meGO_LJ["probability"] > meGO_LJ["md_threshold"], "epsilon"] = ( - -meGO_LJ["rep"] * (meGO_LJ["distance"] / meGO_LJ["rc_distance"]) ** 12 - ) + + # # Correct version + if not parameters.regtest: + meGO_LJ.loc[meGO_LJ["probability"] > meGO_LJ["md_threshold"], "epsilon"] = ( + -meGO_LJ["rep"] * (meGO_LJ["distance"] / meGO_LJ["rc_distance"]) ** 12 + ) + # # Needed for regtests + else: + meGO_LJ["epsilon"] = -meGO_LJ["rep"] * (meGO_LJ["distance"] / meGO_LJ["rc_distance"]) ** 12 # Attractive interactions # These are defined only if the training probability is greater than MD_threshold and @@ -1073,7 +1087,12 @@ def set_sig_epsilon(meGO_LJ, needed_fields): ] = -meGO_LJ["rep"] # Sigma is set from the estimated interaction length - meGO_LJ = meGO_LJ.assign(sigma=meGO_LJ["sigma_prior"] * meGO_LJ["distance"] / meGO_LJ["rc_distance"]) + # # Correct version + if not parameters.regtest: + meGO_LJ = meGO_LJ.assign(sigma=meGO_LJ["sigma_prior"] * meGO_LJ["distance"] / meGO_LJ["rc_distance"]) + # # Needed for regtests + else: + meGO_LJ = meGO_LJ.assign(sigma=meGO_LJ["distance"] / 2 ** (1.0 / 6.0)) # for repulsive interaction we reset sigma to its effective value # this because when merging repulsive contacts from different sources what will matters @@ -1239,7 +1258,7 @@ def generate_LJ(meGO_ensemble, train_dataset, basic_LJ, parameters): ] # generate attractive and repulsive interactions - meGO_LJ = set_sig_epsilon(meGO_LJ, needed_fields) + meGO_LJ = set_sig_epsilon(meGO_LJ, needed_fields, parameters) et = time.time() elapsed_time = et - st diff --git a/src/multiego/io.py b/src/multiego/io.py index 72e4f035..009defb5 100644 --- a/src/multiego/io.py +++ b/src/multiego/io.py @@ -363,6 +363,9 @@ def write_nonbonded(topology_dataframe, meGO_LJ, parameters, output_folder): if parameters.egos == "rc": atomtypes = topology_dataframe[["sb_type", "atomic_number", "mass", "charge", "ptype", "rc_c6", "rc_c12"]].copy() atomtypes.rename(columns={"rc_c6": "c6", "rc_c12": "c12"}, inplace=True) + elif parameters.egos == "mg": + atomtypes = topology_dataframe[["sb_type", "atomic_number", "mass", "charge", "ptype", "rc_c6", "rc_c12"]].copy() + atomtypes.rename(columns={"mg_c6": "c6", "mg_c12": "c12"}, inplace=True) else: atomtypes = topology_dataframe[["sb_type", "atomic_number", "mass", "charge", "ptype", "c6", "c12"]].copy() diff --git a/src/multiego/topology.py b/src/multiego/topology.py index abab1aa6..87b1c5ab 100644 --- a/src/multiego/topology.py +++ b/src/multiego/topology.py @@ -334,7 +334,7 @@ def get_lj_params(topology): lj_params, pd.DataFrame( { - "ai": atom.name, + "ai": atom.atom_type, "c6": c6, "c12": c12, }, @@ -342,7 +342,6 @@ def get_lj_params(topology): ), ] ) - lj_params.drop_duplicates(inplace=True) lj_params = lj_params.reset_index() return lj_params diff --git a/test/test_cases.txt b/test/test_cases.txt index 94f7677c..b3077ec7 100644 --- a/test/test_cases.txt +++ b/test/test_cases.txt @@ -1,6 +1,6 @@ ---system gpref --egos rc --no_header --explicit_name case ---system gpref --egos production --epsilon 0.235 --train md_ensemble --single_molecule --no_header --explicit_name case ---config TEST_ROOT/test_inputs/abetaref/config.yml --explicit_name case # --system abetaref --egos production ---config TEST_ROOT/test_inputs/ttrref/config.yml --explicit_name case # --system ttrref --egos production ---config TEST_ROOT/test_inputs/lyso-bnz_ref/config_1.yml --explicit_name case # --system lyso-bnz_ref --egos production ---config TEST_ROOT/test_inputs/lyso-bnz_ref/config_2.yml --explicit_name case # --system lyso-bnz_ref --egos production +--system gpref --egos rc --no_header --regtest --explicit_name case +--system gpref --egos production --epsilon 0.235 --train md_ensemble --single_molecule --no_header --regtest --explicit_name case +--config TEST_ROOT/test_inputs/abetaref/config.yml --regtest --explicit_name case # --system abetaref --egos production +--config TEST_ROOT/test_inputs/ttrref/config.yml --regtest --explicit_name case # --system ttrref --egos production +--config TEST_ROOT/test_inputs/lyso-bnz_ref/config_1.yml --regtest --explicit_name case # --system lyso-bnz_ref --egos production +--config TEST_ROOT/test_inputs/lyso-bnz_ref/config_2.yml --regtest --explicit_name case # --system lyso-bnz_ref --egos production diff --git a/test/test_inputs/ttrref/reference/topol.top b/test/test_inputs/ttrref/reference/topol.top deleted file mode 100644 index 3dfcffce..00000000 --- a/test/test_inputs/ttrref/reference/topol.top +++ /dev/null @@ -1,603 +0,0 @@ -; -; File 'topol.top' was generated -; By user: carlo (501) -; On host: CarloMB -; At date: Wed Dec 14 20:59:13 2022 -; -; This is a standalone topology file -; -; Created by: -; :-) GROMACS - gmx pdb2gmx, 2021.6-plumed-2.9.0-dev (-: -; -; Executable: /Users/carlo/Codes/gromacs-2021.6/exe/bin/gmx_mpi -; Data prefix: /Users/carlo/Codes/gromacs-2021.6/exe -; Working dir: /Users/carlo/Projects/2-Emanuele/multi-eGO/inputs/TTR2md/reference -; Command line: -; gmx_mpi pdb2gmx -f confout -; Force field was read from current directory or a relative path - path added. -; - -; Include forcefield parameters -#include "../../../multi-ego-basic.ff/forcefield.itp" - -[ moleculetype ] -; Name nrexcl -TTR 3 - -[ atoms ] -; nr type resnr residue atom cgnr charge mass typeB chargeB massB -; residue 1 TYR rtp TYR q +0.4 - 1 NL 1 TYR N 1 1 17.0067 - 2 CH1 1 TYR CA 1 0 13.019 - 3 CH2 1 TYR CB 1 0 14.027 - 4 C 1 TYR CG 1 0 12.011 - 5 C 1 TYR CD1 1 0 12.011 - 6 C 1 TYR CD2 1 0 12.011 - 7 C 1 TYR CE1 1 0 12.011 - 8 C 1 TYR CE2 1 0 12.011 - 9 C 1 TYR CZ 1 0 12.011 - 10 OA 1 TYR OH 1 -0.611 16.9994 - 11 C 1 TYR C 1 0 12.011 - 12 O 1 TYR O 1 0 15.9994 ; qtot 0.389 -; residue 2 THR rtp THR q -0.7 - 13 N 2 THR N 2 0 15.0067 - 14 CH1 2 THR CA 2 0 13.019 - 15 CH1 2 THR CB 2 0 13.019 - 16 OA 2 THR OG1 2 -0.674 16.9994 - 17 CH3 2 THR CG2 2 0 15.035 - 18 C 2 THR C 2 0 12.011 - 19 O 2 THR O 2 0 15.9994 ; qtot -0.285 -; residue 3 ILE rtp ILE q 0.0 - 20 N 3 ILE N 3 0 15.0067 - 21 CH1 3 ILE CA 3 0 13.019 - 22 CH1 3 ILE CB 3 0 13.019 - 23 CH2 3 ILE CG1 3 0 14.027 - 24 CH3 3 ILE CG2 3 0 15.035 - 25 CH3 3 ILE CD 3 0 15.035 - 26 C 3 ILE C 3 0 12.011 - 27 O 3 ILE O 3 0 15.9994 ; qtot -0.285 -; residue 4 ALA rtp ALA q 0.0 - 28 N 4 ALA N 4 0 15.0067 - 29 CH1 4 ALA CA 4 0 13.019 - 30 CH3 4 ALA CB 4 0 15.035 - 31 C 4 ALA C 4 0 12.011 - 32 O 4 ALA O 4 0 15.9994 ; qtot -0.285 -; residue 5 ALA rtp ALA q 0.0 - 33 N 5 ALA N 5 0 15.0067 - 34 CH1 5 ALA CA 5 0 13.019 - 35 CH3 5 ALA CB 5 0 15.035 - 36 C 5 ALA C 5 0 12.011 - 37 O 5 ALA O 5 0 15.9994 ; qtot -0.285 -; residue 6 LEU rtp LEU q 0.0 - 38 N 6 LEU N 6 0 15.0067 - 39 CH1 6 LEU CA 6 0 13.019 - 40 CH2 6 LEU CB 6 0 14.027 - 41 CH1 6 LEU CG 6 0 13.019 - 42 CH3 6 LEU CD1 6 0 15.035 - 43 CH3 6 LEU CD2 6 0 15.035 - 44 C 6 LEU C 6 0 12.011 - 45 O 6 LEU O 6 0 15.9994 ; qtot -0.285 -; residue 7 LEU rtp LEU q 0.0 - 46 N 7 LEU N 7 0 15.0067 - 47 CH1 7 LEU CA 7 0 13.019 - 48 CH2 7 LEU CB 7 0 14.027 - 49 CH1 7 LEU CG 7 0 13.019 - 50 CH3 7 LEU CD1 7 0 15.035 - 51 CH3 7 LEU CD2 7 0 15.035 - 52 C 7 LEU C 7 0 12.011 - 53 O 7 LEU O 7 0 15.9994 ; qtot -0.285 -; residue 8 SER rtp SER q -0.7 - 54 N 8 SER N 8 0 15.0067 - 55 CH1 8 SER CA 8 0 13.019 - 56 CH2 8 SER CB 8 0 14.027 - 57 OA 8 SER OG 8 -0.674 16.9994 - 58 C 8 SER C 8 0 12.011 - 59 O 8 SER O 8 0 15.9994 ; qtot -0.959 -; residue 9 PRO rtp PRO q 0.0 - 60 N 9 PRO N 9 0 15.0067 - 61 CH1 9 PRO CA 9 0 13.019 - 62 CH2r 9 PRO CB 9 0 14.027 - 63 CH2r 9 PRO CG 9 0 14.027 - 64 CH2r 9 PRO CD 9 0 14.027 - 65 C 9 PRO C 9 0 12.011 - 66 O 9 PRO O 9 0 15.9994 ; qtot -0.959 -; residue 10 TYR rtp TYR q -0.6 - 67 N 10 TYR N 10 0 15.0067 - 68 CH1 10 TYR CA 10 0 13.019 - 69 CH2 10 TYR CB 10 0 14.027 - 70 C 10 TYR CG 10 0 12.011 - 71 C 10 TYR CD1 10 0 12.011 - 72 C 10 TYR CD2 10 0 12.011 - 73 C 10 TYR CE1 10 0 12.011 - 74 C 10 TYR CE2 10 0 12.011 - 75 C 10 TYR CZ 10 0 12.011 - 76 OA 10 TYR OH 10 -0.611 16.9994 - 77 C 10 TYR C 10 0 12.011 - 78 O 10 TYR O 10 0 15.9994 ; qtot -1.57 -; residue 11 SER rtp SER q -1.9 - 79 N 11 SER N 11 0 15.0067 - 80 CH1 11 SER CA 11 0 13.019 - 81 CH2 11 SER CB 11 0 14.027 - 82 OA 11 SER OG 11 -0.674 16.9994 - 83 C 11 SER C 11 0 12.011 - 84 OM 11 SER O1 11 -0.635 15.9994 - 85 OM 11 SER O2 11 -0.635 15.9994 ; qtot -3.514 - -[ bonds ] -; ai aj funct c0 c1 c2 c3 - 1 2 1 gb_21 - 2 3 1 gb_27 - 2 11 1 gb_27 - 3 4 1 gb_27 - 4 5 1 gb_16 - 4 6 1 gb_16 - 5 7 1 gb_16 - 6 8 1 gb_16 - 7 9 1 gb_16 - 8 9 1 gb_16 - 9 10 1 gb_13 - 11 12 1 gb_5 - 11 13 1 gb_10 - 13 14 1 gb_21 - 14 15 1 gb_27 - 14 18 1 gb_27 - 15 16 1 gb_18 - 15 17 1 gb_27 - 18 19 1 gb_5 - 18 20 1 gb_10 - 20 21 1 gb_21 - 21 22 1 gb_27 - 21 26 1 gb_27 - 22 23 1 gb_27 - 22 24 1 gb_27 - 23 25 1 gb_27 - 26 27 1 gb_5 - 26 28 1 gb_10 - 28 29 1 gb_21 - 29 30 1 gb_27 - 29 31 1 gb_27 - 31 32 1 gb_5 - 31 33 1 gb_10 - 33 34 1 gb_21 - 34 35 1 gb_27 - 34 36 1 gb_27 - 36 37 1 gb_5 - 36 38 1 gb_10 - 38 39 1 gb_21 - 39 40 1 gb_27 - 39 44 1 gb_27 - 40 41 1 gb_27 - 41 42 1 gb_27 - 41 43 1 gb_27 - 44 45 1 gb_5 - 44 46 1 gb_10 - 46 47 1 gb_21 - 47 48 1 gb_27 - 47 52 1 gb_27 - 48 49 1 gb_27 - 49 50 1 gb_27 - 49 51 1 gb_27 - 52 53 1 gb_5 - 52 54 1 gb_10 - 54 55 1 gb_21 - 55 56 1 gb_27 - 55 58 1 gb_27 - 56 57 1 gb_18 - 58 59 1 gb_5 - 58 60 1 gb_10 - 60 61 1 gb_21 - 60 64 1 gb_21 - 61 62 1 gb_27 - 61 65 1 gb_27 - 62 63 1 gb_27 - 63 64 1 gb_27 - 65 66 1 gb_5 - 65 67 1 gb_10 - 67 68 1 gb_21 - 68 69 1 gb_27 - 68 77 1 gb_27 - 69 70 1 gb_27 - 70 71 1 gb_16 - 70 72 1 gb_16 - 71 73 1 gb_16 - 72 74 1 gb_16 - 73 75 1 gb_16 - 74 75 1 gb_16 - 75 76 1 gb_13 - 77 78 1 gb_5 - 77 79 1 gb_10 - 79 80 1 gb_21 - 80 81 1 gb_27 - 80 83 1 gb_27 - 81 82 1 gb_18 - 83 84 1 gb_6 - 83 85 1 gb_6 - -[ pairs ] -; ai aj funct c0 c1 c2 c3 - 1 4 1 - 1 12 1 - 1 13 1 - 2 5 1 - 2 6 1 - 2 14 1 - 3 7 1 - 3 8 1 - 3 12 1 - 3 13 1 - 4 9 1 - 4 11 1 - 5 8 1 - 5 10 1 - 6 7 1 - 6 10 1 - 11 15 1 - 11 18 1 - 12 14 1 - 13 16 1 - 13 17 1 - 13 19 1 - 13 20 1 - 14 21 1 - 15 19 1 - 15 20 1 - 16 18 1 - 17 18 1 - 18 22 1 - 18 26 1 - 19 21 1 - 20 23 1 - 20 24 1 - 20 27 1 - 20 28 1 - 21 25 1 - 21 29 1 - 22 27 1 - 22 28 1 - 23 26 1 - 24 25 1 - 24 26 1 - 26 30 1 - 26 31 1 - 27 29 1 - 28 32 1 - 28 33 1 - 29 34 1 - 30 32 1 - 30 33 1 - 31 35 1 - 31 36 1 - 32 34 1 - 33 37 1 - 33 38 1 - 34 39 1 - 35 37 1 - 35 38 1 - 36 40 1 - 36 44 1 - 37 39 1 - 38 41 1 - 38 45 1 - 38 46 1 - 39 42 1 - 39 43 1 - 39 47 1 - 40 45 1 - 40 46 1 - 41 44 1 - 44 48 1 - 44 52 1 - 45 47 1 - 46 49 1 - 46 53 1 - 46 54 1 - 47 50 1 - 47 51 1 - 47 55 1 - 48 53 1 - 48 54 1 - 49 52 1 - 52 56 1 - 52 58 1 - 53 55 1 - 54 57 1 - 54 59 1 - 54 60 1 - 55 61 1 - 55 64 1 - 56 59 1 - 56 60 1 - 57 58 1 - 58 62 1 - 58 63 1 - 58 65 1 - 59 61 1 - 59 64 1 - 60 66 1 - 60 67 1 - 61 68 1 - 62 66 1 - 62 67 1 - 63 65 1 - 64 65 1 - 65 69 1 - 65 77 1 - 66 68 1 - 67 70 1 - 67 78 1 - 67 79 1 - 68 71 1 - 68 72 1 - 68 80 1 - 69 73 1 - 69 74 1 - 69 78 1 - 69 79 1 - 70 75 1 - 70 77 1 - 71 74 1 - 71 76 1 - 72 73 1 - 72 76 1 - 77 81 1 - 77 83 1 - 78 80 1 - 79 82 1 - 79 84 1 - 79 85 1 - 81 84 1 - 81 85 1 - 82 83 1 - -[ angles ] -; ai aj ak funct c0 c1 c2 c3 - 1 2 3 1 ga_13 - 1 2 11 1 ga_13 - 3 2 11 1 ga_13 - 2 3 4 1 ga_15 - 3 4 5 1 ga_27 - 3 4 6 1 ga_27 - 5 4 6 1 ga_27 - 4 5 7 1 ga_27 - 4 6 8 1 ga_27 - 5 7 9 1 ga_27 - 6 8 9 1 ga_27 - 7 9 8 1 ga_27 - 7 9 10 1 ga_27 - 8 9 10 1 ga_27 - 2 11 12 1 ga_30 - 2 11 13 1 ga_19 - 12 11 13 1 ga_33 - 11 13 14 1 ga_31 - 13 14 15 1 ga_13 - 13 14 18 1 ga_13 - 15 14 18 1 ga_13 - 14 15 16 1 ga_13 - 14 15 17 1 ga_15 - 16 15 17 1 ga_15 - 14 18 19 1 ga_30 - 14 18 20 1 ga_19 - 19 18 20 1 ga_33 - 18 20 21 1 ga_31 - 20 21 22 1 ga_13 - 20 21 26 1 ga_13 - 22 21 26 1 ga_13 - 21 22 23 1 ga_15 - 21 22 24 1 ga_15 - 23 22 24 1 ga_15 - 22 23 25 1 ga_15 - 21 26 27 1 ga_30 - 21 26 28 1 ga_19 - 27 26 28 1 ga_33 - 26 28 29 1 ga_31 - 28 29 30 1 ga_13 - 28 29 31 1 ga_13 - 30 29 31 1 ga_13 - 29 31 32 1 ga_30 - 29 31 33 1 ga_19 - 32 31 33 1 ga_33 - 31 33 34 1 ga_31 - 33 34 35 1 ga_13 - 33 34 36 1 ga_13 - 35 34 36 1 ga_13 - 34 36 37 1 ga_30 - 34 36 38 1 ga_19 - 37 36 38 1 ga_33 - 36 38 39 1 ga_31 - 38 39 40 1 ga_13 - 38 39 44 1 ga_13 - 40 39 44 1 ga_13 - 39 40 41 1 ga_15 - 40 41 42 1 ga_15 - 40 41 43 1 ga_15 - 42 41 43 1 ga_15 - 39 44 45 1 ga_30 - 39 44 46 1 ga_19 - 45 44 46 1 ga_33 - 44 46 47 1 ga_31 - 46 47 48 1 ga_13 - 46 47 52 1 ga_13 - 48 47 52 1 ga_13 - 47 48 49 1 ga_15 - 48 49 50 1 ga_15 - 48 49 51 1 ga_15 - 50 49 51 1 ga_15 - 47 52 53 1 ga_30 - 47 52 54 1 ga_19 - 53 52 54 1 ga_33 - 52 54 55 1 ga_31 - 54 55 56 1 ga_13 - 54 55 58 1 ga_13 - 56 55 58 1 ga_13 - 55 56 57 1 ga_13 - 55 58 59 1 ga_30 - 55 58 60 1 ga_19 - 59 58 60 1 ga_33 - 58 60 61 1 ga_31 - 58 60 64 1 ga_31 - 61 60 64 1 ga_21 - 60 61 62 1 ga_13 - 60 61 65 1 ga_13 - 62 61 65 1 ga_13 - 61 62 63 1 ga_13 - 62 63 64 1 ga_13 - 60 64 63 1 ga_13 - 61 65 66 1 ga_30 - 61 65 67 1 ga_19 - 66 65 67 1 ga_33 - 65 67 68 1 ga_31 - 67 68 69 1 ga_13 - 67 68 77 1 ga_13 - 69 68 77 1 ga_13 - 68 69 70 1 ga_15 - 69 70 71 1 ga_27 - 69 70 72 1 ga_27 - 71 70 72 1 ga_27 - 70 71 73 1 ga_27 - 70 72 74 1 ga_27 - 71 73 75 1 ga_27 - 72 74 75 1 ga_27 - 73 75 74 1 ga_27 - 73 75 76 1 ga_27 - 74 75 76 1 ga_27 - 68 77 78 1 ga_30 - 68 77 79 1 ga_19 - 78 77 79 1 ga_33 - 77 79 80 1 ga_31 - 79 80 81 1 ga_13 - 79 80 83 1 ga_13 - 81 80 83 1 ga_13 - 80 81 82 1 ga_13 - 80 83 84 1 ga_22 - 80 83 85 1 ga_22 - 84 83 85 1 ga_38 - -[ dihedrals ] -; ai aj ak al funct c0 c1 c2 c3 c4 c5 - 1 2 3 4 1 gd_34 - 1 2 11 13 1 gd_42b - 1 2 11 13 1 gd_45b - 2 3 4 5 1 gd_40 - 2 11 13 14 1 gd_14 - 11 13 14 18 1 gd_43 - 11 13 14 18 1 gd_44 - 13 14 15 16 1 gd_34 - 13 14 18 20 1 gd_42 - 13 14 18 20 1 gd_45 - 14 18 20 21 1 gd_14 - 18 20 21 26 1 gd_43b - 18 20 21 26 1 gd_44b - 20 21 22 23 1 gd_34 - 20 21 26 28 1 gd_42b - 20 21 26 28 1 gd_45b - 21 22 23 25 1 gd_34 - 21 26 28 29 1 gd_14 - 26 28 29 31 1 gd_43 - 26 28 29 31 1 gd_44 - 28 29 31 33 1 gd_42 - 28 29 31 33 1 gd_45 - 29 31 33 34 1 gd_14 - 31 33 34 36 1 gd_43 - 31 33 34 36 1 gd_44 - 33 34 36 38 1 gd_42 - 33 34 36 38 1 gd_45 - 34 36 38 39 1 gd_14 - 36 38 39 44 1 gd_43b - 36 38 39 44 1 gd_44b - 38 39 40 41 1 gd_34 - 38 39 44 46 1 gd_42b - 38 39 44 46 1 gd_45b - 39 40 41 42 1 gd_34 - 39 44 46 47 1 gd_14 - 44 46 47 52 1 gd_43b - 44 46 47 52 1 gd_44b - 46 47 48 49 1 gd_34 - 46 47 52 54 1 gd_42b - 46 47 52 54 1 gd_45b - 47 48 49 50 1 gd_34 - 47 52 54 55 1 gd_14 - 52 54 55 58 1 gd_43 - 52 54 55 58 1 gd_44 - 54 55 56 57 1 gd_34 - 54 55 58 60 1 gd_42 - 54 55 58 60 1 gd_45 - 55 58 60 61 1 gd_56 - 58 60 61 65 1 gd_53 - 61 60 64 63 1 gd_39 - 60 61 62 63 1 gd_34 - 60 61 65 67 1 gd_52 - 60 61 65 67 1 gd_55 - 61 62 63 64 1 gd_34 - 62 63 64 60 1 gd_34 - 61 65 67 68 1 gd_14 - 65 67 68 77 1 gd_43b - 65 67 68 77 1 gd_44b - 67 68 69 70 1 gd_34 - 67 68 77 79 1 gd_42b - 67 68 77 79 1 gd_45b - 68 69 70 71 1 gd_40 - 68 77 79 80 1 gd_14 - 77 79 80 83 1 gd_43 - 77 79 80 83 1 gd_44 - 79 80 81 82 1 gd_34 - 79 80 83 85 1 gd_42 - 79 80 83 85 1 gd_45 - -[ dihedrals ] -; ai aj ak al funct c0 c1 c2 c3 - 2 1 11 3 2 gi_2 - 3 6 5 4 2 gi_1 - 4 5 7 9 2 gi_1 - 4 6 8 9 2 gi_1 - 5 4 6 8 2 gi_1 - 5 7 9 8 2 gi_1 - 6 4 5 7 2 gi_1 - 6 8 9 7 2 gi_1 - 9 7 8 10 2 gi_1 - 11 2 13 12 2 gi_1 - 14 13 18 15 2 gi_2 - 14 17 16 15 2 gi_2 - 18 14 20 19 2 gi_1 - 21 20 26 22 2 gi_2 - 21 24 23 22 2 gi_2 - 26 21 28 27 2 gi_1 - 29 28 31 30 2 gi_2 - 31 29 33 32 2 gi_1 - 34 33 36 35 2 gi_2 - 36 34 38 37 2 gi_1 - 39 38 44 40 2 gi_2 - 40 42 43 41 2 gi_2 - 44 39 46 45 2 gi_1 - 47 46 52 48 2 gi_2 - 48 50 51 49 2 gi_2 - 52 47 54 53 2 gi_1 - 55 54 58 56 2 gi_2 - 58 55 60 59 2 gi_1 - 60 58 61 64 2 gi_1 - 61 60 65 62 2 gi_2 - 65 61 67 66 2 gi_1 - 68 67 77 69 2 gi_2 - 69 72 71 70 2 gi_1 - 70 71 73 75 2 gi_1 - 70 72 74 75 2 gi_1 - 71 70 72 74 2 gi_1 - 71 73 75 74 2 gi_1 - 72 70 71 73 2 gi_1 - 72 74 75 73 2 gi_1 - 75 73 74 76 2 gi_1 - 77 68 79 78 2 gi_1 - 80 79 83 81 2 gi_2 - 83 80 85 84 2 gi_1 - -; Include Position restraint file -#ifdef POSRES -#include "posre.itp" -#endif - -[ system ] -; Name -TTR - -[ molecules ] -; Compound #mols -TTR 1