From badf6b3c84b43a1ed9385aef4cca166008fad281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20H=C3=A9nin?= Date: Wed, 21 Feb 2024 19:28:33 +0100 Subject: [PATCH 1/7] Construct alpha coordinates from index groups --- src/colvar.cpp | 3 +- src/colvaratoms.cpp | 7 ++- src/colvaratoms.h | 2 +- src/colvarcomp_protein.cpp | 108 ++++++++++++++++++++++++++----------- 4 files changed, 86 insertions(+), 34 deletions(-) diff --git a/src/colvar.cpp b/src/colvar.cpp index bfbba89cb..2ace3142b 100644 --- a/src/colvar.cpp +++ b/src/colvar.cpp @@ -858,8 +858,9 @@ void colvar::define_component_types() add_component_type("dihedral", "dihedral"); add_component_type("hydrogen bond", "hBond"); + add_component_type("alpha helix", "alpha"); + if (proxy->check_atom_name_selections_available() == COLVARS_OK) { - add_component_type("alpha helix", "alpha"); add_component_type("dihedral principal component", "dihedralPC"); } diff --git a/src/colvaratoms.cpp b/src/colvaratoms.cpp index 745cb0328..be183dc53 100644 --- a/src/colvaratoms.cpp +++ b/src/colvaratoms.cpp @@ -673,7 +673,7 @@ int cvm::atom_group::add_atom_numbers(std::string const &numbers_conf) } -int cvm::atom_group::add_index_group(std::string const &index_group_name) +int cvm::atom_group::add_index_group(std::string const &index_group_name, bool silent) { std::vector const &index_group_names = cvm::main()->index_group_names; @@ -687,7 +687,10 @@ int cvm::atom_group::add_index_group(std::string const &index_group_name) } if (i_group >= index_group_names.size()) { - return cvm::error("Error: could not find index group "+ + if (silent) + return COLVARS_INPUT_ERROR; + else + return cvm::error("Error: could not find index group "+ index_group_name+" among those already provided.\n", COLVARS_INPUT_ERROR); } diff --git a/src/colvaratoms.h b/src/colvaratoms.h index 1493046e0..25b0d34ee 100644 --- a/src/colvaratoms.h +++ b/src/colvaratoms.h @@ -194,7 +194,7 @@ class colvarmodule::atom_group int add_atom_numbers(std::string const &numbers_conf); int add_atoms_of_group(atom_group const * ag); - int add_index_group(std::string const &index_group_name); + int add_index_group(std::string const &index_group_name, bool silent = false); int add_atom_numbers_range(std::string const &range_conf); int add_atom_name_residue_range(std::string const &psf_segid, std::string const &range_conf); diff --git a/src/colvarcomp_protein.cpp b/src/colvarcomp_protein.cpp index f78209514..1c81bebb4 100644 --- a/src/colvarcomp_protein.cpp +++ b/src/colvarcomp_protein.cpp @@ -28,34 +28,55 @@ colvar::alpha_angles::alpha_angles() int colvar::alpha_angles::init(std::string const &conf) { int error_code = cvc::init(conf); + if (error_code != COLVARS_OK) return error_code; std::string segment_id; - get_keyval(conf, "psfSegID", segment_id, std::string("MAIN")); - std::vector residues; - { - std::string residues_conf = ""; - key_lookup(conf, "residueRange", &residues_conf); + + bool b_use_index_groups = false; + cvm::atom_group group_CA, group_N, group_O; + + std::string residues_conf = ""; + + // residueRange is mandatory for the topology-based case + if (key_lookup(conf, "residueRange", &residues_conf)) { if (residues_conf.size()) { std::istringstream is(residues_conf); int initial, final; char dash; if ( (is >> initial) && (initial > 0) && - (is >> dash) && (dash == '-') && - (is >> final) && (final > 0) ) { + (is >> dash) && (dash == '-') && + (is >> final) && (final > 0) ) { for (int rnum = initial; rnum <= final; rnum++) { residues.push_back(rnum); } } } else { - error_code |= - cvm::error("Error: no residues defined in \"residueRange\".\n", COLVARS_INPUT_ERROR); + return cvm::error("Error: no residues defined in \"residueRange\".\n", COLVARS_INPUT_ERROR); } - } - if (residues.size() < 5) { - error_code |= cvm::error("Error: not enough residues defined in \"residueRange\".\n", - COLVARS_INPUT_ERROR); + if (residues.size() < 5) { + return cvm::error("Error: not enough residues defined in \"residueRange\".\n", COLVARS_INPUT_ERROR); + } + get_keyval(conf, "psfSegID", segment_id, std::string("MAIN")); + + } else { + b_use_index_groups = true; + // Not all groups are mandatory, parse silently + group_CA.add_index_group("alphaCA", true); + group_N.add_index_group("alphaN", true); + group_O.add_index_group("alphaO", true); + int na = group_CA.size(); + int nn = group_N.size(); + int no = group_O.size(); + if ((nn != 0 || no != 0) && (nn != no)) { + return cvm::error("Error: If either is provided, atom groups alphaN and alphaO must have the same number of atoms.", + COLVARS_INPUT_ERROR); + } + if (nn != 0 && na != 0 && nn != na) { + return cvm::error("Error: If both are provided, atom groups alphaN and alphaCA must have the same number of atoms.", + COLVARS_INPUT_ERROR); + } } std::string const &sid = segment_id; @@ -64,8 +85,7 @@ int colvar::alpha_angles::init(std::string const &conf) get_keyval(conf, "hBondCoeff", hb_coeff, hb_coeff); if ((hb_coeff < 0.0) || (hb_coeff > 1.0)) { - error_code |= - cvm::error("Error: hBondCoeff must be defined between 0 and 1.\n", COLVARS_INPUT_ERROR); + return cvm::error("Error: hBondCoeff must be defined between 0 and 1.\n", COLVARS_INPUT_ERROR); } @@ -73,14 +93,29 @@ int colvar::alpha_angles::init(std::string const &conf) get_keyval(conf, "angleTol", theta_tol, theta_tol); if (hb_coeff < 1.0) { - - for (size_t i = 0; i < residues.size()-2; i++) { - theta.push_back(new colvar::angle(cvm::atom(r[i ], "CA", sid), - cvm::atom(r[i+1], "CA", sid), - cvm::atom(r[i+2], "CA", sid))); - register_atom_group(theta.back()->atom_groups[0]); - register_atom_group(theta.back()->atom_groups[1]); - register_atom_group(theta.back()->atom_groups[2]); + if (b_use_index_groups) { + if (group_CA.size() < 5) { + return cvm::error("Not enough atoms (" + cvm::to_str(group_CA.size()) + ") in index group \"alphaCA\"", + COLVARS_INPUT_ERROR); + } + for (size_t i = 0; i < group_CA.size()-2; i++) { + // Note: the angle constructor constructs copies of the atom objects + theta.push_back(new colvar::angle(group_CA[i], + group_CA[i+1], + group_CA[i+2])); + register_atom_group(theta.back()->atom_groups[0]); + register_atom_group(theta.back()->atom_groups[1]); + register_atom_group(theta.back()->atom_groups[2]); + } + } else { + for (size_t i = 0; i < residues.size()-2; i++) { + theta.push_back(new colvar::angle(cvm::atom(r[i ], "CA", sid), + cvm::atom(r[i+1], "CA", sid), + cvm::atom(r[i+2], "CA", sid))); + register_atom_group(theta.back()->atom_groups[0]); + register_atom_group(theta.back()->atom_groups[1]); + register_atom_group(theta.back()->atom_groups[2]); + } } } else { @@ -93,14 +128,27 @@ int colvar::alpha_angles::init(std::string const &conf) get_keyval(conf, "hBondExpDenom", ed, ed); if (hb_coeff > 0.0) { - - for (size_t i = 0; i < residues.size()-4; i++) { - hb.push_back(new colvar::h_bond(cvm::atom(r[i ], "O", sid), - cvm::atom(r[i+4], "N", sid), - r0, en, ed)); - register_atom_group(hb.back()->atom_groups[0]); + if (b_use_index_groups) { + if (group_N.size() < 5) { + return cvm::error("Not enough atoms (" + cvm::to_str(group_N.size()) + ") in index group \"alphaN\"", + COLVARS_INPUT_ERROR); + } + for (size_t i = 0; i < group_N.size()-4; i++) { + // Note: we need to call the atom copy constructor here because + // the h_bond constructor does not make copies of the provided atoms + hb.push_back(new colvar::h_bond(cvm::atom(group_O[i]), + cvm::atom(group_N[i+4]), + r0, en, ed)); + register_atom_group(hb.back()->atom_groups[0]); + } + } else { + for (size_t i = 0; i < residues.size()-4; i++) { + hb.push_back(new colvar::h_bond(cvm::atom(r[i ], "O", sid), + cvm::atom(r[i+4], "N", sid), + r0, en, ed)); + register_atom_group(hb.back()->atom_groups[0]); + } } - } else { cvm::log("The hBondCoeff specified will disable the hydrogen bond terms.\n"); } From f30f23a284e549cce52d93cb4f1cd456542a0aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20H=C3=A9nin?= Date: Wed, 27 Mar 2024 11:04:35 +0100 Subject: [PATCH 2/7] User-defined index group names, add dihedralPC --- src/colvarcomp_protein.cpp | 109 ++++++++++++++++++++++++------------- 1 file changed, 72 insertions(+), 37 deletions(-) diff --git a/src/colvarcomp_protein.cpp b/src/colvarcomp_protein.cpp index 1c81bebb4..26623bbc7 100644 --- a/src/colvarcomp_protein.cpp +++ b/src/colvarcomp_protein.cpp @@ -37,6 +37,7 @@ int colvar::alpha_angles::init(std::string const &conf) cvm::atom_group group_CA, group_N, group_O; std::string residues_conf = ""; + std::string prefix; // residueRange is mandatory for the topology-based case if (key_lookup(conf, "residueRange", &residues_conf)) { @@ -62,19 +63,21 @@ int colvar::alpha_angles::init(std::string const &conf) } else { b_use_index_groups = true; + get_keyval(conf, "prefix", prefix, "alpha"); + // Not all groups are mandatory, parse silently - group_CA.add_index_group("alphaCA", true); - group_N.add_index_group("alphaN", true); - group_O.add_index_group("alphaO", true); + group_CA.add_index_group(prefix + "CA", true); + group_N.add_index_group(prefix + "N", true); + group_O.add_index_group(prefix + "O", true); int na = group_CA.size(); int nn = group_N.size(); int no = group_O.size(); if ((nn != 0 || no != 0) && (nn != no)) { - return cvm::error("Error: If either is provided, atom groups alphaN and alphaO must have the same number of atoms.", + return cvm::error("Error: If either is provided, atom groups " + prefix + "N and " + prefix + "O must have the same number of atoms.", COLVARS_INPUT_ERROR); } if (nn != 0 && na != 0 && nn != na) { - return cvm::error("Error: If both are provided, atom groups alphaN and alphaCA must have the same number of atoms.", + return cvm::error("Error: If both are provided, atom groups " + prefix + "N and " + prefix + "CA must have the same number of atoms.", COLVARS_INPUT_ERROR); } } @@ -95,7 +98,7 @@ int colvar::alpha_angles::init(std::string const &conf) if (hb_coeff < 1.0) { if (b_use_index_groups) { if (group_CA.size() < 5) { - return cvm::error("Not enough atoms (" + cvm::to_str(group_CA.size()) + ") in index group \"alphaCA\"", + return cvm::error("Not enough atoms (" + cvm::to_str(group_CA.size()) + ") in index group \"" + prefix + "CA\"", COLVARS_INPUT_ERROR); } for (size_t i = 0; i < group_CA.size()-2; i++) { @@ -130,7 +133,7 @@ int colvar::alpha_angles::init(std::string const &conf) if (hb_coeff > 0.0) { if (b_use_index_groups) { if (group_N.size() < 5) { - return cvm::error("Not enough atoms (" + cvm::to_str(group_N.size()) + ") in index group \"alphaN\"", + return cvm::error("Not enough atoms (" + cvm::to_str(group_N.size()) + ") in index group \"" + prefix + "N\"", COLVARS_INPUT_ERROR); } for (size_t i = 0; i < group_N.size()-4; i++) { @@ -338,41 +341,62 @@ int colvar::dihedPC::init(std::string const &conf) if (cvm::debug()) cvm::log("Initializing dihedral PC object.\n"); + bool b_use_index_groups = false; std::string segment_id; - get_keyval(conf, "psfSegID", segment_id, std::string("MAIN")); - std::vector residues; - { - std::string residues_conf = ""; - key_lookup(conf, "residueRange", &residues_conf); + size_t n_residues; + std::string residues_conf = ""; + std::string prefix; + cvm::atom_group group_CA, group_N, group_C; + + // residueRange is mandatory for the topology-based case + if (key_lookup(conf, "residueRange", &residues_conf)) { if (residues_conf.size()) { std::istringstream is(residues_conf); int initial, final; char dash; if ( (is >> initial) && (initial > 0) && - (is >> dash) && (dash == '-') && - (is >> final) && (final > 0) ) { + (is >> dash) && (dash == '-') && + (is >> final) && (final > 0) ) { for (int rnum = initial; rnum <= final; rnum++) { residues.push_back(rnum); } } } else { - error_code |= - cvm::error("Error: no residues defined in \"residueRange\".\n", COLVARS_INPUT_ERROR); + return cvm::error("Error: no residues defined in \"residueRange\".\n", COLVARS_INPUT_ERROR); } - } + n_residues = residues.size(); + get_keyval(conf, "psfSegID", segment_id, std::string("MAIN")); + + } else { - if (residues.size() < 2) { + b_use_index_groups = true; + get_keyval(conf, "prefix", prefix, "dihed"); + + // Not all groups are mandatory, parse silently + group_CA.add_index_group(prefix + "CA", true); + group_N.add_index_group(prefix + "N", true); + group_C.add_index_group(prefix + "C", true); + int na = group_CA.size(); + int nn = group_N.size(); + int nc = group_C.size(); + if ((nn != na || na != nc)) { + return cvm::error("Error: atom groups " + prefix + "N, " + prefix + "CA, and " + prefix + + "C must have the same number of atoms.", COLVARS_INPUT_ERROR); + } + n_residues = nn; + } + if (n_residues < 2) { error_code |= - cvm::error("Error: dihedralPC requires at least two residues.\n", COLVARS_INPUT_ERROR); + cvm::error("Error: dihedralPC requires at least two residues.\n", COLVARS_INPUT_ERROR); } std::string const &sid = segment_id; std::vector const &r = residues; std::string vecFileName; - int vecNumber; if (get_keyval(conf, "vectorFile", vecFileName, vecFileName)) { + int vecNumber; get_keyval(conf, "vectorNumber", vecNumber, 0); if (vecNumber < 1) { error_code |= @@ -387,9 +411,8 @@ int colvar::dihedPC::init(std::string const &conf) } // TODO: adapt to different formats by setting this flag - bool eigenvectors_as_columns = true; - - if (eigenvectors_as_columns) { + // bool eigenvectors_as_columns = true; + // if (eigenvectors_as_columns) { // Carma-style dPCA file std::string line; cvm::real c; @@ -400,9 +423,7 @@ int colvar::dihedPC::init(std::string const &conf) for (int i=0; i> c; coeffs.push_back(c); } - } -/* TODO Uncomment this when different formats are recognized - else { + /* } else { // Uncomment this when different formats are recognized // Eigenvectors as lines // Skip to the right line for (int i = 1; iatom_groups[0]); register_atom_group(theta.back()->atom_groups[1]); register_atom_group(theta.back()->atom_groups[2]); register_atom_group(theta.back()->atom_groups[3]); // Phi (next res) - theta.push_back(new colvar::dihedral(cvm::atom(r[i ], "C", sid), - cvm::atom(r[i+1], "N", sid), - cvm::atom(r[i+1], "CA", sid), - cvm::atom(r[i+1], "C", sid))); + if (b_use_index_groups) { + theta.push_back(new colvar::dihedral(group_C[i], + group_N[i+1], + group_CA[i+1], + group_C[i+1])); + } else { + theta.push_back(new colvar::dihedral(cvm::atom(r[i ], "C", sid), + cvm::atom(r[i+1], "N", sid), + cvm::atom(r[i+1], "CA", sid), + cvm::atom(r[i+1], "C", sid))); + } register_atom_group(theta.back()->atom_groups[0]); register_atom_group(theta.back()->atom_groups[1]); register_atom_group(theta.back()->atom_groups[2]); From e2dc023a0f9112f2813bcad8cd786634c7995a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20H=C3=A9nin?= Date: Thu, 7 Nov 2024 13:52:22 +0100 Subject: [PATCH 3/7] Add functional test for protein CVs Note: had to customize the path of dihedralPC file eigenvectors-localmin --- .../library/Common/eigenvectors-localmin | 36 +++++++++++++++++++ tests/input_files/eigenvectors-localmin | 36 +++++++++++++++++++ tests/input_files/protein_cvs/test.in | 19 ++++++++++ 3 files changed, 91 insertions(+) create mode 100644 gromacs/tests/library/Common/eigenvectors-localmin create mode 100644 tests/input_files/eigenvectors-localmin create mode 100644 tests/input_files/protein_cvs/test.in diff --git a/gromacs/tests/library/Common/eigenvectors-localmin b/gromacs/tests/library/Common/eigenvectors-localmin new file mode 100644 index 000000000..a52cfad37 --- /dev/null +++ b/gromacs/tests/library/Common/eigenvectors-localmin @@ -0,0 +1,36 @@ + 0.1963747889 -0.2435375601 0.0873260051 -0.1756783277 -0.0781814829 0.1529948860 -0.0046450179 0.0444533490 -0.0327878706 0.0313097723 -0.3422568738 -0.0915000960 0.1381480247 -0.0271129422 -0.0298548546 0.2350906432 -0.3339620233 0.1851500422 -0.0712136999 -0.0301357936 0.0986777544 -0.0241017379 -0.0532906167 0.2673286796 -0.0116890622 -0.2393864393 0.1082869768 -0.1987102032 0.3660498559 -0.2005954832 0.1040820479 -0.0579174645 -0.2616380453 0.0163365677 0.1128014326 0.1167990863 + -0.1424848437 0.1971974075 -0.0602119714 0.1929562241 0.5178769231 0.0176614709 0.0117100310 -0.0069723213 0.1448430717 0.0499432571 0.2142535895 -0.1834729761 0.0031120728 -0.0294575896 0.0377325006 -0.0596584901 0.0760354772 -0.1323078424 -0.0352616794 0.0630226731 0.2139619142 0.0477474965 0.0572128929 0.0282713696 -0.1030373499 -0.1879492402 0.2251853496 -0.1720441431 0.2067916393 0.1903077513 -0.0124809509 -0.0624537319 -0.4617202878 -0.0972508788 -0.0044818767 -0.0988701582 + -0.1134843826 -0.1012863219 -0.0158918798 0.1131855920 0.1078289449 0.1208484545 -0.0107582081 0.0801827088 -0.1101046428 0.0648905486 -0.1123010144 -0.1384460777 0.0028897147 -0.0609198026 -0.2654257119 -0.0486529991 0.1596771926 -0.2154086530 0.0192722380 -0.1416650265 -0.3947016895 0.2070185840 0.4903787076 0.3707535565 -0.1495712101 -0.0755720735 -0.1845342815 -0.0528635383 -0.0526437461 -0.1494729370 0.1604003906 0.1144032329 0.0232437979 0.0060372935 -0.0415928401 -0.0793217495 + 0.0119315712 0.0334186517 0.0129355546 0.0136653259 0.0321741216 -0.0531486608 -0.0297898781 -0.0290574189 0.0446902625 0.1060369760 0.1181503013 -0.0148345474 0.1942492276 -0.1304881126 0.0647432283 0.2264241725 0.1193141639 0.2200187743 -0.5289052725 -0.2426463515 -0.1185886264 0.2724492550 -0.1064440683 -0.0639643669 -0.0128007056 -0.0174137112 -0.2614892423 0.2328933775 0.3166227937 0.2829177678 0.0645826310 0.1723310649 0.0736594573 -0.0300964341 -0.0802941993 0.0124873780 + -0.0823182836 -0.0676044002 -0.1507277489 0.3607409596 -0.1822922677 0.1133485138 0.0101515707 0.0673003420 -0.0962753668 0.0928432047 -0.1237908900 0.1022697762 0.0817060545 -0.0621842705 0.0702517331 0.0791217610 -0.0014669780 0.0232550949 0.1086691320 -0.2195995003 -0.0882292986 0.0490508266 -0.0387918763 -0.0421041213 0.1011069790 -0.3628790379 0.1263769269 -0.2080720365 -0.1633885652 0.4612067938 0.0863092169 -0.3923322856 0.1814525872 -0.0073590782 0.0906988159 0.0497938059 + -0.2808681726 0.2018277347 -0.0386574417 -0.3713387251 -0.1343932450 0.1147739366 0.0421167091 -0.0314806625 0.1028860807 0.4037163854 0.1395222098 0.0217211246 0.0493378453 0.1620172411 -0.2383957654 -0.1416361928 -0.0643637702 0.0724432245 0.1271459609 0.0082681337 0.0379964449 0.0229766443 -0.0516715460 0.1323519498 -0.1389470994 -0.0425567217 -0.1302608103 0.2232662737 0.1265081018 0.0175417513 0.0304618850 -0.3538453877 0.0649577305 -0.2818017304 0.2037722021 -0.0677262545 + -0.2376934290 -0.1353695840 0.0674238726 0.0936840326 0.0154481679 0.3371547759 -0.0047519645 -0.1168295294 -0.1062216461 0.1025888771 0.0371397473 -0.0140769472 0.2364049852 0.1375914067 0.3919118047 -0.1755808592 -0.0512695387 0.0233411416 -0.0423511937 0.0012962795 0.1463378221 -0.1192852780 0.1300299764 0.0794609338 0.1877272725 -0.1690357924 0.2350907475 0.4345950484 -0.0780135989 -0.1058241725 0.2051555514 0.2384295613 0.0608889014 0.0527611002 -0.0078227744 -0.0841391161 + -0.2213026881 -0.1102164611 -0.1766119003 -0.4316424131 -0.1809992343 -0.0297330655 -0.0114950342 -0.1062826514 0.1360193938 -0.2176792026 0.0433008224 -0.2394080609 -0.0188554805 -0.3732220232 -0.0729630515 -0.0724325553 0.0856374800 -0.0578087866 -0.0400508828 0.0750454888 0.1791851819 -0.1427901536 0.1543953717 -0.0475585088 0.1566753387 -0.3590101302 -0.1456062645 -0.1071618721 -0.0317152441 0.1831552833 -0.0853775665 0.1452077180 0.0609720312 0.1882001758 0.0391667783 -0.1215541363 + -0.2897811234 -0.1854564548 0.1317410022 0.0791080296 0.0815366581 0.1070284843 0.1010360196 0.3624491990 0.2696509063 0.1067028344 -0.0912246108 0.0322734639 0.1253046393 -0.1293151081 -0.4470446706 0.2278086692 -0.0879030377 -0.0818882585 0.0273195673 0.1258587688 -0.0090098949 -0.1085683033 -0.1136641949 -0.1737892032 0.1925510317 0.1720922589 0.0784175992 0.1561978161 -0.1596665829 0.1306306273 0.1184844524 0.1762722433 -0.1309806854 0.0065978402 0.0117241582 0.1801510453 + 0.2585556209 0.1046129614 0.0489307567 0.1164874956 -0.0758840442 -0.0289687365 -0.0328674838 0.0096652284 -0.0288587790 0.2354134023 -0.0439941250 -0.4017923772 0.0497784503 -0.4548377395 0.0285931602 -0.3983007967 -0.0065039890 -0.1768592298 -0.0574359037 -0.0522795618 -0.1101831198 -0.2466015369 -0.2640601993 -0.0285742600 0.0602469668 0.0623863339 -0.0477967151 0.0721202716 0.0049261954 -0.0928124934 0.2460496724 -0.1209946871 -0.0275425296 -0.0844932571 -0.0909989700 0.1190534458 + 0.0115123345 -0.2053384632 -0.0200730916 0.0418662578 0.0132877203 0.1095561460 -0.0197598394 -0.0766518489 -0.1530949175 -0.1400177032 0.0036608649 0.1429294795 0.0294519942 -0.0961123854 -0.0564047508 -0.0424811542 0.1831959933 -0.2842011452 0.1286547333 0.3904968500 0.0325995535 0.4326119125 -0.5347281098 0.1796492934 -0.0235615410 -0.1713506728 -0.1027755663 0.1368023753 0.0542703085 -0.0238059722 0.0191541202 0.0066495091 -0.0060739839 0.0229720399 0.0178521238 -0.0687847063 + 0.3819521964 -0.0728246123 -0.1263830811 0.1119554564 -0.2336936593 -0.0258600321 0.0911225379 -0.1447022706 0.3089801371 0.1502652615 -0.0183429383 -0.1992215812 0.4607320428 0.1684671342 -0.0513488054 0.1325907409 0.1743434221 -0.1234578565 0.2119678259 0.0526837371 0.1543880105 0.0836736932 0.1731647402 -0.0595778860 -0.0953834280 0.1008910239 -0.0489637256 0.1432067156 -0.0328989588 0.0661427975 -0.0880568027 -0.0795106962 -0.1276398599 0.2425389737 -0.0405040197 -0.1436787546 + 0.0681864545 -0.2558588088 0.0527243204 0.0925553888 -0.0850496814 0.1703610271 0.0534913577 0.3179835081 0.0690876320 -0.0545097254 0.1610724181 -0.0853121504 -0.1284374595 0.0033392746 0.3585761786 0.0259728320 -0.1701649129 -0.0728340000 -0.1607442498 0.2039122134 0.0574144460 -0.1437990963 0.0956969336 0.1813575327 -0.2444174290 0.0642411336 -0.4156982899 0.0655589178 -0.1919515431 0.1885504574 -0.1838184595 -0.1004465148 -0.1398493499 -0.1730029881 0.1165303439 0.0597383827 + -0.2249886096 0.3117672205 -0.1700923443 -0.1124182269 -0.3618689477 0.1696254909 -0.0491311252 0.0967852771 -0.1833513379 0.0378315970 0.1235240027 -0.0553877912 0.1936959475 -0.0826964900 0.1605731100 0.1735009849 -0.0125440778 -0.1056052893 0.0666554496 -0.0789207891 0.1365861148 0.2238652557 -0.0471123755 0.0421245433 -0.0951801166 0.1398054957 0.0454721414 -0.2443223894 -0.1580529213 -0.0949347168 0.0010545597 0.1772677749 -0.1944438368 -0.1161055714 -0.3240405321 0.2804790735 + -0.1125288606 -0.2039076239 0.0077675926 0.1984601170 -0.0660677999 0.0415578671 0.0338165164 0.0144812632 -0.1231606603 0.1768241823 -0.0527869463 0.0969538763 -0.0580013804 -0.0418062769 -0.0302306246 -0.0117323147 0.2615632713 0.1510581076 0.1122984663 0.0600851774 0.2590099573 -0.1422644258 0.0445681587 -0.4665450454 -0.4141973555 -0.1459545940 -0.2318946421 -0.1561539620 0.1736496836 -0.2130571157 0.2063761801 0.1401076019 0.0425762795 -0.0945108011 0.0034234240 -0.0101841614 + -0.1708253473 0.0722392872 0.1577059329 0.0835642889 -0.4797110558 -0.1343327612 0.0447313413 -0.0197978970 0.0561813936 -0.2093220502 -0.1663550287 0.0275875535 -0.1115228012 0.0807066560 0.0198830739 -0.2363268137 0.1209721863 -0.0099972067 -0.1523449868 0.2843715250 -0.1911426783 0.0220546257 0.1507615745 0.0034596897 -0.1789889634 0.1204345003 0.2832080722 0.0747517720 0.2844209373 0.2484348267 0.1598652005 -0.0023945051 -0.2042549700 0.0428319909 0.0621918626 0.0779223442 + -0.1253045946 -0.1917041093 -0.0430826284 0.0092862267 0.1599046737 -0.2867772877 0.0167031791 0.0727747232 0.0840950161 -0.0155558577 -0.0641414970 -0.0746762678 0.3943374157 0.0371968448 0.0428604521 -0.4417092204 -0.2614108324 0.2827556133 0.0944553912 0.1145298481 0.0721109882 0.2310837507 -0.0271008257 0.1033117697 -0.0988823920 0.1663162410 -0.0367853865 -0.2795546949 -0.0511569567 0.1402690113 0.0419794768 0.1512510777 0.2250005156 -0.0673643202 -0.0283167474 0.0348352268 + -0.0501173772 0.1080161557 -0.3521989286 -0.0239452012 0.1727203876 0.4806235135 -0.0125839263 0.0045034774 -0.1315335780 -0.1084563881 -0.0810514912 -0.0233511180 0.1867688596 -0.1173131987 0.0562121533 -0.0020515453 -0.0845404044 0.0956834704 0.0849599168 0.2472148538 -0.3579055369 -0.1539382339 0.0129278898 -0.2112721652 -0.0515393056 0.2503886521 -0.0300206933 -0.0371591114 0.2906271517 0.0464327298 -0.1868627369 -0.0752260312 0.0892231613 0.1526416391 0.0249930415 -0.0652618930 + -0.0872564539 0.0243425481 0.1338341981 0.0145129459 0.0348117687 -0.1697105318 -0.0146319373 -0.1008014381 0.0582331941 -0.0721962005 0.1073118970 -0.1036507040 0.1401987523 -0.0680952445 0.0474639051 0.2868845165 0.1088585630 0.1026799455 0.2822225988 -0.0228695534 -0.2505819798 -0.4051531553 -0.2366576195 0.3044527173 -0.4087029994 -0.1459553391 0.1680843383 0.0842732266 -0.0094735241 0.0973781124 -0.1021796018 0.1902236789 0.1519235671 -0.0664147586 -0.0858099833 0.0248813108 + -0.0035727273 0.0042023696 0.0163419712 0.0180375855 -0.0009765942 0.0042972052 -0.0793000609 -0.0016799540 -0.1398012489 -0.1188993827 0.0083405981 -0.1492017508 -0.2147635818 0.1097403690 0.0015360988 0.0662602484 -0.3263222873 -0.3065134585 0.3759700358 -0.2790607512 0.2096192390 0.0088276714 -0.0130511587 -0.0081791133 -0.0234287679 0.2003678679 -0.1578316242 0.1060987040 0.3393341899 0.3269199729 0.2422886491 0.1710233986 0.1145504192 0.0884852707 0.0129780537 -0.0511228628 + -0.1309653223 0.1944082230 0.0547829159 0.2744348347 -0.0959336162 -0.1404089332 0.0229851808 0.0005319085 0.0877962187 0.0812901482 -0.0491917208 -0.2353446335 -0.1096245348 0.0511924513 0.1651066989 0.1631335318 0.0835407600 0.2619647086 0.3083030879 0.2659570575 -0.1038785800 0.0512391813 0.0414169617 0.0864542276 0.5053355098 -0.0706680417 -0.3038133681 -0.0425163731 0.1765003204 -0.1090115905 -0.0420643985 0.0911639556 -0.0315225720 -0.1473800838 0.0479318313 0.0081807515 + 0.3135237694 -0.2496372014 0.0607225560 -0.1307715923 -0.1150304452 0.0192733351 -0.0587593839 0.1286395192 -0.3224797845 0.0860211998 0.3922165930 0.0995159745 0.1364482939 0.0740349069 -0.1606153548 -0.1171343997 0.1224289984 -0.0179655440 0.1177947819 0.0282914694 -0.1381052881 -0.1038318723 0.1226655841 -0.0668654218 0.2544485927 -0.0431082584 0.1482318938 -0.1072731763 0.1619693190 0.1984768510 -0.1240299419 0.2083161175 -0.1061438024 -0.3603115380 -0.0046039587 -0.0358309485 + -0.0975953937 -0.0158639885 0.0516230837 0.0533769652 -0.0865195617 0.2747492194 0.0142260222 0.0357731096 -0.0246272236 -0.0907660127 -0.0903096944 -0.2053732127 -0.0308515094 0.3692343235 -0.1475659758 -0.2158651203 0.3097785711 0.1667546332 -0.1094511822 -0.3047640622 0.0377532840 -0.1629900336 -0.3732764423 0.1453482658 0.0696141347 0.1335657984 -0.1380406171 -0.2211285532 -0.0847756714 0.0705246627 -0.0960571840 0.1264272630 -0.1730252057 0.1454089135 0.0963070765 -0.1731078476 + -0.0175752304 -0.2033096999 0.1819676161 -0.4076113403 0.1924909502 0.0128934113 0.0246163569 0.1495099962 -0.0323598497 0.1720830351 -0.1698880345 -0.1879570037 -0.1054590866 -0.0694077983 0.3710309267 0.1464660317 0.4406459332 0.0285866112 0.1574844569 -0.0130594531 -0.0160966422 0.1642288566 0.0279384572 -0.0442493446 0.0280911904 0.2676147819 0.1800954044 -0.0691393539 -0.0256907903 0.1263072044 0.1299677044 -0.1558487862 0.0656020716 0.0165546034 0.0790812522 0.0289903861 + -0.2567132413 -0.2546975017 -0.0688749552 0.1003460586 -0.0284931622 -0.2809740305 -0.1248626187 -0.1933056265 -0.5010789633 0.0196088981 0.1258212328 -0.3617976010 0.0190020371 -0.0253307875 -0.1350058466 0.1608515680 -0.1304747015 0.1396846622 -0.0683601648 0.0202747602 -0.0123388655 0.0515129343 -0.0040156934 -0.1073776856 -0.0376669019 0.1532874256 0.0546610355 0.1663077027 -0.1431432962 -0.0598794706 -0.1131371558 -0.2147751749 -0.2215751708 0.1017869115 0.1443072110 -0.0598763041 + 0.0947659612 0.0421869829 -0.4527548850 0.1034818739 0.0137911728 -0.0834380090 -0.0262774341 0.0327248350 -0.1215862185 0.0286672190 0.0165394004 0.1398163438 -0.0431676842 -0.0964682400 -0.1171856374 0.1377884150 0.2201426327 0.1062143967 -0.1596137583 0.1821483374 0.3412539661 -0.2356509715 0.0623004064 0.4252112508 0.0793027729 0.2756354809 0.0704099908 -0.0040073735 0.0209397040 0.0592108443 0.2851000130 0.0088731311 0.1466023177 -0.0414033048 0.1203984544 -0.0005115653 + -0.1359866709 -0.0654151887 -0.1434412450 -0.0858661458 0.0243479609 -0.2098256499 -0.0165007971 -0.0195633452 0.0138517916 0.0884543136 -0.0565501563 -0.1413294971 0.1578877270 0.4372856319 0.1161675975 0.1666636467 -0.0324212983 -0.4941589534 -0.3060139716 0.1635867953 -0.1689962298 -0.1957986355 -0.1167476550 -0.1254428476 0.0824147984 -0.0714811906 -0.0444061793 -0.2479877472 0.0631934851 -0.0844743401 0.1437179148 -0.0130659780 0.1825024784 -0.1111519858 0.0109960027 -0.0194192175 + 0.0784952641 -0.0563215911 -0.5809748769 -0.0499587767 0.0009068039 -0.1685669720 0.0955139399 0.2080618292 0.0634073690 0.1107704937 -0.2193874121 -0.0772097334 -0.2088135034 0.0918779671 0.0978175923 -0.1127180010 0.0076408177 0.0123161040 0.0848710909 -0.1660488695 -0.1374271065 0.1075076237 -0.1020871624 -0.0865883455 -0.0887346938 -0.1591940373 0.1361180097 0.2653165162 -0.0292524919 -0.0342432894 -0.1578389257 0.3028195202 -0.1493722796 -0.1037234291 0.2137364745 0.1490906477 + -0.2793548405 -0.2056565583 0.0106481165 0.1455072612 -0.0508008897 -0.1519782096 0.0266436059 0.0657815114 0.0605018884 -0.0318899639 -0.0758711994 0.2058726400 0.1652763933 -0.1813079417 0.0994561315 -0.1028154120 0.1572523564 -0.2604105473 0.0198362395 -0.3047916293 0.1431906223 -0.1040939167 0.0312704109 0.1283416003 0.1207272410 0.1684161127 -0.0026487834 0.0411393866 0.3581366241 -0.1991270036 -0.4523099065 -0.1669926047 0.0406698547 -0.0466507003 0.0061321543 0.1033646315 + 0.0962234735 0.1685899645 0.1822200865 0.1538205296 -0.0558282584 0.1844846308 -0.0292548165 0.1220852733 -0.0423693992 -0.0003878183 0.0154785411 -0.3811898232 -0.0458817221 0.0068311067 -0.1602355689 0.0466795340 0.0218561571 -0.0687931478 -0.1553969681 0.1020316482 0.2277569920 0.1808620393 0.0577450134 -0.0352253765 -0.0948149562 -0.0456437021 0.2611003220 -0.0206174050 0.0519294292 -0.0605326705 -0.3110633790 0.1254337281 0.4760060310 -0.0738868341 0.3109250963 0.1379290372 + -0.0490867011 -0.2205537856 -0.0508352816 0.0577448867 -0.0790255442 0.0499165244 0.0180350058 -0.1067801490 0.0847704038 0.5612118244 0.1743686050 0.0162445232 -0.3666506708 0.0301398207 -0.0070977714 -0.0464286692 -0.1143564880 0.0178455953 -0.0620715283 0.1347611099 -0.0479794703 0.0168384816 -0.0506477691 0.1411809623 -0.0035322020 0.0257597696 0.1160409376 -0.1535292715 0.1163110584 0.0704148114 -0.1885488927 0.0925666839 0.0954708531 0.3931201398 -0.3220751584 0.0632707477 + 0.0122603998 0.1114120036 0.0557601564 -0.0317054354 0.0480776988 -0.0903210044 0.0078155342 0.1253697723 -0.0440352932 0.0196105763 0.3909061849 0.1199010983 0.1488123685 0.0362919904 0.0731542856 -0.0664216280 0.0650821924 -0.0278980825 0.0775393322 -0.0335631371 -0.1041010097 -0.0234105829 -0.0012736983 0.0220801048 0.0056676557 -0.0849590078 -0.1165497899 -0.0804976672 0.0467915758 -0.0983086899 0.1567831039 0.0190335158 -0.0565100573 0.5034879446 0.4740294516 0.4298912883 + -0.0037918258 -0.3166097999 -0.1723117381 0.0362541005 0.0345088802 0.1973016262 -0.0077323504 -0.3070164621 0.2966904938 -0.3115707040 0.2597662210 -0.1926273853 -0.1296769381 0.1372960657 -0.0828024372 -0.0161769204 0.0836938620 0.1041713879 0.0349239632 -0.0892921910 -0.0483713634 0.0631724671 0.0146737266 -0.0315750204 0.0433125868 0.0461256281 0.0433526523 0.0230776537 0.0536411740 -0.0967682675 0.1608509570 -0.1785002947 0.0815036371 -0.2059147954 -0.1425377578 0.4706233740 + 0.0396235846 0.1059504822 0.0150647545 -0.0928744152 0.1558589041 -0.0960361511 0.0064751846 0.3151701093 -0.2774806619 -0.0898476690 -0.1632325202 -0.1060661972 0.0529618077 0.2583278120 -0.1272346228 -0.1054538563 0.1379968077 0.0780622661 0.0048608254 0.1178955063 0.1504602432 -0.1094022617 0.0726503134 0.0231349021 0.0141859530 -0.2381775975 -0.1202401519 0.2422870994 0.0769496039 0.1065277085 -0.0932057053 -0.2007680684 0.0537369102 0.1707278937 -0.4652236104 0.3183539808 + -0.0295227151 -0.0614063963 -0.1084607318 0.0388087630 -0.1535164267 -0.0596667305 0.0477641933 0.5482348204 0.1326045692 -0.1860647947 0.3459784389 -0.1255793422 -0.0371747948 -0.0041297399 0.0365139246 0.0373678282 -0.0397448689 0.1139490902 0.0128879696 -0.0735306293 -0.0551533401 0.0867520571 -0.0899181068 -0.0181381516 -0.0124207754 -0.0475071035 0.1851563901 0.0244553369 0.1375900656 -0.2768158019 0.1777062565 -0.1756671667 0.1170190424 0.1231365874 -0.1570594162 -0.4151892662 + 0.0069332216 0.0233022701 0.0231027026 -0.0150853274 0.0195660237 -0.0098501025 0.9626339078 -0.1122514606 -0.1926022619 -0.0493766293 0.0637515709 -0.0476384573 -0.0066359187 -0.0394283049 -0.0091484636 0.0287480447 -0.0479422882 -0.0217609257 -0.0301152412 -0.0333705395 0.0046506207 0.0041666743 -0.0118440455 0.0218822230 0.0257040989 0.0197908245 0.0015174265 -0.0338557065 0.0165846255 0.0050449288 0.0189024024 0.0077903625 0.0376430713 -0.0181977842 -0.0200145394 -0.0029525198 diff --git a/tests/input_files/eigenvectors-localmin b/tests/input_files/eigenvectors-localmin new file mode 100644 index 000000000..a52cfad37 --- /dev/null +++ b/tests/input_files/eigenvectors-localmin @@ -0,0 +1,36 @@ + 0.1963747889 -0.2435375601 0.0873260051 -0.1756783277 -0.0781814829 0.1529948860 -0.0046450179 0.0444533490 -0.0327878706 0.0313097723 -0.3422568738 -0.0915000960 0.1381480247 -0.0271129422 -0.0298548546 0.2350906432 -0.3339620233 0.1851500422 -0.0712136999 -0.0301357936 0.0986777544 -0.0241017379 -0.0532906167 0.2673286796 -0.0116890622 -0.2393864393 0.1082869768 -0.1987102032 0.3660498559 -0.2005954832 0.1040820479 -0.0579174645 -0.2616380453 0.0163365677 0.1128014326 0.1167990863 + -0.1424848437 0.1971974075 -0.0602119714 0.1929562241 0.5178769231 0.0176614709 0.0117100310 -0.0069723213 0.1448430717 0.0499432571 0.2142535895 -0.1834729761 0.0031120728 -0.0294575896 0.0377325006 -0.0596584901 0.0760354772 -0.1323078424 -0.0352616794 0.0630226731 0.2139619142 0.0477474965 0.0572128929 0.0282713696 -0.1030373499 -0.1879492402 0.2251853496 -0.1720441431 0.2067916393 0.1903077513 -0.0124809509 -0.0624537319 -0.4617202878 -0.0972508788 -0.0044818767 -0.0988701582 + -0.1134843826 -0.1012863219 -0.0158918798 0.1131855920 0.1078289449 0.1208484545 -0.0107582081 0.0801827088 -0.1101046428 0.0648905486 -0.1123010144 -0.1384460777 0.0028897147 -0.0609198026 -0.2654257119 -0.0486529991 0.1596771926 -0.2154086530 0.0192722380 -0.1416650265 -0.3947016895 0.2070185840 0.4903787076 0.3707535565 -0.1495712101 -0.0755720735 -0.1845342815 -0.0528635383 -0.0526437461 -0.1494729370 0.1604003906 0.1144032329 0.0232437979 0.0060372935 -0.0415928401 -0.0793217495 + 0.0119315712 0.0334186517 0.0129355546 0.0136653259 0.0321741216 -0.0531486608 -0.0297898781 -0.0290574189 0.0446902625 0.1060369760 0.1181503013 -0.0148345474 0.1942492276 -0.1304881126 0.0647432283 0.2264241725 0.1193141639 0.2200187743 -0.5289052725 -0.2426463515 -0.1185886264 0.2724492550 -0.1064440683 -0.0639643669 -0.0128007056 -0.0174137112 -0.2614892423 0.2328933775 0.3166227937 0.2829177678 0.0645826310 0.1723310649 0.0736594573 -0.0300964341 -0.0802941993 0.0124873780 + -0.0823182836 -0.0676044002 -0.1507277489 0.3607409596 -0.1822922677 0.1133485138 0.0101515707 0.0673003420 -0.0962753668 0.0928432047 -0.1237908900 0.1022697762 0.0817060545 -0.0621842705 0.0702517331 0.0791217610 -0.0014669780 0.0232550949 0.1086691320 -0.2195995003 -0.0882292986 0.0490508266 -0.0387918763 -0.0421041213 0.1011069790 -0.3628790379 0.1263769269 -0.2080720365 -0.1633885652 0.4612067938 0.0863092169 -0.3923322856 0.1814525872 -0.0073590782 0.0906988159 0.0497938059 + -0.2808681726 0.2018277347 -0.0386574417 -0.3713387251 -0.1343932450 0.1147739366 0.0421167091 -0.0314806625 0.1028860807 0.4037163854 0.1395222098 0.0217211246 0.0493378453 0.1620172411 -0.2383957654 -0.1416361928 -0.0643637702 0.0724432245 0.1271459609 0.0082681337 0.0379964449 0.0229766443 -0.0516715460 0.1323519498 -0.1389470994 -0.0425567217 -0.1302608103 0.2232662737 0.1265081018 0.0175417513 0.0304618850 -0.3538453877 0.0649577305 -0.2818017304 0.2037722021 -0.0677262545 + -0.2376934290 -0.1353695840 0.0674238726 0.0936840326 0.0154481679 0.3371547759 -0.0047519645 -0.1168295294 -0.1062216461 0.1025888771 0.0371397473 -0.0140769472 0.2364049852 0.1375914067 0.3919118047 -0.1755808592 -0.0512695387 0.0233411416 -0.0423511937 0.0012962795 0.1463378221 -0.1192852780 0.1300299764 0.0794609338 0.1877272725 -0.1690357924 0.2350907475 0.4345950484 -0.0780135989 -0.1058241725 0.2051555514 0.2384295613 0.0608889014 0.0527611002 -0.0078227744 -0.0841391161 + -0.2213026881 -0.1102164611 -0.1766119003 -0.4316424131 -0.1809992343 -0.0297330655 -0.0114950342 -0.1062826514 0.1360193938 -0.2176792026 0.0433008224 -0.2394080609 -0.0188554805 -0.3732220232 -0.0729630515 -0.0724325553 0.0856374800 -0.0578087866 -0.0400508828 0.0750454888 0.1791851819 -0.1427901536 0.1543953717 -0.0475585088 0.1566753387 -0.3590101302 -0.1456062645 -0.1071618721 -0.0317152441 0.1831552833 -0.0853775665 0.1452077180 0.0609720312 0.1882001758 0.0391667783 -0.1215541363 + -0.2897811234 -0.1854564548 0.1317410022 0.0791080296 0.0815366581 0.1070284843 0.1010360196 0.3624491990 0.2696509063 0.1067028344 -0.0912246108 0.0322734639 0.1253046393 -0.1293151081 -0.4470446706 0.2278086692 -0.0879030377 -0.0818882585 0.0273195673 0.1258587688 -0.0090098949 -0.1085683033 -0.1136641949 -0.1737892032 0.1925510317 0.1720922589 0.0784175992 0.1561978161 -0.1596665829 0.1306306273 0.1184844524 0.1762722433 -0.1309806854 0.0065978402 0.0117241582 0.1801510453 + 0.2585556209 0.1046129614 0.0489307567 0.1164874956 -0.0758840442 -0.0289687365 -0.0328674838 0.0096652284 -0.0288587790 0.2354134023 -0.0439941250 -0.4017923772 0.0497784503 -0.4548377395 0.0285931602 -0.3983007967 -0.0065039890 -0.1768592298 -0.0574359037 -0.0522795618 -0.1101831198 -0.2466015369 -0.2640601993 -0.0285742600 0.0602469668 0.0623863339 -0.0477967151 0.0721202716 0.0049261954 -0.0928124934 0.2460496724 -0.1209946871 -0.0275425296 -0.0844932571 -0.0909989700 0.1190534458 + 0.0115123345 -0.2053384632 -0.0200730916 0.0418662578 0.0132877203 0.1095561460 -0.0197598394 -0.0766518489 -0.1530949175 -0.1400177032 0.0036608649 0.1429294795 0.0294519942 -0.0961123854 -0.0564047508 -0.0424811542 0.1831959933 -0.2842011452 0.1286547333 0.3904968500 0.0325995535 0.4326119125 -0.5347281098 0.1796492934 -0.0235615410 -0.1713506728 -0.1027755663 0.1368023753 0.0542703085 -0.0238059722 0.0191541202 0.0066495091 -0.0060739839 0.0229720399 0.0178521238 -0.0687847063 + 0.3819521964 -0.0728246123 -0.1263830811 0.1119554564 -0.2336936593 -0.0258600321 0.0911225379 -0.1447022706 0.3089801371 0.1502652615 -0.0183429383 -0.1992215812 0.4607320428 0.1684671342 -0.0513488054 0.1325907409 0.1743434221 -0.1234578565 0.2119678259 0.0526837371 0.1543880105 0.0836736932 0.1731647402 -0.0595778860 -0.0953834280 0.1008910239 -0.0489637256 0.1432067156 -0.0328989588 0.0661427975 -0.0880568027 -0.0795106962 -0.1276398599 0.2425389737 -0.0405040197 -0.1436787546 + 0.0681864545 -0.2558588088 0.0527243204 0.0925553888 -0.0850496814 0.1703610271 0.0534913577 0.3179835081 0.0690876320 -0.0545097254 0.1610724181 -0.0853121504 -0.1284374595 0.0033392746 0.3585761786 0.0259728320 -0.1701649129 -0.0728340000 -0.1607442498 0.2039122134 0.0574144460 -0.1437990963 0.0956969336 0.1813575327 -0.2444174290 0.0642411336 -0.4156982899 0.0655589178 -0.1919515431 0.1885504574 -0.1838184595 -0.1004465148 -0.1398493499 -0.1730029881 0.1165303439 0.0597383827 + -0.2249886096 0.3117672205 -0.1700923443 -0.1124182269 -0.3618689477 0.1696254909 -0.0491311252 0.0967852771 -0.1833513379 0.0378315970 0.1235240027 -0.0553877912 0.1936959475 -0.0826964900 0.1605731100 0.1735009849 -0.0125440778 -0.1056052893 0.0666554496 -0.0789207891 0.1365861148 0.2238652557 -0.0471123755 0.0421245433 -0.0951801166 0.1398054957 0.0454721414 -0.2443223894 -0.1580529213 -0.0949347168 0.0010545597 0.1772677749 -0.1944438368 -0.1161055714 -0.3240405321 0.2804790735 + -0.1125288606 -0.2039076239 0.0077675926 0.1984601170 -0.0660677999 0.0415578671 0.0338165164 0.0144812632 -0.1231606603 0.1768241823 -0.0527869463 0.0969538763 -0.0580013804 -0.0418062769 -0.0302306246 -0.0117323147 0.2615632713 0.1510581076 0.1122984663 0.0600851774 0.2590099573 -0.1422644258 0.0445681587 -0.4665450454 -0.4141973555 -0.1459545940 -0.2318946421 -0.1561539620 0.1736496836 -0.2130571157 0.2063761801 0.1401076019 0.0425762795 -0.0945108011 0.0034234240 -0.0101841614 + -0.1708253473 0.0722392872 0.1577059329 0.0835642889 -0.4797110558 -0.1343327612 0.0447313413 -0.0197978970 0.0561813936 -0.2093220502 -0.1663550287 0.0275875535 -0.1115228012 0.0807066560 0.0198830739 -0.2363268137 0.1209721863 -0.0099972067 -0.1523449868 0.2843715250 -0.1911426783 0.0220546257 0.1507615745 0.0034596897 -0.1789889634 0.1204345003 0.2832080722 0.0747517720 0.2844209373 0.2484348267 0.1598652005 -0.0023945051 -0.2042549700 0.0428319909 0.0621918626 0.0779223442 + -0.1253045946 -0.1917041093 -0.0430826284 0.0092862267 0.1599046737 -0.2867772877 0.0167031791 0.0727747232 0.0840950161 -0.0155558577 -0.0641414970 -0.0746762678 0.3943374157 0.0371968448 0.0428604521 -0.4417092204 -0.2614108324 0.2827556133 0.0944553912 0.1145298481 0.0721109882 0.2310837507 -0.0271008257 0.1033117697 -0.0988823920 0.1663162410 -0.0367853865 -0.2795546949 -0.0511569567 0.1402690113 0.0419794768 0.1512510777 0.2250005156 -0.0673643202 -0.0283167474 0.0348352268 + -0.0501173772 0.1080161557 -0.3521989286 -0.0239452012 0.1727203876 0.4806235135 -0.0125839263 0.0045034774 -0.1315335780 -0.1084563881 -0.0810514912 -0.0233511180 0.1867688596 -0.1173131987 0.0562121533 -0.0020515453 -0.0845404044 0.0956834704 0.0849599168 0.2472148538 -0.3579055369 -0.1539382339 0.0129278898 -0.2112721652 -0.0515393056 0.2503886521 -0.0300206933 -0.0371591114 0.2906271517 0.0464327298 -0.1868627369 -0.0752260312 0.0892231613 0.1526416391 0.0249930415 -0.0652618930 + -0.0872564539 0.0243425481 0.1338341981 0.0145129459 0.0348117687 -0.1697105318 -0.0146319373 -0.1008014381 0.0582331941 -0.0721962005 0.1073118970 -0.1036507040 0.1401987523 -0.0680952445 0.0474639051 0.2868845165 0.1088585630 0.1026799455 0.2822225988 -0.0228695534 -0.2505819798 -0.4051531553 -0.2366576195 0.3044527173 -0.4087029994 -0.1459553391 0.1680843383 0.0842732266 -0.0094735241 0.0973781124 -0.1021796018 0.1902236789 0.1519235671 -0.0664147586 -0.0858099833 0.0248813108 + -0.0035727273 0.0042023696 0.0163419712 0.0180375855 -0.0009765942 0.0042972052 -0.0793000609 -0.0016799540 -0.1398012489 -0.1188993827 0.0083405981 -0.1492017508 -0.2147635818 0.1097403690 0.0015360988 0.0662602484 -0.3263222873 -0.3065134585 0.3759700358 -0.2790607512 0.2096192390 0.0088276714 -0.0130511587 -0.0081791133 -0.0234287679 0.2003678679 -0.1578316242 0.1060987040 0.3393341899 0.3269199729 0.2422886491 0.1710233986 0.1145504192 0.0884852707 0.0129780537 -0.0511228628 + -0.1309653223 0.1944082230 0.0547829159 0.2744348347 -0.0959336162 -0.1404089332 0.0229851808 0.0005319085 0.0877962187 0.0812901482 -0.0491917208 -0.2353446335 -0.1096245348 0.0511924513 0.1651066989 0.1631335318 0.0835407600 0.2619647086 0.3083030879 0.2659570575 -0.1038785800 0.0512391813 0.0414169617 0.0864542276 0.5053355098 -0.0706680417 -0.3038133681 -0.0425163731 0.1765003204 -0.1090115905 -0.0420643985 0.0911639556 -0.0315225720 -0.1473800838 0.0479318313 0.0081807515 + 0.3135237694 -0.2496372014 0.0607225560 -0.1307715923 -0.1150304452 0.0192733351 -0.0587593839 0.1286395192 -0.3224797845 0.0860211998 0.3922165930 0.0995159745 0.1364482939 0.0740349069 -0.1606153548 -0.1171343997 0.1224289984 -0.0179655440 0.1177947819 0.0282914694 -0.1381052881 -0.1038318723 0.1226655841 -0.0668654218 0.2544485927 -0.0431082584 0.1482318938 -0.1072731763 0.1619693190 0.1984768510 -0.1240299419 0.2083161175 -0.1061438024 -0.3603115380 -0.0046039587 -0.0358309485 + -0.0975953937 -0.0158639885 0.0516230837 0.0533769652 -0.0865195617 0.2747492194 0.0142260222 0.0357731096 -0.0246272236 -0.0907660127 -0.0903096944 -0.2053732127 -0.0308515094 0.3692343235 -0.1475659758 -0.2158651203 0.3097785711 0.1667546332 -0.1094511822 -0.3047640622 0.0377532840 -0.1629900336 -0.3732764423 0.1453482658 0.0696141347 0.1335657984 -0.1380406171 -0.2211285532 -0.0847756714 0.0705246627 -0.0960571840 0.1264272630 -0.1730252057 0.1454089135 0.0963070765 -0.1731078476 + -0.0175752304 -0.2033096999 0.1819676161 -0.4076113403 0.1924909502 0.0128934113 0.0246163569 0.1495099962 -0.0323598497 0.1720830351 -0.1698880345 -0.1879570037 -0.1054590866 -0.0694077983 0.3710309267 0.1464660317 0.4406459332 0.0285866112 0.1574844569 -0.0130594531 -0.0160966422 0.1642288566 0.0279384572 -0.0442493446 0.0280911904 0.2676147819 0.1800954044 -0.0691393539 -0.0256907903 0.1263072044 0.1299677044 -0.1558487862 0.0656020716 0.0165546034 0.0790812522 0.0289903861 + -0.2567132413 -0.2546975017 -0.0688749552 0.1003460586 -0.0284931622 -0.2809740305 -0.1248626187 -0.1933056265 -0.5010789633 0.0196088981 0.1258212328 -0.3617976010 0.0190020371 -0.0253307875 -0.1350058466 0.1608515680 -0.1304747015 0.1396846622 -0.0683601648 0.0202747602 -0.0123388655 0.0515129343 -0.0040156934 -0.1073776856 -0.0376669019 0.1532874256 0.0546610355 0.1663077027 -0.1431432962 -0.0598794706 -0.1131371558 -0.2147751749 -0.2215751708 0.1017869115 0.1443072110 -0.0598763041 + 0.0947659612 0.0421869829 -0.4527548850 0.1034818739 0.0137911728 -0.0834380090 -0.0262774341 0.0327248350 -0.1215862185 0.0286672190 0.0165394004 0.1398163438 -0.0431676842 -0.0964682400 -0.1171856374 0.1377884150 0.2201426327 0.1062143967 -0.1596137583 0.1821483374 0.3412539661 -0.2356509715 0.0623004064 0.4252112508 0.0793027729 0.2756354809 0.0704099908 -0.0040073735 0.0209397040 0.0592108443 0.2851000130 0.0088731311 0.1466023177 -0.0414033048 0.1203984544 -0.0005115653 + -0.1359866709 -0.0654151887 -0.1434412450 -0.0858661458 0.0243479609 -0.2098256499 -0.0165007971 -0.0195633452 0.0138517916 0.0884543136 -0.0565501563 -0.1413294971 0.1578877270 0.4372856319 0.1161675975 0.1666636467 -0.0324212983 -0.4941589534 -0.3060139716 0.1635867953 -0.1689962298 -0.1957986355 -0.1167476550 -0.1254428476 0.0824147984 -0.0714811906 -0.0444061793 -0.2479877472 0.0631934851 -0.0844743401 0.1437179148 -0.0130659780 0.1825024784 -0.1111519858 0.0109960027 -0.0194192175 + 0.0784952641 -0.0563215911 -0.5809748769 -0.0499587767 0.0009068039 -0.1685669720 0.0955139399 0.2080618292 0.0634073690 0.1107704937 -0.2193874121 -0.0772097334 -0.2088135034 0.0918779671 0.0978175923 -0.1127180010 0.0076408177 0.0123161040 0.0848710909 -0.1660488695 -0.1374271065 0.1075076237 -0.1020871624 -0.0865883455 -0.0887346938 -0.1591940373 0.1361180097 0.2653165162 -0.0292524919 -0.0342432894 -0.1578389257 0.3028195202 -0.1493722796 -0.1037234291 0.2137364745 0.1490906477 + -0.2793548405 -0.2056565583 0.0106481165 0.1455072612 -0.0508008897 -0.1519782096 0.0266436059 0.0657815114 0.0605018884 -0.0318899639 -0.0758711994 0.2058726400 0.1652763933 -0.1813079417 0.0994561315 -0.1028154120 0.1572523564 -0.2604105473 0.0198362395 -0.3047916293 0.1431906223 -0.1040939167 0.0312704109 0.1283416003 0.1207272410 0.1684161127 -0.0026487834 0.0411393866 0.3581366241 -0.1991270036 -0.4523099065 -0.1669926047 0.0406698547 -0.0466507003 0.0061321543 0.1033646315 + 0.0962234735 0.1685899645 0.1822200865 0.1538205296 -0.0558282584 0.1844846308 -0.0292548165 0.1220852733 -0.0423693992 -0.0003878183 0.0154785411 -0.3811898232 -0.0458817221 0.0068311067 -0.1602355689 0.0466795340 0.0218561571 -0.0687931478 -0.1553969681 0.1020316482 0.2277569920 0.1808620393 0.0577450134 -0.0352253765 -0.0948149562 -0.0456437021 0.2611003220 -0.0206174050 0.0519294292 -0.0605326705 -0.3110633790 0.1254337281 0.4760060310 -0.0738868341 0.3109250963 0.1379290372 + -0.0490867011 -0.2205537856 -0.0508352816 0.0577448867 -0.0790255442 0.0499165244 0.0180350058 -0.1067801490 0.0847704038 0.5612118244 0.1743686050 0.0162445232 -0.3666506708 0.0301398207 -0.0070977714 -0.0464286692 -0.1143564880 0.0178455953 -0.0620715283 0.1347611099 -0.0479794703 0.0168384816 -0.0506477691 0.1411809623 -0.0035322020 0.0257597696 0.1160409376 -0.1535292715 0.1163110584 0.0704148114 -0.1885488927 0.0925666839 0.0954708531 0.3931201398 -0.3220751584 0.0632707477 + 0.0122603998 0.1114120036 0.0557601564 -0.0317054354 0.0480776988 -0.0903210044 0.0078155342 0.1253697723 -0.0440352932 0.0196105763 0.3909061849 0.1199010983 0.1488123685 0.0362919904 0.0731542856 -0.0664216280 0.0650821924 -0.0278980825 0.0775393322 -0.0335631371 -0.1041010097 -0.0234105829 -0.0012736983 0.0220801048 0.0056676557 -0.0849590078 -0.1165497899 -0.0804976672 0.0467915758 -0.0983086899 0.1567831039 0.0190335158 -0.0565100573 0.5034879446 0.4740294516 0.4298912883 + -0.0037918258 -0.3166097999 -0.1723117381 0.0362541005 0.0345088802 0.1973016262 -0.0077323504 -0.3070164621 0.2966904938 -0.3115707040 0.2597662210 -0.1926273853 -0.1296769381 0.1372960657 -0.0828024372 -0.0161769204 0.0836938620 0.1041713879 0.0349239632 -0.0892921910 -0.0483713634 0.0631724671 0.0146737266 -0.0315750204 0.0433125868 0.0461256281 0.0433526523 0.0230776537 0.0536411740 -0.0967682675 0.1608509570 -0.1785002947 0.0815036371 -0.2059147954 -0.1425377578 0.4706233740 + 0.0396235846 0.1059504822 0.0150647545 -0.0928744152 0.1558589041 -0.0960361511 0.0064751846 0.3151701093 -0.2774806619 -0.0898476690 -0.1632325202 -0.1060661972 0.0529618077 0.2583278120 -0.1272346228 -0.1054538563 0.1379968077 0.0780622661 0.0048608254 0.1178955063 0.1504602432 -0.1094022617 0.0726503134 0.0231349021 0.0141859530 -0.2381775975 -0.1202401519 0.2422870994 0.0769496039 0.1065277085 -0.0932057053 -0.2007680684 0.0537369102 0.1707278937 -0.4652236104 0.3183539808 + -0.0295227151 -0.0614063963 -0.1084607318 0.0388087630 -0.1535164267 -0.0596667305 0.0477641933 0.5482348204 0.1326045692 -0.1860647947 0.3459784389 -0.1255793422 -0.0371747948 -0.0041297399 0.0365139246 0.0373678282 -0.0397448689 0.1139490902 0.0128879696 -0.0735306293 -0.0551533401 0.0867520571 -0.0899181068 -0.0181381516 -0.0124207754 -0.0475071035 0.1851563901 0.0244553369 0.1375900656 -0.2768158019 0.1777062565 -0.1756671667 0.1170190424 0.1231365874 -0.1570594162 -0.4151892662 + 0.0069332216 0.0233022701 0.0231027026 -0.0150853274 0.0195660237 -0.0098501025 0.9626339078 -0.1122514606 -0.1926022619 -0.0493766293 0.0637515709 -0.0476384573 -0.0066359187 -0.0394283049 -0.0091484636 0.0287480447 -0.0479422882 -0.0217609257 -0.0301152412 -0.0333705395 0.0046506207 0.0041666743 -0.0118440455 0.0218822230 0.0257040989 0.0197908245 0.0015174265 -0.0338557065 0.0165846255 0.0050449288 0.0189024024 0.0077903625 0.0376430713 -0.0181977842 -0.0200145394 -0.0029525198 diff --git a/tests/input_files/protein_cvs/test.in b/tests/input_files/protein_cvs/test.in new file mode 100644 index 000000000..1ec6505d6 --- /dev/null +++ b/tests/input_files/protein_cvs/test.in @@ -0,0 +1,19 @@ +colvarsTrajFrequency 1 +colvarsRestartFrequency 10 +indexFile index.ndx + +colvar { + name alpha + alpha { + prefix prot_ + } +} + +colvar { + name dihedPC + dihedralPC { + prefix prot_ + vectorFile eigenvectors-localmin + vectorNumber 2 + } +} From 2a6611eaa5a6acb69afb49ed093e20fb5e0b145c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20H=C3=A9nin?= Date: Thu, 7 Nov 2024 18:41:29 +0100 Subject: [PATCH 4/7] Gromacs regtest for protein CVCs --- .../000_protein_cvs/AutoDiff/test.colvars.out | 257 +++++++++++++++++ .../AutoDiff/test.colvars.state.stripped | 15 + .../AutoDiff/test.colvars.traj | 22 ++ .../AutoDiff/test.restart.colvars.out | 262 ++++++++++++++++++ .../test.restart.colvars.state.stripped | 15 + .../AutoDiff/test.restart.colvars.traj | 22 ++ .../000_protein_cvs/gromacs-version.txt | 0 gromacs/tests/library/000_protein_cvs/test.in | 19 ++ gromacs/tests/library/Common/da.ndx | 16 ++ 9 files changed, 628 insertions(+) create mode 100644 gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.out create mode 100644 gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.state.stripped create mode 100644 gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.traj create mode 100644 gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.out create mode 100644 gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.state.stripped create mode 100644 gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.traj create mode 100644 gromacs/tests/library/000_protein_cvs/gromacs-version.txt create mode 100644 gromacs/tests/library/000_protein_cvs/test.in diff --git a/gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.out b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.out new file mode 100644 index 000000000..115691b2f --- /dev/null +++ b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.out @@ -0,0 +1,257 @@ +colvars: ---------------------------------------------------------------------- +colvars: Please cite Fiorin et al, Mol Phys 2013: +colvars: https://doi.org/10.1080/00268976.2013.813594 +colvars: as well as all other papers listed below for individual features used. +colvars: This version was built with the C++11 standard or higher. +colvars: Summary of compile-time features available in this build: +colvars: - SMP parallelism: enabled (num. threads = 2) +colvars: - Multiple replicas: not available +colvars: - Lepton custom functions: available +colvars: - Tcl interpreter: not available +colvars: ---------------------------------------------------------------------- +colvars: Start colvars Initialization. +colvars: ---------------------------------------------------------------------- +colvars: Reading new configuration: +colvars: # units = "" [default] +colvars: # indexFile = "index.ndx" +colvars: The following index groups are currently defined: +colvars: Protein (104 atoms) +colvars: Protein_noH (51 atoms) +colvars: Protein_Backbone (40 atoms) +colvars: Protein_C-alpha (10 atoms) +colvars: RMSD_atoms (10 atoms) +colvars: Protein_C-alpha_1_2 (2 atoms) +colvars: Protein_C-alpha_9_10 (2 atoms) +colvars: Protein_C-alpha_1 (1 atoms) +colvars: group1 (4 atoms) +colvars: Protein_C-alpha_2 (1 atoms) +colvars: group2 (4 atoms) +colvars: Protein_C-alpha_3 (1 atoms) +colvars: group3 (4 atoms) +colvars: Protein_C-alpha_4 (1 atoms) +colvars: group4 (4 atoms) +colvars: Protein_C-alpha_5 (1 atoms) +colvars: group5 (4 atoms) +colvars: Protein_C-alpha_6 (1 atoms) +colvars: group6 (4 atoms) +colvars: Protein_C-alpha_7 (1 atoms) +colvars: group7 (4 atoms) +colvars: Protein_C-alpha_8 (1 atoms) +colvars: group8 (4 atoms) +colvars: Protein_C-alpha_9 (1 atoms) +colvars: group9 (4 atoms) +colvars: Protein_C-alpha_10 (1 atoms) +colvars: group10 (4 atoms) +colvars: heavy_atoms (51 atoms) +colvars: prot_N (10 atoms) +colvars: prot_CA (10 atoms) +colvars: prot_C (10 atoms) +colvars: prot_O (10 atoms) +colvars: # smp = on [default] +colvars: # colvarsTrajFrequency = 1 +colvars: # colvarsRestartFrequency = 10 +colvars: # scriptedColvarForces = off [default] +colvars: # scriptingAfterBiases = off [default] +colvars: # defaultInputStateFile = "" [default] +colvars: ---------------------------------------------------------------------- +colvars: Initializing a new collective variable. +colvars: # name = "alpha" +colvars: Initializing a new "alpha" component. +colvars: # name = "" [default] +colvars: # componentCoeff = 1 [default] +colvars: # componentExp = 1 [default] +colvars: # period = 0 [default] +colvars: # wrapAround = 0 [default] +colvars: # forceNoPBC = off [default] +colvars: # scalable = on [default] +colvars: # prefix = "prot_" +colvars: # hBondCoeff = 0.5 [default] +colvars: # angleRef = 88 [default] +colvars: # angleTol = 15 [default] +colvars: # hBondCutoff = 0.33 [default] +colvars: # hBondExpNumer = 6 [default] +colvars: # hBondExpDenom = 8 [default] +colvars: All components initialized. +colvars: # timeStepFactor = 1 [default] +colvars: # width = 1 [default] +colvars: # lowerBoundary = 0 [default] +colvars: # upperBoundary = 1 [default] +colvars: # hardLowerBoundary = off [default] +colvars: # hardUpperBoundary = off [default] +colvars: # expandBoundaries = off [default] +colvars: # extendedLagrangian = off [default] +colvars: # outputValue = on [default] +colvars: # outputVelocity = off [default] +colvars: # outputTotalForce = off [default] +colvars: # outputAppliedForce = off [default] +colvars: # subtractAppliedForce = off [default] +colvars: # runAve = off [default] +colvars: # corrFunc = off [default] +colvars: ---------------------------------------------------------------------- +colvars: Initializing a new collective variable. +colvars: # name = "dihedPC" +colvars: Initializing a new "dihedralPC" component. +colvars: Warning: cannot cite unknown feature "dihedPC colvar component" +colvars: # name = "" [default] +colvars: # componentCoeff = 1 [default] +colvars: # componentExp = 1 [default] +colvars: # period = 0 [default] +colvars: # wrapAround = 0 [default] +colvars: # forceNoPBC = off [default] +colvars: # scalable = on [default] +colvars: # prefix = "prot_" +colvars: # vectorFile = "../Common/eigenvectors-localmin" +colvars: # vectorNumber = 2 +colvars: All components initialized. +colvars: # timeStepFactor = 1 [default] +colvars: # width = 1 [default] +colvars: # lowerBoundary = 0 [default] +colvars: # upperBoundary = 1 [default] +colvars: # hardLowerBoundary = off [default] +colvars: # hardUpperBoundary = off [default] +colvars: # expandBoundaries = off [default] +colvars: # extendedLagrangian = off [default] +colvars: # outputValue = on [default] +colvars: # outputVelocity = off [default] +colvars: # outputTotalForce = off [default] +colvars: # outputAppliedForce = off [default] +colvars: # subtractAppliedForce = off [default] +colvars: # runAve = off [default] +colvars: # corrFunc = off [default] +colvars: ---------------------------------------------------------------------- +colvars: Collective variables initialized, 2 in total. +colvars: No collective variables biases were defined. +colvars: ---------------------------------------------------------------------- +colvars: Collective variables module (re)initialized. +colvars: ---------------------------------------------------------------------- +colvars: Current simulation parameters: initial step = 0, integration timestep = 1 +colvars: Updating atomic parameters (masses, charges, etc). +colvars: Re-initialized atom group for variable "alpha":0/0. 1 atoms: total mass = 12.011, total charge = -0.1. +colvars: Re-initialized atom group for variable "alpha":0/1. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/2. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/3. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/4. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/5. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/6. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/7. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/8. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/9. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/10. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/11. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/12. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/13. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/14. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/15. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/16. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/17. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/18. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/19. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/20. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/21. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/22. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/23. 1 atoms: total mass = 1.008, total charge = 0.09. +colvars: Re-initialized atom group for variable "alpha":0/24. 2 atoms: total mass = 30.006, total charge = -0.98. +colvars: Re-initialized atom group for variable "alpha":0/25. 2 atoms: total mass = 30.006, total charge = -0.98. +colvars: Re-initialized atom group for variable "alpha":0/26. 2 atoms: total mass = 30.006, total charge = -0.98. +colvars: Re-initialized atom group for variable "alpha":0/27. 2 atoms: total mass = 30.006, total charge = -0.98. +colvars: Re-initialized atom group for variable "alpha":0/28. 2 atoms: total mass = 30.006, total charge = -0.98. +colvars: Re-initialized atom group for variable "alpha":0/29. 2 atoms: total mass = 17.007, total charge = -0.42. +colvars: Re-initialized atom group for variable "dihedPC":0/0. 1 atoms: total mass = 14.007, total charge = -0.62. +colvars: Re-initialized atom group for variable "dihedPC":0/1. 1 atoms: total mass = 12.011, total charge = -0.1. +colvars: Re-initialized atom group for variable "dihedPC":0/2. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/3. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/4. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/5. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/6. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/7. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/8. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/9. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/10. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/11. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/12. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/13. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/14. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/15. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/16. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/17. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/18. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/19. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/20. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/21. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/22. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/23. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/24. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/25. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/26. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/27. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/28. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/29. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/30. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/31. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/32. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/33. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/34. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/35. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/36. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/37. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/38. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/39. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/40. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/41. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/42. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/43. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/44. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/45. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/46. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/47. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/48. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/49. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/50. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/51. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/52. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/53. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/54. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/55. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/56. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/57. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/58. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/59. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/60. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/61. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/62. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/63. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/64. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/65. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/66. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/67. 1 atoms: total mass = 1.008, total charge = 0.09. +colvars: Re-initialized atom group for variable "dihedPC":0/68. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/69. 1 atoms: total mass = 1.008, total charge = 0.09. +colvars: Re-initialized atom group for variable "dihedPC":0/70. 1 atoms: total mass = 1.008, total charge = 0.09. +colvars: Re-initialized atom group for variable "dihedPC":0/71. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: +colvars: SUMMARY OF COLVARS FEATURES USED SO FAR AND THEIR CITATIONS: +colvars: +colvars: - GROMACS engine: +colvars: Abraham2015 https://doi.org/10.1016/j.softx.2015.06.001 +colvars: +colvars: - Colvars module: +colvars: - Optimal rotation via flexible fitting: +colvars: - alpha colvar component: +colvars: - angle colvar component: +colvars: - dihedral colvar component: +colvars: - hBond colvar component: +colvars: Fiorin2013 https://doi.org/10.1080/00268976.2013.813594 +colvars: +colvars: - Colvars-GROMACS interface: +colvars: n/a +colvars: +colvars: The final output state file will be "test.colvars.state". +colvars: ---------------------------------------------------------------------- +colvars: End colvars Initialization. +colvars: +colvars: Synchronizing (emptying the buffer of) trajectory file "test.colvars.traj". +colvars: Synchronizing (emptying the buffer of) trajectory file "test.colvars.traj". +colvars: Saving collective variables state to "test.colvars.state". +colvars: Synchronizing (emptying the buffer of) trajectory file "test.colvars.traj". +colvars: Saving collective variables state to "test.colvars.state". +colvars: Saving collective variables state to "test.colvars.state". diff --git a/gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.state.stripped new file mode 100644 index 000000000..d8185b40b --- /dev/null +++ b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.state.stripped @@ -0,0 +1,15 @@ +configuration { + step 20 + dt 1.000000e+00 +} + +colvar { + name alpha + x 0.83568207772304 +} + +colvar { + name dihedPC + x -2.113966902052 +} + diff --git a/gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.traj b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.traj new file mode 100644 index 000000000..c15e0285f --- /dev/null +++ b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.colvars.traj @@ -0,0 +1,22 @@ +# step alpha dihedPC + 0 8.36517512054205e-01 -2.12766834807868e+00 + 1 8.36405766419679e-01 -2.12968264113607e+00 + 2 8.36303205720121e-01 -2.13167960318568e+00 + 3 8.36202390746981e-01 -2.13367244075261e+00 + 4 8.36092498129416e-01 -2.13570932765782e+00 + 5 8.35961382156574e-01 -2.13784366106170e+00 + 6 8.35795704781796e-01 -2.14011033033341e+00 + 7 8.35588169487745e-01 -2.14250224138509e+00 + 8 8.35341240201779e-01 -2.14495118133642e+00 + 9 8.35075646652295e-01 -2.14731571085274e+00 + 10 8.34827777768729e-01 -2.14938810487336e+00 + 11 8.34642161350716e-01 -2.15090786644107e+00 + 12 8.34556653334053e-01 -2.15159686737947e+00 + 13 8.34590388102958e-01 -2.15119434312355e+00 + 14 8.34737327530330e-01 -2.14950028143585e+00 + 15 8.34967741024785e-01 -2.14640394254280e+00 + 16 8.35236233864300e-01 -2.14191002556526e+00 + 17 8.35490078600560e-01 -2.13614501779765e+00 + 18 8.35676693813091e-01 -2.12934033057215e+00 + 19 8.35752538813196e-01 -2.12182504079626e+00 + 20 8.35682077723043e-01 -2.11396690205205e+00 diff --git a/gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.out b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.out new file mode 100644 index 000000000..677f7f642 --- /dev/null +++ b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.out @@ -0,0 +1,262 @@ +colvars: ---------------------------------------------------------------------- +colvars: Please cite Fiorin et al, Mol Phys 2013: +colvars: https://doi.org/10.1080/00268976.2013.813594 +colvars: as well as all other papers listed below for individual features used. +colvars: This version was built with the C++11 standard or higher. +colvars: Summary of compile-time features available in this build: +colvars: - SMP parallelism: enabled (num. threads = 2) +colvars: - Multiple replicas: not available +colvars: - Lepton custom functions: available +colvars: - Tcl interpreter: not available +colvars: ---------------------------------------------------------------------- +colvars: Start colvars Initialization. +colvars: ---------------------------------------------------------------------- +colvars: Reading new configuration: +colvars: # units = "" [default] +colvars: # indexFile = "index.ndx" +colvars: The following index groups are currently defined: +colvars: Protein (104 atoms) +colvars: Protein_noH (51 atoms) +colvars: Protein_Backbone (40 atoms) +colvars: Protein_C-alpha (10 atoms) +colvars: RMSD_atoms (10 atoms) +colvars: Protein_C-alpha_1_2 (2 atoms) +colvars: Protein_C-alpha_9_10 (2 atoms) +colvars: Protein_C-alpha_1 (1 atoms) +colvars: group1 (4 atoms) +colvars: Protein_C-alpha_2 (1 atoms) +colvars: group2 (4 atoms) +colvars: Protein_C-alpha_3 (1 atoms) +colvars: group3 (4 atoms) +colvars: Protein_C-alpha_4 (1 atoms) +colvars: group4 (4 atoms) +colvars: Protein_C-alpha_5 (1 atoms) +colvars: group5 (4 atoms) +colvars: Protein_C-alpha_6 (1 atoms) +colvars: group6 (4 atoms) +colvars: Protein_C-alpha_7 (1 atoms) +colvars: group7 (4 atoms) +colvars: Protein_C-alpha_8 (1 atoms) +colvars: group8 (4 atoms) +colvars: Protein_C-alpha_9 (1 atoms) +colvars: group9 (4 atoms) +colvars: Protein_C-alpha_10 (1 atoms) +colvars: group10 (4 atoms) +colvars: heavy_atoms (51 atoms) +colvars: prot_N (10 atoms) +colvars: prot_CA (10 atoms) +colvars: prot_C (10 atoms) +colvars: prot_O (10 atoms) +colvars: # smp = on [default] +colvars: # colvarsTrajFrequency = 1 +colvars: # colvarsRestartFrequency = 10 +colvars: # scriptedColvarForces = off [default] +colvars: # scriptingAfterBiases = off [default] +colvars: # defaultInputStateFile = "" [default] +colvars: ---------------------------------------------------------------------- +colvars: Initializing a new collective variable. +colvars: # name = "alpha" +colvars: Initializing a new "alpha" component. +colvars: # name = "" [default] +colvars: # componentCoeff = 1 [default] +colvars: # componentExp = 1 [default] +colvars: # period = 0 [default] +colvars: # wrapAround = 0 [default] +colvars: # forceNoPBC = off [default] +colvars: # scalable = on [default] +colvars: # prefix = "prot_" +colvars: # hBondCoeff = 0.5 [default] +colvars: # angleRef = 88 [default] +colvars: # angleTol = 15 [default] +colvars: # hBondCutoff = 0.33 [default] +colvars: # hBondExpNumer = 6 [default] +colvars: # hBondExpDenom = 8 [default] +colvars: All components initialized. +colvars: # timeStepFactor = 1 [default] +colvars: # width = 1 [default] +colvars: # lowerBoundary = 0 [default] +colvars: # upperBoundary = 1 [default] +colvars: # hardLowerBoundary = off [default] +colvars: # hardUpperBoundary = off [default] +colvars: # expandBoundaries = off [default] +colvars: # extendedLagrangian = off [default] +colvars: # outputValue = on [default] +colvars: # outputVelocity = off [default] +colvars: # outputTotalForce = off [default] +colvars: # outputAppliedForce = off [default] +colvars: # subtractAppliedForce = off [default] +colvars: # runAve = off [default] +colvars: # corrFunc = off [default] +colvars: ---------------------------------------------------------------------- +colvars: Initializing a new collective variable. +colvars: # name = "dihedPC" +colvars: Initializing a new "dihedralPC" component. +colvars: Warning: cannot cite unknown feature "dihedPC colvar component" +colvars: # name = "" [default] +colvars: # componentCoeff = 1 [default] +colvars: # componentExp = 1 [default] +colvars: # period = 0 [default] +colvars: # wrapAround = 0 [default] +colvars: # forceNoPBC = off [default] +colvars: # scalable = on [default] +colvars: # prefix = "prot_" +colvars: # vectorFile = "../Common/eigenvectors-localmin" +colvars: # vectorNumber = 2 +colvars: All components initialized. +colvars: # timeStepFactor = 1 [default] +colvars: # width = 1 [default] +colvars: # lowerBoundary = 0 [default] +colvars: # upperBoundary = 1 [default] +colvars: # hardLowerBoundary = off [default] +colvars: # hardUpperBoundary = off [default] +colvars: # expandBoundaries = off [default] +colvars: # extendedLagrangian = off [default] +colvars: # outputValue = on [default] +colvars: # outputVelocity = off [default] +colvars: # outputTotalForce = off [default] +colvars: # outputAppliedForce = off [default] +colvars: # subtractAppliedForce = off [default] +colvars: # runAve = off [default] +colvars: # corrFunc = off [default] +colvars: ---------------------------------------------------------------------- +colvars: Collective variables initialized, 2 in total. +colvars: No collective variables biases were defined. +colvars: ---------------------------------------------------------------------- +colvars: Collective variables module (re)initialized. +colvars: ---------------------------------------------------------------------- +colvars: Current simulation parameters: initial step = 0, integration timestep = 1 +colvars: Updating atomic parameters (masses, charges, etc). +colvars: Re-initialized atom group for variable "alpha":0/0. 1 atoms: total mass = 12.011, total charge = -0.1. +colvars: Re-initialized atom group for variable "alpha":0/1. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/2. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/3. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/4. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/5. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/6. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/7. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/8. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/9. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/10. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/11. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/12. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/13. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/14. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/15. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/16. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/17. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/18. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/19. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/20. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/21. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/22. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "alpha":0/23. 1 atoms: total mass = 1.008, total charge = 0.09. +colvars: Re-initialized atom group for variable "alpha":0/24. 2 atoms: total mass = 30.006, total charge = -0.98. +colvars: Re-initialized atom group for variable "alpha":0/25. 2 atoms: total mass = 30.006, total charge = -0.98. +colvars: Re-initialized atom group for variable "alpha":0/26. 2 atoms: total mass = 30.006, total charge = -0.98. +colvars: Re-initialized atom group for variable "alpha":0/27. 2 atoms: total mass = 30.006, total charge = -0.98. +colvars: Re-initialized atom group for variable "alpha":0/28. 2 atoms: total mass = 30.006, total charge = -0.98. +colvars: Re-initialized atom group for variable "alpha":0/29. 2 atoms: total mass = 17.007, total charge = -0.42. +colvars: Re-initialized atom group for variable "dihedPC":0/0. 1 atoms: total mass = 14.007, total charge = -0.62. +colvars: Re-initialized atom group for variable "dihedPC":0/1. 1 atoms: total mass = 12.011, total charge = -0.1. +colvars: Re-initialized atom group for variable "dihedPC":0/2. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/3. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/4. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/5. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/6. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/7. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/8. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/9. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/10. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/11. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/12. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/13. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/14. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/15. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/16. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/17. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/18. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/19. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/20. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/21. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/22. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/23. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/24. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/25. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/26. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/27. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/28. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/29. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/30. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/31. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/32. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/33. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/34. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/35. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/36. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/37. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/38. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/39. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/40. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/41. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/42. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/43. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/44. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/45. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/46. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/47. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/48. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/49. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/50. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/51. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/52. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/53. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/54. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/55. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/56. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/57. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/58. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/59. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/60. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/61. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/62. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/63. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/64. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: Re-initialized atom group for variable "dihedPC":0/65. 1 atoms: total mass = 12.011, total charge = 0.07. +colvars: Re-initialized atom group for variable "dihedPC":0/66. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/67. 1 atoms: total mass = 1.008, total charge = 0.09. +colvars: Re-initialized atom group for variable "dihedPC":0/68. 1 atoms: total mass = 12.011, total charge = 0.51. +colvars: Re-initialized atom group for variable "dihedPC":0/69. 1 atoms: total mass = 1.008, total charge = 0.09. +colvars: Re-initialized atom group for variable "dihedPC":0/70. 1 atoms: total mass = 1.008, total charge = 0.09. +colvars: Re-initialized atom group for variable "dihedPC":0/71. 1 atoms: total mass = 14.007, total charge = -0.47. +colvars: +colvars: SUMMARY OF COLVARS FEATURES USED SO FAR AND THEIR CITATIONS: +colvars: +colvars: - GROMACS engine: +colvars: Abraham2015 https://doi.org/10.1016/j.softx.2015.06.001 +colvars: +colvars: - Colvars module: +colvars: - Optimal rotation via flexible fitting: +colvars: - alpha colvar component: +colvars: - angle colvar component: +colvars: - dihedral colvar component: +colvars: - hBond colvar component: +colvars: Fiorin2013 https://doi.org/10.1080/00268976.2013.813594 +colvars: +colvars: - Colvars-GROMACS interface: +colvars: n/a +colvars: +colvars: The final output state file will be "test.restart.part0002.colvars.state". +colvars: ---------------------------------------------------------------------- +colvars: Loading state from unformatted memory. +colvars: Restarting collective variable "alpha" from value: 0.835682 +colvars: Restarting collective variable "dihedPC" from value: -2.11397 +colvars: ---------------------------------------------------------------------- +colvars: ---------------------------------------------------------------------- +colvars: End colvars Initialization. +colvars: +colvars: Synchronizing (emptying the buffer of) trajectory file "test.restart.part0002.colvars.traj". +colvars: Synchronizing (emptying the buffer of) trajectory file "test.restart.part0002.colvars.traj". +colvars: Saving collective variables state to "test.restart.part0002.colvars.state". +colvars: Synchronizing (emptying the buffer of) trajectory file "test.restart.part0002.colvars.traj". +colvars: Saving collective variables state to "test.restart.part0002.colvars.state". +colvars: Saving collective variables state to "test.restart.part0002.colvars.state". diff --git a/gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.state.stripped b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.state.stripped new file mode 100644 index 000000000..58daa2933 --- /dev/null +++ b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.state.stripped @@ -0,0 +1,15 @@ +configuration { + step 40 + dt 1.000000e+00 +} + +colvar { + name alpha + x 0.82442460983544 +} + +colvar { + name dihedPC + x -2.1016437078475 +} + diff --git a/gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.traj b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.traj new file mode 100644 index 000000000..3665c81f8 --- /dev/null +++ b/gromacs/tests/library/000_protein_cvs/AutoDiff/test.restart.colvars.traj @@ -0,0 +1,22 @@ +# step alpha dihedPC + 20 8.35682077723043e-01 -2.11396690205205e+00 + 21 8.35441124673917e-01 -2.10617838692520e+00 + 22 8.35014831862730e-01 -2.09884629089077e+00 + 23 8.34398599569839e-01 -2.09231367111144e+00 + 24 8.33598254528628e-01 -2.08684303411423e+00 + 25 8.32631200091484e-01 -2.08259888531193e+00 + 26 8.31528301383077e-01 -2.07963996484119e+00 + 27 8.30333382364812e-01 -2.07792787916857e+00 + 28 8.29100936034442e-01 -2.07733129351082e+00 + 29 8.27893888378592e-01 -2.07769032827990e+00 + 30 8.26775153938171e-01 -2.07880518634779e+00 + 31 8.25801736106288e-01 -2.08047777046639e+00 + 32 8.25016983700980e-01 -2.08254008462229e+00 + 33 8.24443967384918e-01 -2.08485038213689e+00 + 34 8.24082490205009e-01 -2.08730459823019e+00 + 35 8.23909700657452e-01 -2.08983103136512e+00 + 36 8.23886385091636e-01 -2.09237933029551e+00 + 37 8.23965055709031e-01 -2.09490380410388e+00 + 38 8.24101102187003e-01 -2.09734725825180e+00 + 39 8.24261235505411e-01 -2.09962897698378e+00 + 40 8.24424609835438e-01 -2.10164370784745e+00 diff --git a/gromacs/tests/library/000_protein_cvs/gromacs-version.txt b/gromacs/tests/library/000_protein_cvs/gromacs-version.txt new file mode 100644 index 000000000..e69de29bb diff --git a/gromacs/tests/library/000_protein_cvs/test.in b/gromacs/tests/library/000_protein_cvs/test.in new file mode 100644 index 000000000..c99a2289d --- /dev/null +++ b/gromacs/tests/library/000_protein_cvs/test.in @@ -0,0 +1,19 @@ +colvarsTrajFrequency 1 +colvarsRestartFrequency 10 +indexFile index.ndx + +colvar { + name alpha + alpha { + prefix prot_ + } +} + +colvar { + name dihedPC + dihedralPC { + prefix prot_ + vectorFile ../Common/eigenvectors-localmin + vectorNumber 2 + } +} \ No newline at end of file diff --git a/gromacs/tests/library/Common/da.ndx b/gromacs/tests/library/Common/da.ndx index 9becc1f48..9f86a69ce 100644 --- a/gromacs/tests/library/Common/da.ndx +++ b/gromacs/tests/library/Common/da.ndx @@ -71,3 +71,19 @@ 66 70 71 72 74 76 80 81 82 84 86 90 91 92 94 96 100 101 104 +[ prot_N ] + 1 12 22 32 42 52 62 72 + 82 97 + +[ prot_CA ] + 4 14 24 34 44 54 64 74 + 84 99 + +[ prot_C ] + 10 20 30 40 50 60 70 80 + 90 92 + +[ prot_O ] + 11 21 31 41 51 61 71 81 + 91 93 + From 6359abc0ecabcf4d0dc7dbc77d59c161d6365593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20H=C3=A9nin?= Date: Thu, 7 Nov 2024 18:42:49 +0100 Subject: [PATCH 5/7] Update index group-based protein CVCs --- colvartools/write_index_group.tcl | 47 ++++++++++++++++++++++++++++--- doc/colvars-refman-main.tex | 40 ++++++++++++++++++++------ namd/tests/library/Common/da.ndx | 16 +++++++++++ src/colvar.cpp | 7 +---- src/colvarcomp_protein.cpp | 12 ++++---- tests/build_tests.sh | 2 ++ tests/input_files/index.ndx | 16 +++++++++++ 7 files changed, 116 insertions(+), 24 deletions(-) diff --git a/colvartools/write_index_group.tcl b/colvartools/write_index_group.tcl index d48e19b5a..c3e688d26 100644 --- a/colvartools/write_index_group.tcl +++ b/colvartools/write_index_group.tcl @@ -1,10 +1,11 @@ # Write a VMD selection into a GROMACS index file. -# 1st argument is either a Tcl file channel or a file name: in the latter -# case, content will be appended to that file. -# 2nd argument is an atom selection proc, as returned by the atomselect +# Parameters: +# 1- either a Tcl file channel or a file name: in the latter +# case, content will be appended to that file. +# 2- an atom selection proc, as returned by the atomselect # command. -# 3rd argument is the name of the group. +# 3- the name of the group. proc write_index_group { ndxfile sel name } { # Check that the name does not contain spaces or tabs @@ -43,3 +44,41 @@ proc write_index_group { ndxfile sel name } { close ${output} } } + +# Write a GROMACS index file suitable for computing the alpha-helix +# content of a helical segment + +# Parameters: +# 1- either a Tcl file channel or a file name: in the latter +# case, content will be appended to that file. +# 2- a selection text returning contiguous amino-acid residues +# 3- optional: molecule id (default: top) +# 4- optional: prefix for the group names (default: alpha_) + +proc write_alpha_groups { ndxfile seltext { mol top } { prefix alpha_ } } { + + foreach atomname { N CA O } { + set sel [atomselect $mol "($seltext) and name $atomname"] + write_index_group $ndxfile $sel "${prefix}${atomname}" + $sel delete + } +} + +# Write a GROMACS index file suitable for computing the dihedralPC +# projection of a peptide chain + +# Parameters: +# 1- either a Tcl file channel or a file name: in the latter +# case, content will be appended to that file. +# 2- a selection text returning contiguous amino-acid residues +# 3- optional: molecule id (default: top) +# 4- optional: prefix for the group names (default: alpha_) + +proc write_dihedralPC_groups { ndxfile seltext { mol top } { prefix dihed_ } } { + + foreach atomname { CA N C } { + set sel [atomselect $mol "($seltext) and name $atomname"] + write_index_group $ndxfile $sel "${prefix}${atomname}" + $sel delete + } +} \ No newline at end of file diff --git a/doc/colvars-refman-main.tex b/doc/colvars-refman-main.tex index 5ceb4dabb..30f7cea3b 100644 --- a/doc/colvars-refman-main.tex +++ b/doc/colvars-refman-main.tex @@ -2768,17 +2768,21 @@ \end{cvcoptions} -\cvnamebasedonly{ + \cvsubsec{Protein structure descriptors}{sec:cvc_protein} \cvsubsubsec{\texttt{alpha}: $\alpha$-helix content of a protein segment.}{sec:cvc_alpha} \labelkey{colvar|alpha} -The block \texttt{alpha~\{...\}} defines the -parameters to calculate the helical content of a segment of protein -residues. The $\alpha$-helical content across the $N+1$ residues -$N_{0}$ to $N_{0}+N$ is calculated by the formula: +The block \texttt{alpha~\{...\}} defines the parameters to calculate the helical content of a segment of +protein residues, as a tunable combination of an angle term between alpha carbon atoms, and a +1-4 hydrogen-bond term. +To create a colvar that computes the helical content of a protein with several, +non-contiguous helical segments, just define several \texttt{alpha} blocks inside a single \text{colvar} block, +and give them linear combination coefficients that sum to 1 (see \texttt{componentCoeff} in section \ref{sec:cvc_superp}). + +The $\alpha$-helical content across the $N+1$ residues $N_{0}$ to $N_{0}+N$ is calculated by the formula: \begin{eqnarray} \label{eq:colvars_alpha} { @@ -2840,8 +2844,26 @@ \mathrm{N}^{(n+4)}$ hydrogen bond is defined through a \texttt{hBond} colvar component on the same atoms. + \begin{cvcoptions} + \item % + \labelkey{colvar|alpha|prefix} + \keydef + {prefix}{% + \texttt{alpha}}{% + Prefix of atom groups to be used for computing the $\alpha$-helix content}{% + \texttt{alpha_}}{% + ``$<$Initial residue number$>$-$<$Final residue number$>$''}{% + Atoms involved in an alpha-helix component are based on groups defined within a + GROMACS-style index file specified with \refkey{indexFile}{Colvars-global|indexFile} in the global + Colvars configuration, i.e. outside of a \texttt{colvar {...}} block. + The group names must use a common prefix followed by atom names, e.g. \texttt{alpha\_N}, \texttt{alpha\_CA}, + and \texttt{alpha\_O} when using the default prefix \texttt{alpha\_}. + The CA group is only required when the angle term is enabled, that is when \texttt{hBondCoeff} is less than 1. + This option lets users set a different prefix, for example, when several $\alpha$-helical segments + must be tracked.} +\cvnamebasedonly{ \item % \labelkey{colvar|alpha|residueRange} \key @@ -2849,6 +2871,8 @@ \texttt{alpha}}{% Potential $\alpha$-helical residues}{% ``$<$Initial residue number$>$-$<$Final residue number$>$''}{% + Alternately, in some back-ends like NAMD and VMD, the atoms may be defined using their PSF segment name (segname) + and a range of residue numbers. This option specifies the range of residues on which this component should be defined. The Colvars module looks for the atoms within these residues named ``\texttt{CA}'', ``\texttt{N}'' @@ -2865,7 +2889,7 @@ This option sets the PSF segment identifier for the residues specified in \texttt{residueRange}. This option is only required when PSF topologies are used.} - +} % end of \cvnamebasedonly \item % \labelkey{colvar|alpha|hBondCoeff} @@ -2972,12 +2996,13 @@ and \texttt{psfSegID}) in addition to the following: \begin{cvcoptions} - +\cvnamebasedonly{ \item % \dupkey{residueRange}{\texttt{dihedralPC}}{colvar|alpha|residueRange}{\texttt{alpha} component} \item % \dupkey{psfSegID}{\texttt{dihedralPC}}{colvar|alpha|psfSegID}{\texttt{alpha} component} +} % end of \cvnamebasedonly \item % \key @@ -2998,7 +3023,6 @@ Number of the eigenvector to be used for this component.} \end{cvcoptions} -} % end of \cvnamebasedonly \cvalchlambdaonly{ diff --git a/namd/tests/library/Common/da.ndx b/namd/tests/library/Common/da.ndx index 0d57429af..f844f37c4 100644 --- a/namd/tests/library/Common/da.ndx +++ b/namd/tests/library/Common/da.ndx @@ -112,3 +112,19 @@ 82 84 86 90 91 92 93 94 97 99 101 +[ prot_N ] + 1 12 22 32 42 52 62 72 + 82 97 + +[ prot_CA ] + 4 14 24 34 44 54 64 74 + 84 99 + +[ prot_C ] + 10 20 30 40 50 60 70 80 + 90 92 + +[ prot_O ] + 11 21 31 41 51 61 71 81 + 91 93 + diff --git a/src/colvar.cpp b/src/colvar.cpp index 2ace3142b..6a6ac24cc 100644 --- a/src/colvar.cpp +++ b/src/colvar.cpp @@ -857,13 +857,8 @@ void colvar::define_component_types() add_component_type("dipole angle", "dipoleAngle"); add_component_type("dihedral", "dihedral"); add_component_type("hydrogen bond", "hBond"); - add_component_type("alpha helix", "alpha"); - - if (proxy->check_atom_name_selections_available() == COLVARS_OK) { - add_component_type("dihedral principal component", "dihedralPC"); - } - + add_component_type("dihedral principal component", "dihedralPC"); add_component_type("orientation", "orientation"); add_component_type("orientation angle", "orientationAngle"); add_component_type("orientation projection", "orientationProj"); diff --git a/src/colvarcomp_protein.cpp b/src/colvarcomp_protein.cpp index 26623bbc7..832005e2a 100644 --- a/src/colvarcomp_protein.cpp +++ b/src/colvarcomp_protein.cpp @@ -63,7 +63,7 @@ int colvar::alpha_angles::init(std::string const &conf) } else { b_use_index_groups = true; - get_keyval(conf, "prefix", prefix, "alpha"); + get_keyval(conf, "prefix", prefix, "alpha_"); // Not all groups are mandatory, parse silently group_CA.add_index_group(prefix + "CA", true); @@ -371,12 +371,12 @@ int colvar::dihedPC::init(std::string const &conf) } else { b_use_index_groups = true; - get_keyval(conf, "prefix", prefix, "dihed"); + get_keyval(conf, "prefix", prefix, "dihed_"); - // Not all groups are mandatory, parse silently - group_CA.add_index_group(prefix + "CA", true); - group_N.add_index_group(prefix + "N", true); - group_C.add_index_group(prefix + "C", true); + // All three groups are required + group_CA.add_index_group(prefix + "CA"); + group_N.add_index_group(prefix + "N"); + group_C.add_index_group(prefix + "C"); int na = group_CA.size(); int nn = group_N.size(); int nc = group_C.size(); diff --git a/tests/build_tests.sh b/tests/build_tests.sh index b6cc60a52..0485d6ac6 100755 --- a/tests/build_tests.sh +++ b/tests/build_tests.sh @@ -295,6 +295,8 @@ bias="harmonic-fixed-euler" create_test_dir ${colvar}_${bias} write_colvars_config ${colvar} ${bias} +create_test_dir protein_cvs +write_colvars_config protein_cvs # TODO uncomment this and the add two-dimensional regtests # # Generate two-variables versions of bias configurations diff --git a/tests/input_files/index.ndx b/tests/input_files/index.ndx index 0d57429af..f844f37c4 100644 --- a/tests/input_files/index.ndx +++ b/tests/input_files/index.ndx @@ -112,3 +112,19 @@ 82 84 86 90 91 92 93 94 97 99 101 +[ prot_N ] + 1 12 22 32 42 52 62 72 + 82 97 + +[ prot_CA ] + 4 14 24 34 44 54 64 74 + 84 99 + +[ prot_C ] + 10 20 30 40 50 60 70 80 + 90 92 + +[ prot_O ] + 11 21 31 41 51 61 71 81 + 91 93 + From 49b55cec605e742a33900dcdba9a053ec8af5874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20H=C3=A9nin?= Date: Thu, 7 Nov 2024 21:10:52 +0100 Subject: [PATCH 6/7] Doc fixes --- doc/colvars-refman-main.tex | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/doc/colvars-refman-main.tex b/doc/colvars-refman-main.tex index 30f7cea3b..a4c816623 100644 --- a/doc/colvars-refman-main.tex +++ b/doc/colvars-refman-main.tex @@ -2775,7 +2775,7 @@ \cvsubsubsec{\texttt{alpha}: $\alpha$-helix content of a protein segment.}{sec:cvc_alpha} \labelkey{colvar|alpha} -The block \texttt{alpha~\{...\}} defines the parameters to calculate the helical content of a segment of +The block \texttt{alpha~\{...\}} defines a measure of the helical content of a segment of protein residues, as a tunable combination of an angle term between alpha carbon atoms, and a 1-4 hydrogen-bond term. To create a colvar that computes the helical content of a protein with several, @@ -2852,11 +2852,11 @@ {prefix}{% \texttt{alpha}}{% Prefix of atom groups to be used for computing the $\alpha$-helix content}{% - \texttt{alpha_}}{% - ``$<$Initial residue number$>$-$<$Final residue number$>$''}{% + string}{% + \texttt{alpha\_}}{% Atoms involved in an alpha-helix component are based on groups defined within a GROMACS-style index file specified with \refkey{indexFile}{Colvars-global|indexFile} in the global - Colvars configuration, i.e. outside of a \texttt{colvar {...}} block. + Colvars configuration, i.e. outside of a \texttt{colvar} block. The group names must use a common prefix followed by atom names, e.g. \texttt{alpha\_N}, \texttt{alpha\_CA}, and \texttt{alpha\_O} when using the default prefix \texttt{alpha\_}. The CA group is only required when the angle term is enabled, that is when \texttt{hBondCoeff} is less than 1. @@ -2971,7 +2971,7 @@ \labelkey{colvar|dihedralPC} The block \texttt{dihedralPC~\{...\}} defines the -parameters to calculate the projection of backbone dihedral angles within +parameters of the projection of backbone dihedral angles within a protein segment onto a \emph{dihedral principal component}, following the formalism of dihedral principal component analysis (dPCA) proposed by Mu et al.\cite{Mu2005} and documented in detail by Altis et @@ -2991,12 +2991,25 @@ + k_{4n-1} \cos (\phi_{n+1}) + k_{4n} \sin(\phi_{n+1}) \end{equation} -\texttt{dihedralPC} expects the same parameters as the \texttt{alpha} -component for defining the relevant residues (\texttt{residueRange} -and \texttt{psfSegID}) in addition to the following: +The atoms involved in \texttt{dihedralPC} are defined by the same parameters as the \texttt{alpha} +component. \begin{cvcoptions} -\cvnamebasedonly{ + \item % + \labelkey{colvar|dihedralPC|prefix} + \keydef + {prefix}{% + \texttt{dihedralPC}}{% + Prefix of atom groups to be used for computing a dihedralPC projection}{% + string}{% + \texttt{dihed\_}}{% + Backbone atoms involved in a \texttt{dihedralPC} component are based on groups defined within a + GROMACS-style index file specified with \refkey{indexFile}{Colvars-global|indexFile} in the global + Colvars configuration, i.e. outside of a \texttt{colvar} block. + The group names must use a common prefix followed by atom names CA, N, and C, e.g. \texttt{dihed\_CA}, + \texttt{dihed\_N}, and \texttt{dihed\_C} when using the default prefix \texttt{dihed\_}.} + + \cvnamebasedonly{ \item % \dupkey{residueRange}{\texttt{dihedralPC}}{colvar|alpha|residueRange}{\texttt{alpha} component} From 2d3348903d389cddc527f6126d2657c663c4a468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20H=C3=A9nin?= Date: Fri, 8 Nov 2024 12:43:17 +0100 Subject: [PATCH 7/7] Small doc fixes --- doc/colvars-refman-main.tex | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/colvars-refman-main.tex b/doc/colvars-refman-main.tex index a4c816623..454070c72 100644 --- a/doc/colvars-refman-main.tex +++ b/doc/colvars-refman-main.tex @@ -1442,10 +1442,8 @@ \item \refkey{gyration}{colvar|gyration}: radius of gyration of a group of atoms; \item \refkey{inertia}{colvar|inertia}: moment of inertia of a group of atoms; \item \refkey{inertiaZ}{colvar|inertiaZ}: moment of inertia of a group of atoms around a chosen axis; -\cvnamebasedonly{ \item \refkey{alpha}{colvar|alpha}: $\alpha$-helix content of a protein segment. \item \refkey{dihedralPC}{colvar|dihedralPC}: projection of protein backbone dihedrals onto a dihedral principal component. -} \cvalchlambdaonly{ \item \refkey{alchLambda}{colvar|alchLambda}: alchemical lambda parameter (for controlling the back-end). \item \refkey{alchFlambda}{colvar|alchFlambda}: force along alchLambda. @@ -2871,7 +2869,7 @@ \texttt{alpha}}{% Potential $\alpha$-helical residues}{% ``$<$Initial residue number$>$-$<$Final residue number$>$''}{% - Alternately, in some back-ends like NAMD and VMD, the atoms may be defined using their PSF segment name (segname) + In some back-ends like NAMD and VMD, the atoms may be defined using their PSF segment name (segname) and a range of residue numbers. This option specifies the range of residues on which this component should be defined. The Colvars module looks for the @@ -7188,11 +7186,12 @@ dependence of the energy on $\lambda$ around $k_\lambda = 0$.} \item % - \key + \keydef {targetEquilSteps}{% \texttt{harmonic}}{% Number of steps discarded from TI estimate}{% positive integer}{% + 0}{% Defines the number of steps within each stage that are considered equilibration and discarded from the restraint free energy derivative estimate reported reported in the output.}