Re: Error running deinterleave_idws.py on FEP simulation output

From: Amy Rice (arice3_at_hawk.iit.edu)
Date: Fri Feb 15 2019 - 16:13:04 CST

Hi all,
I was able to resolve this issue, though I am still not clear why the
output from NAMD does not quite match the input expected. The problem arose
from the missing "#NEW FEP WINDOW: [..]" lines in the output. Adding them
in by hand (eg- "#NEW FEP WINDOW: LAMBDA SET TO 0.1 LAMBDA2 0.2 LAMBDA_IDWS
0.0" etc) corrected this issue and the output was then able to be processed
by deinterleave_idws.py

Best,
Amy

On Wed, Feb 13, 2019 at 12:46 PM Amy Rice <arice3_at_hawk.iit.edu> wrote:

> Hi all,
> I am testing a FEP simulation using NAMD 2.13 with IDWS. To test my
> system, I ran a very short FEP simulation with only 100 steps per lambda
> value, with lambda from 0 to 1 in increments of 0.1. The simulation
> completed without error, but I am unable to postprocess the fep output with
> deinterleave_idws.py. When I run the python script, I get the following
> error:
>
> Traceback (most recent call last):
> File "./deinterleave_idws.py", line 199, in <module>
> wb.steps.append(step_counter)
> NameError: name 'wb' is not defined
>
> From what I can tell, the problem is that my FEP output file does not
> match the format expected by the python script- my output file has 10
> columns but the script seems to expect 11 if IDWS is on (line 291):
>
> if len(fields) == 11:
> cur_lambdaIDWS = float(fields[10])
> IDWS_on = True
> wb = Window(cur_lambda1, cur_lambdaIDWS)
>
> It also seems that the script expects a line in the FEP out file that
> starts with "#NEW FEP WINDOW:" each time lambda is changed, but this is not
> the case in my FEP out file (line 206 of deinterleave_idws.py):
>
> elif line.startswith('#NEW FEP WINDOW:'):
>
> if step_counter >= 0:
> first_window = False
> step_counter = -1
>
> # Extract lambda values
> cur_lambda1 = float(fields[6])
> cur_lambda2 = float(fields[8])
>
> A sample of the FEP output has been pasted below, and the full file
> (test.fep) can be found here:
> http://s000.tinyupload.com/index.php?file_id=95505654457461737276
>
> The relevant portion of my configuration file is also given below.
>
> Any insight into why the FEP output file format is not as expected? Is it
> possible I'm missing a required option in the configuration file?
>
> Thank you for the help,
> Amy
>
>
> ---------------------------- test.fep ---------------------------
>
> # STEP Elec
> vdW dE dE_avg Temp dG
> # l l+dl l
> l+dl E(l+dl)-E(l)
> #NEW FEP WINDOW: LAMBDA SET TO 0 LAMBDA2 0.1
> FepEnergy: 5 -81561.5747 -81506.2895 7468.1313
> 7461.7973 48.9512 48.6513 308.8818 48.5899
> FepEnergy: 10 -81593.6226 -81538.5728 7497.7188
> 7490.0548 47.3857 48.4042 308.3850 48.1867
> FepEnergy: 15 -81745.3745 -81689.8651 7623.0471
> 7615.3590 47.8213 48.1149 308.6998 47.8489
> FepEnergy: 20 -81851.9507 -81796.4133 7658.7396
> 7651.0947 47.8925 48.0701 310.0615 47.8659
> FepEnergy: 25 -81693.8541 -81639.4306 7530.8473
> 7524.5452 48.1213 48.1016 309.4985 47.9205
> FepEnergy: 30 -81632.5928 -81579.6824 7518.5800
> 7512.0492 46.3795 47.9520 307.9105 47.6241
> FepEnergy: 35 -81644.3630 -81591.4959 7466.7152
> 7459.4200 45.5719 47.6439 308.6566 46.7768
> FepEnergy: 40 -81645.4509 -81591.0092 7500.0850
> 7491.1633 45.5200 47.3799 308.2222 46.3875
> FepEnergy: 45 -81758.6129 -81703.4411 7571.9448
> 7562.5530 45.7800 47.2073 309.9286 46.2855
> #50 STEPS OF EQUILIBRATION AT LAMBDA 0 COMPLETED
> #STARTING COLLECTION OF ENSEMBLE AVERAGE
> FepEnergy: 50 -81581.0032 -81526.4651 7515.4610
> 7505.1362 44.2134 44.2134 306.9747 44.2134
> FepEnergy: 55 -81362.4304 -81309.3919 7323.1291
> 7314.7191 44.6284 44.3384 306.7312 44.3105
> FepEnergy: 60 -81368.2063 -81315.4191 7263.0966
> 7256.0697 45.7603 44.6604 309.1481 44.5204
> FepEnergy: 65 -81352.0983 -81298.6321 7272.1913
> 7266.3589 47.6338 45.4301 307.3889 44.7456
> FepEnergy: 70 -81638.5477 -81586.7070 7506.9008
> 7502.1082 47.0481 45.8778 308.2766 44.9100
> FepEnergy: 75 -81888.1600 -81834.6793 7677.8265
> 7672.0645 47.7186 46.1616 310.2054 45.0385
> FepEnergy: 80 -81875.4077 -81820.1817 7660.5578
> 7653.5767 48.2449 46.4679 310.2780 45.1460
> FepEnergy: 85 -81831.9312 -81776.4447 7626.5606
> 7619.8681 48.7940 46.7720 309.8195 45.2378
> FepEnergy: 90 -81780.4173 -81725.4238 7574.9458
> 7567.8352 47.8828 46.9599 310.5496 45.3172
> FepEnergy: 95 -81766.2386 -81712.4073 7502.8241
> 7495.2230 46.2302 46.9459 311.3023 45.3798
> FepEnergy: 100 -81581.0306 -81527.8560 7436.1630
> 7429.6158 46.6274 46.8792 308.3985 45.4268
> #Free energy change for lambda window [ 0 0.1 ] is 45.4268 ; net change
> until now is 45.4268
> FepEnergy: 105 -81391.5170 -81339.6430 7400.1083
> 7396.9320 48.6977 48.6977 307.1903 48.6977
> FepE_back: 110 -81379.0425 -81428.8655 7401.1905
> 7408.9307 -42.0828 47.4868 307.2172 47.1151
> FepEnergy: 115 -81501.3646 -81449.2581 7380.9194
> 7377.0670 48.2541 47.6147 310.8916 47.2083
> FepE_back: 120 -81564.0116 -81618.3442 7393.9807
> 7404.2930 -44.0203 48.2551 311.5470 47.5046
> FepEnergy: 125 -81501.1474 -81447.6114 7452.7233
> 7446.6003 47.4131 48.1786 308.7367 47.4957
> FepE_back: 130 -81616.1229 -81669.9141 7547.6673
> 7560.7802 -40.6783 47.8927 309.9197 47.3605
> FepEnergy: 135 -81701.9051 -81647.3888 7563.1911
> 7555.8314 47.1566 47.8467 311.2957 47.3456
> FepE_back: 140 -81719.7588 -81771.8062 7561.2876
> 7578.0790 -35.2560 47.4253 311.1195 46.2893
> FepEnergy: 145 -81621.2661 -81569.9290 7538.8871
> 7528.8656 41.3156 47.1343 308.4667 43.1873
> #50 STEPS OF EQUILIBRATION AT LAMBDA 0.1 COMPLETED
> #STARTING COLLECTION OF ENSEMBLE AVERAGE
> FepE_back: 150 -81539.3137 -81591.3598 7437.7531
> 7456.3702 -33.4289 -nan 307.8654 nan
> FepEnergy: 155 -81387.0328 -81334.3667 7317.0034
> 7308.2923 43.9551 43.9551 306.3730 43.9551
>
>
> --------------------------- FEP.conf --------------------------
> #alchemical
> alch on
> alchType fep
> alchFile tLPS_121A.fep
> alchCol B
> alchOutFreq 5
> alchEquilSteps 50
>
> alchLambda 0.0
> alchLambda2 0.1
> run 100
>
> set Lambda0 0.1
> set dLambda 0.1
>
> while {$Lambda0 < 0.9} {
> alchLambda $Lambda0
> set LambdaB [expr $Lambda0 - $dLambda]
> set Lambda0 [expr $Lambda0 + $dLambda]
> alchLambda2 $Lambda0
> alchLambdaIDWS $LambdaB
> run 100
> }
> -----------------------------------------------------------------
>
> PS- I apologize if this message appears twice in the mailing list. I sent
> it earlier today but never saw it sent out so I am trying again without any
> file attachments.
> --
> Amy Rice
> Ph.D. Candidate
> Physics Department
> Illinois Institute of Technology
>

-- 
Amy Rice
Ph.D. Candidate
Physics Department
Illinois Institute of Technology

This archive was generated by hypermail 2.1.6 : Thu Dec 31 2020 - 23:17:10 CST