diff --git a/regtest/metainference/rt-bayesgje/BIAS.0.reference b/regtest/metainference/rt-bayesgje/BIAS.0.reference index 21fbec9cf1f9762d6c316bce1fde9014d40ae850..6fc72ca14d2c5ba57f0b2b4a70065f9f356f5ea2 100644 --- a/regtest/metainference/rt-bayesgje/BIAS.0.reference +++ b/regtest/metainference/rt-bayesgje/BIAS.0.reference @@ -1,13 +1,13 @@ -#! FIELDS time spe.bias - 0.000000 1244002.534551 - 0.050000 1288842.753558 - 0.100000 1321699.684336 - 0.150000 1339686.831180 - 0.200000 1358271.017337 - 0.250000 1378588.588301 - 0.300000 1299866.498549 - 0.350000 1298423.418453 - 0.400000 1316881.723172 - 0.450000 1250165.916748 - 0.500000 1272485.304082 - 0.550000 1253390.266344 +#! FIELDS time spe.bias spe.scale spe.accept spe.sigma_0 spe.sigma_1 spe.sigma_2 spe.sigma_3 + 0.000000 1244002.534551 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.005000 1288842.753558 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.010000 1321699.684336 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.015000 1339686.831180 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.020000 1358271.017337 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.025000 1378588.588301 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.030000 1299866.498549 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.035000 1298423.418453 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.040000 1316881.723172 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.045000 1250165.916748 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.050000 1272485.304082 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.055000 1253390.266344 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 diff --git a/regtest/metainference/rt-bayesgje/BIAS.1.reference b/regtest/metainference/rt-bayesgje/BIAS.1.reference index 21fbec9cf1f9762d6c316bce1fde9014d40ae850..6fc72ca14d2c5ba57f0b2b4a70065f9f356f5ea2 100644 --- a/regtest/metainference/rt-bayesgje/BIAS.1.reference +++ b/regtest/metainference/rt-bayesgje/BIAS.1.reference @@ -1,13 +1,13 @@ -#! FIELDS time spe.bias - 0.000000 1244002.534551 - 0.050000 1288842.753558 - 0.100000 1321699.684336 - 0.150000 1339686.831180 - 0.200000 1358271.017337 - 0.250000 1378588.588301 - 0.300000 1299866.498549 - 0.350000 1298423.418453 - 0.400000 1316881.723172 - 0.450000 1250165.916748 - 0.500000 1272485.304082 - 0.550000 1253390.266344 +#! FIELDS time spe.bias spe.scale spe.accept spe.sigma_0 spe.sigma_1 spe.sigma_2 spe.sigma_3 + 0.000000 1244002.534551 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.005000 1288842.753558 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.010000 1321699.684336 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.015000 1339686.831180 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.020000 1358271.017337 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.025000 1378588.588301 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.030000 1299866.498549 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.035000 1298423.418453 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.040000 1316881.723172 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.045000 1250165.916748 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.050000 1272485.304082 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 + 0.055000 1253390.266344 1.000000 1.000000 0.010000 0.010000 0.010000 0.010000 diff --git a/regtest/metainference/rt-bayesgje/config b/regtest/metainference/rt-bayesgje/config index 08ecbfeed07a073c453a2cd96787f112d5908a24..f502c0040fbb0bc5739b5082d2330ce9ceb9dbfa 100644 --- a/regtest/metainference/rt-bayesgje/config +++ b/regtest/metainference/rt-bayesgje/config @@ -1,3 +1,3 @@ mpiprocs=4 type=driver -arg="--plumed plumed.dat --trajectory-stride 10 --timestep 0.005 --ixyz ala12_trajectory.xyz --multi 2" +arg="--plumed plumed.dat --trajectory-stride 1 --timestep 0.005 --ixyz ala12_trajectory.xyz --multi 2" diff --git a/regtest/metainference/rt-bayesgje/forces.0.reference b/regtest/metainference/rt-bayesgje/forces.0.reference index 0ed61d28de42db88b61354b8a4bb7ce418ff3a1e..f952572e1d141dd0666839edc8b4aa96a5c99cda 100644 --- a/regtest/metainference/rt-bayesgje/forces.0.reference +++ b/regtest/metainference/rt-bayesgje/forces.0.reference @@ -1,13 +1,13 @@ #! FIELDS time ardc.rdc.rdc_0 ardc.rdc.rdc_1 ardc.rdc.rdc_2 ardc.rdc.rdc_3 0.000000 101143.08924261 142695.65235745 181190.34961159 245129.02631528 - 0.050000 96509.75337662 158684.94382818 183452.40066154 244564.79387841 - 0.100000 87147.76279387 160191.80483517 188533.51559246 249845.30206550 - 0.150000 82144.31570070 166778.19310989 204293.78341435 238140.33040621 - 0.200000 85005.54511104 164183.79639535 208819.64838854 238885.95431007 - 0.250000 93535.03932353 166021.32695614 195487.90092875 249687.95156019 - 0.300000 88942.71148792 167035.20547521 180804.57902134 246077.85375057 - 0.350000 89277.16093721 144419.39425930 196552.93381756 247896.10345523 - 0.400000 98764.82832731 138030.83320282 200303.09996895 248630.36978081 - 0.450000 99235.17134588 135773.85181726 197662.57991569 238263.26940268 - 0.500000 102582.78323716 127743.47915838 204953.93416707 239770.94376532 - 0.550000 102885.27951597 128203.06145362 187155.52801207 249787.00128481 + 0.005000 96509.75337662 158684.94382818 183452.40066154 244564.79387841 + 0.010000 87147.76279387 160191.80483517 188533.51559246 249845.30206550 + 0.015000 82144.31570070 166778.19310989 204293.78341435 238140.33040621 + 0.020000 85005.54511104 164183.79639535 208819.64838854 238885.95431007 + 0.025000 93535.03932353 166021.32695614 195487.90092875 249687.95156019 + 0.030000 88942.71148792 167035.20547521 180804.57902134 246077.85375057 + 0.035000 89277.16093721 144419.39425930 196552.93381756 247896.10345523 + 0.040000 98764.82832731 138030.83320282 200303.09996895 248630.36978081 + 0.045000 99235.17134588 135773.85181726 197662.57991569 238263.26940268 + 0.050000 102582.78323716 127743.47915838 204953.93416707 239770.94376532 + 0.055000 102885.27951597 128203.06145362 187155.52801207 249787.00128481 diff --git a/regtest/metainference/rt-bayesgje/forces.1.reference b/regtest/metainference/rt-bayesgje/forces.1.reference index 0ed61d28de42db88b61354b8a4bb7ce418ff3a1e..f952572e1d141dd0666839edc8b4aa96a5c99cda 100644 --- a/regtest/metainference/rt-bayesgje/forces.1.reference +++ b/regtest/metainference/rt-bayesgje/forces.1.reference @@ -1,13 +1,13 @@ #! FIELDS time ardc.rdc.rdc_0 ardc.rdc.rdc_1 ardc.rdc.rdc_2 ardc.rdc.rdc_3 0.000000 101143.08924261 142695.65235745 181190.34961159 245129.02631528 - 0.050000 96509.75337662 158684.94382818 183452.40066154 244564.79387841 - 0.100000 87147.76279387 160191.80483517 188533.51559246 249845.30206550 - 0.150000 82144.31570070 166778.19310989 204293.78341435 238140.33040621 - 0.200000 85005.54511104 164183.79639535 208819.64838854 238885.95431007 - 0.250000 93535.03932353 166021.32695614 195487.90092875 249687.95156019 - 0.300000 88942.71148792 167035.20547521 180804.57902134 246077.85375057 - 0.350000 89277.16093721 144419.39425930 196552.93381756 247896.10345523 - 0.400000 98764.82832731 138030.83320282 200303.09996895 248630.36978081 - 0.450000 99235.17134588 135773.85181726 197662.57991569 238263.26940268 - 0.500000 102582.78323716 127743.47915838 204953.93416707 239770.94376532 - 0.550000 102885.27951597 128203.06145362 187155.52801207 249787.00128481 + 0.005000 96509.75337662 158684.94382818 183452.40066154 244564.79387841 + 0.010000 87147.76279387 160191.80483517 188533.51559246 249845.30206550 + 0.015000 82144.31570070 166778.19310989 204293.78341435 238140.33040621 + 0.020000 85005.54511104 164183.79639535 208819.64838854 238885.95431007 + 0.025000 93535.03932353 166021.32695614 195487.90092875 249687.95156019 + 0.030000 88942.71148792 167035.20547521 180804.57902134 246077.85375057 + 0.035000 89277.16093721 144419.39425930 196552.93381756 247896.10345523 + 0.040000 98764.82832731 138030.83320282 200303.09996895 248630.36978081 + 0.045000 99235.17134588 135773.85181726 197662.57991569 238263.26940268 + 0.050000 102582.78323716 127743.47915838 204953.93416707 239770.94376532 + 0.055000 102885.27951597 128203.06145362 187155.52801207 249787.00128481 diff --git a/regtest/metainference/rt-bayesgje/plumed.dat b/regtest/metainference/rt-bayesgje/plumed.dat index 7822dac511fbe390a51d002b8261b4b1b0e4c910..70072bca8083fff68d2b470ebc59f969b65ff0de 100644 --- a/regtest/metainference/rt-bayesgje/plumed.dat +++ b/regtest/metainference/rt-bayesgje/plumed.dat @@ -24,4 +24,4 @@ LABEL=spe DUMPFORCES ARG=ardc.* FILE=forces FMT=%15.8f -PRINT ARG=spe.bias FILE=BIAS STRIDE=1 +PRINT ARG=spe.* FILE=BIAS STRIDE=1 diff --git a/regtest/metainference/rt-bayesspe/BIAS.0.reference b/regtest/metainference/rt-bayesspe/BIAS.0.reference index 31ce0a31548943ee1588e8e4be4af29da43c5761..4d9742f3f3dd699b91290befa9874df8eee14aaa 100644 --- a/regtest/metainference/rt-bayesspe/BIAS.0.reference +++ b/regtest/metainference/rt-bayesspe/BIAS.0.reference @@ -1,13 +1,13 @@ -#! FIELDS time spe.bias - 0.000000 88.895449 - 0.050000 89.588048 - 0.100000 89.150038 - 0.150000 89.284429 - 0.200000 89.719404 - 0.250000 90.567448 - 0.300000 89.201579 - 0.350000 88.694215 - 0.400000 89.468499 - 0.450000 88.794068 - 0.500000 88.941159 - 0.550000 88.508296 +#! FIELDS time spe.bias spe.scale spe.accept spe.sigma + 0.000000 88.895449 1.000000 1.000000 0.010000 + 0.005000 89.588048 1.000000 1.000000 0.010000 + 0.010000 89.150038 1.000000 1.000000 0.010000 + 0.015000 89.284429 1.000000 1.000000 0.010000 + 0.020000 89.719404 1.000000 1.000000 0.010000 + 0.025000 90.567448 1.000000 1.000000 0.010000 + 0.030000 89.201579 1.000000 1.000000 0.010000 + 0.035000 88.694215 1.000000 1.000000 0.010000 + 0.040000 89.468499 1.000000 1.000000 0.010000 + 0.045000 88.794068 1.000000 1.000000 0.010000 + 0.050000 88.941159 1.000000 1.000000 0.010000 + 0.055000 88.508296 1.000000 1.000000 0.010000 diff --git a/regtest/metainference/rt-bayesspe/BIAS.1.reference b/regtest/metainference/rt-bayesspe/BIAS.1.reference index 31ce0a31548943ee1588e8e4be4af29da43c5761..4d9742f3f3dd699b91290befa9874df8eee14aaa 100644 --- a/regtest/metainference/rt-bayesspe/BIAS.1.reference +++ b/regtest/metainference/rt-bayesspe/BIAS.1.reference @@ -1,13 +1,13 @@ -#! FIELDS time spe.bias - 0.000000 88.895449 - 0.050000 89.588048 - 0.100000 89.150038 - 0.150000 89.284429 - 0.200000 89.719404 - 0.250000 90.567448 - 0.300000 89.201579 - 0.350000 88.694215 - 0.400000 89.468499 - 0.450000 88.794068 - 0.500000 88.941159 - 0.550000 88.508296 +#! FIELDS time spe.bias spe.scale spe.accept spe.sigma + 0.000000 88.895449 1.000000 1.000000 0.010000 + 0.005000 89.588048 1.000000 1.000000 0.010000 + 0.010000 89.150038 1.000000 1.000000 0.010000 + 0.015000 89.284429 1.000000 1.000000 0.010000 + 0.020000 89.719404 1.000000 1.000000 0.010000 + 0.025000 90.567448 1.000000 1.000000 0.010000 + 0.030000 89.201579 1.000000 1.000000 0.010000 + 0.035000 88.694215 1.000000 1.000000 0.010000 + 0.040000 89.468499 1.000000 1.000000 0.010000 + 0.045000 88.794068 1.000000 1.000000 0.010000 + 0.050000 88.941159 1.000000 1.000000 0.010000 + 0.055000 88.508296 1.000000 1.000000 0.010000 diff --git a/regtest/metainference/rt-bayesspe/config b/regtest/metainference/rt-bayesspe/config index 08ecbfeed07a073c453a2cd96787f112d5908a24..f502c0040fbb0bc5739b5082d2330ce9ceb9dbfa 100644 --- a/regtest/metainference/rt-bayesspe/config +++ b/regtest/metainference/rt-bayesspe/config @@ -1,3 +1,3 @@ mpiprocs=4 type=driver -arg="--plumed plumed.dat --trajectory-stride 10 --timestep 0.005 --ixyz ala12_trajectory.xyz --multi 2" +arg="--plumed plumed.dat --trajectory-stride 1 --timestep 0.005 --ixyz ala12_trajectory.xyz --multi 2" diff --git a/regtest/metainference/rt-bayesspe/forces.0.reference b/regtest/metainference/rt-bayesspe/forces.0.reference index 8256fe4207bc0eb07967e6dc4b3db139617eb727..a37b89e224c4a067794010586833cd6087f118d7 100644 --- a/regtest/metainference/rt-bayesspe/forces.0.reference +++ b/regtest/metainference/rt-bayesspe/forces.0.reference @@ -1,13 +1,13 @@ #! FIELDS time ardc.rdc.rdc_0 ardc.rdc.rdc_1 ardc.rdc.rdc_2 ardc.rdc.rdc_3 0.000000 4.8964070140 3.4706709947 2.7333367222 2.0203956788 - 0.050000 5.1314541484 3.1209764135 2.6996344427 2.0250568318 - 0.100000 5.6826405769 3.0916197602 2.6268793928 1.9822577174 - 0.150000 6.0287234138 2.9695302488 2.4242334852 2.0796871390 - 0.200000 5.8258289420 3.0164524105 2.3716929244 2.0731960186 - 0.250000 5.2946326469 2.9830674033 2.5334319251 1.9835068938 - 0.300000 5.5679739800 2.9649612786 2.7391684828 2.0126055612 - 0.350000 5.5471178734 3.4292481981 2.5197047377 1.9978438920 - 0.400000 5.0143008544 3.5879580111 2.4725308502 1.9919438648 - 0.450000 4.9905370659 3.6475977929 2.5055598781 2.0786140815 - 0.500000 4.8276950984 3.8768842067 2.4164252830 2.0655440282 - 0.550000 4.8135023688 3.8629871925 2.6462200194 1.9827203729 + 0.005000 5.1314541484 3.1209764135 2.6996344427 2.0250568318 + 0.010000 5.6826405769 3.0916197602 2.6268793928 1.9822577174 + 0.015000 6.0287234138 2.9695302488 2.4242334852 2.0796871390 + 0.020000 5.8258289420 3.0164524105 2.3716929244 2.0731960186 + 0.025000 5.2946326469 2.9830674033 2.5334319251 1.9835068938 + 0.030000 5.5679739800 2.9649612786 2.7391684828 2.0126055612 + 0.035000 5.5471178734 3.4292481981 2.5197047377 1.9978438920 + 0.040000 5.0143008544 3.5879580111 2.4725308502 1.9919438648 + 0.045000 4.9905370659 3.6475977929 2.5055598781 2.0786140815 + 0.050000 4.8276950984 3.8768842067 2.4164252830 2.0655440282 + 0.055000 4.8135023688 3.8629871925 2.6462200194 1.9827203729 diff --git a/regtest/metainference/rt-bayesspe/forces.1.reference b/regtest/metainference/rt-bayesspe/forces.1.reference index 8256fe4207bc0eb07967e6dc4b3db139617eb727..a37b89e224c4a067794010586833cd6087f118d7 100644 --- a/regtest/metainference/rt-bayesspe/forces.1.reference +++ b/regtest/metainference/rt-bayesspe/forces.1.reference @@ -1,13 +1,13 @@ #! FIELDS time ardc.rdc.rdc_0 ardc.rdc.rdc_1 ardc.rdc.rdc_2 ardc.rdc.rdc_3 0.000000 4.8964070140 3.4706709947 2.7333367222 2.0203956788 - 0.050000 5.1314541484 3.1209764135 2.6996344427 2.0250568318 - 0.100000 5.6826405769 3.0916197602 2.6268793928 1.9822577174 - 0.150000 6.0287234138 2.9695302488 2.4242334852 2.0796871390 - 0.200000 5.8258289420 3.0164524105 2.3716929244 2.0731960186 - 0.250000 5.2946326469 2.9830674033 2.5334319251 1.9835068938 - 0.300000 5.5679739800 2.9649612786 2.7391684828 2.0126055612 - 0.350000 5.5471178734 3.4292481981 2.5197047377 1.9978438920 - 0.400000 5.0143008544 3.5879580111 2.4725308502 1.9919438648 - 0.450000 4.9905370659 3.6475977929 2.5055598781 2.0786140815 - 0.500000 4.8276950984 3.8768842067 2.4164252830 2.0655440282 - 0.550000 4.8135023688 3.8629871925 2.6462200194 1.9827203729 + 0.005000 5.1314541484 3.1209764135 2.6996344427 2.0250568318 + 0.010000 5.6826405769 3.0916197602 2.6268793928 1.9822577174 + 0.015000 6.0287234138 2.9695302488 2.4242334852 2.0796871390 + 0.020000 5.8258289420 3.0164524105 2.3716929244 2.0731960186 + 0.025000 5.2946326469 2.9830674033 2.5334319251 1.9835068938 + 0.030000 5.5679739800 2.9649612786 2.7391684828 2.0126055612 + 0.035000 5.5471178734 3.4292481981 2.5197047377 1.9978438920 + 0.040000 5.0143008544 3.5879580111 2.4725308502 1.9919438648 + 0.045000 4.9905370659 3.6475977929 2.5055598781 2.0786140815 + 0.050000 4.8276950984 3.8768842067 2.4164252830 2.0655440282 + 0.055000 4.8135023688 3.8629871925 2.6462200194 1.9827203729 diff --git a/regtest/metainference/rt-bayesspe/plumed.dat b/regtest/metainference/rt-bayesspe/plumed.dat index 18cced9c6b830cb198c142b436e78bcc6fdcd632..ff3ff6b5579da1c9525054bd0cbcfa167bfc0f2f 100644 --- a/regtest/metainference/rt-bayesspe/plumed.dat +++ b/regtest/metainference/rt-bayesspe/plumed.dat @@ -24,4 +24,4 @@ LABEL=spe DUMPFORCES ARG=ardc.* FILE=forces -PRINT ARG=spe.bias FILE=BIAS STRIDE=1 +PRINT ARG=spe.* FILE=BIAS STRIDE=1 diff --git a/src/bias/Metainference.cpp b/src/bias/Metainference.cpp index 1f015ff93d19b3d227bd08986ab4194429816054..7afe02ffc2dfd1e6f63569ab051e325fd2242f91 100644 --- a/src/bias/Metainference.cpp +++ b/src/bias/Metainference.cpp @@ -131,7 +131,6 @@ class Metainference : public Bias // number of data points unsigned ndata_; // Monte Carlo stuff - double old_energy; unsigned MCsteps_; unsigned MCstride_; unsigned MCaccept_; @@ -189,7 +188,6 @@ PLUMED_BIAS_INIT(ao), sqrt2_div_pi(0.45015815807855), doscale_(false), ndata_(getNumberOfArguments()), -old_energy(0), MCsteps_(1), MCstride_(1), MCaccept_(0), @@ -380,17 +378,15 @@ double Metainference::getEnergyGJE(const vector<double> &sigma, const double sca } void Metainference::doMonteCarlo(){ - // calculate old energy (first time only) - if(MCfirst_==-1) { - switch(noise_type_) { - case GAUSS: - case MGAUSS: - old_energy = getEnergyGJE(sigma_,scale_); - break; - case OUTLIERS: - old_energy = getEnergySPE(sigma_,scale_); - break; - } + double old_energy; + switch(noise_type_) { + case GAUSS: + case MGAUSS: + old_energy = getEnergyGJE(sigma_,scale_); + break; + case OUTLIERS: + old_energy = getEnergySPE(sigma_,scale_); + break; } // cycle on MC steps