yank icon indicating copy to clipboard operation
yank copied to clipboard

CRITICAL: Experiment NaN

Open sadafrani6 opened this issue 3 years ago • 2 comments

Dear All I am performing binding free energy of ligand with protein. While reaching at step 1918 of 2000 I am getting a NAN error as below:- 2021-03-27 07:41:57,769: ******************************************************************************** 2021-03-27 07:41:57,769: Iteration 1918/2000 2021-03-27 07:41:57,769: ******************************************************************************** 2021-03-27 07:41:57,769: Single node: executing <function ReplicaExchangeSampler._mix_replicas at 0x2b79480fbf80> 2021-03-27 07:41:57,769: Mixing replicas... 2021-03-27 07:41:57,894: Mixing of replicas took 0.125s 2021-03-27 07:41:57,895: Accepted 241064/5120000 attempted swaps (4.7%) 2021-03-27 07:41:57,910: Propagating all replicas... 2021-03-27 07:41:57,911: Running _propagate_replica serially. 2021-03-27 07:43:49,132: WARNING - openmmtools.mcmc - Potential energy is NaN after 0 attempts of integration with move LangevinSplittingDynamicsMove Attempting a restart... 2021-03-27 07:43:56,306: WARNING - openmmtools.mcmc - Potential energy is NaN after 1 attempts of integration with move LangevinSplittingDynamicsMove Attempting a restart... 2021-03-27 07:44:03,460: WARNING - openmmtools.mcmc - Potential energy is NaN after 2 attempts of integration with move LangevinSplittingDynamicsMove Attempting a restart... 2021-03-27 07:44:10,638: WARNING - openmmtools.mcmc - Potential energy is NaN after 3 attempts of integration with move LangevinSplittingDynamicsMove Attempting a restart... 2021-03-27 07:44:17,818: WARNING - openmmtools.mcmc - Potential energy is NaN after 4 attempts of integration with move LangevinSplittingDynamicsMove Attempting a restart... 2021-03-27 07:44:25,020: ERROR - openmmtools.mcmc - Potential energy is NaN after 5 attempts of integration with move LangevinSplittingDynamicsMove Trying to reinitialize Context as a last-resort restart attempt... 2021-03-27 07:44:34,037: ERROR - openmmtools.mcmc - Potential energy is NaN after 6 attempts of integration with move LangevinSplittingDynamicsMove 2021-03-27 07:44:46,360: CRITICAL - openmmtools.multistate.multistatesampler - Propagating replica 38 at state 2 resulted in a NaN! The state of the system and integrator before the error were saved in ./experiments/nan-error-logs 2021-03-27 07:44:46,635: CRITICAL - yank.experiment -

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! CRITICAL: Experiment NaN ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The following experiment threw a NaN! It should NOT be considered! Experiment: ./experiments/ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2021-03-27 07:44:46,869: Single node: executing <bound method MultiStateReporter.close of <openmmtools.multistate.multistatereporter.MultiStateReporter object at 0x2b7948d03b90>>

I have added minimization in the protocol as mentioned below:-

options: minimize: yes verbose: yes output_dir: . default_number_of_iterations: 2000 temperature: 300kelvin pressure: 1atmosphere

In the output file I am also getting error:- dcdplugin) Could not access file './experiments/trailblaze/solvent/coordinates.dcd'.

Could you please suggest to me how to solve this issue? Regards Sadaf experiments.log

sadafrani6 avatar Mar 27 '21 10:03 sadafrani6

Are you able to resume the simulation? It looks like you have a checkpoint interval of 50, so if you resume the simulation, it should back up to iteration 1900 and try to see if it can continue from there successfully.

In the output file I am also getting error:- dcdplugin) Could not access file './experiments/trailblaze/solvent/coordinates.dcd'

Can you find that file manually? Does the ./experiments/trailblaze/solvent directory exist?

I have to apologize---we've been a bit shorthanded since COVID, so our ability to provide support will be minimal until we have a couple of new folks onboarded around May.

jchodera avatar Mar 27 '21 17:03 jchodera

@jchodera Thank you very much for your kind reply. I resubmitted the simulation and it worked and completed 2000 iterations; upon running analysis by running "yank analyze --store=experiments"

I get the following error:- pymbar.utils.ParameterError: Warning: Should have \sum_n W_nk = 1. Actual column sum for state 0 was 1.187147. 44 other columns have similar problems I further extended simulation and still after 5000 iterations I am getting an error as below:- pymbar.utils.ParameterError: Warning: Should have \sum_n W_nk = 1. Actual column sum for state 0 was 1.155945. 44 other columns have similar problems

Installing pymbar 3.0.3 as mentioned in issue @419 (choderalab/pymbar#419) did not give the above mentioned issue further but I am getting the following error:- (yanktest) [email protected]@FAC015000015:/Absolute_free_energy_setup_yank/experiments1$ yank analyze --store=experiments Traceback (most recent call last): File "/opt/anaconda/envs/yanktest/bin/yank", line 10, in sys.exit(main()) File "/opt/anaconda/envs/yanktest/lib/python3.7/site-packages/yank/cli.py", line 73, in main dispatched = getattr(commands, command).dispatch(command_args) File "/opt/anaconda/envs/yanktest/lib/python3.7/site-packages/yank/commands/analyze.py", line 148, in dispatch single_run() File "/opt/anaconda/envs/yanktest/lib/python3.7/site-packages/mpiplus/mpiplus.py", line 271, in _wrapper return run_single_node(rank, task, *args, **kwargs) File "/opt/anaconda/envs/yanktest/lib/python3.7/site-packages/mpiplus/mpiplus.py", line 220, in run_single_node result = task(*args, **kwargs) File "/opt/anaconda/envs/yanktest/lib/python3.7/site-packages/yank/commands/analyze.py", line 143, in single_run output = analyze.analyze_directory(args['--store'], **analyzer_kwargs) File "/opt/anaconda/envs/yanktest/lib/python3.7/site-packages/yank/analyze.py", line 782, in analyze_directory auto_experiment_analyzer = ExperimentAnalyzer(source_directory, **analyzer_kwargs) File "/opt/anaconda/envs/yanktest/lib/python3.7/site-packages/yank/analyze.py", line 297, in init raise RuntimeError(err_msg) RuntimeError: Cannot find analysis.yaml script in experiments Exception ignored in: <function ExperimentAnalyzer.del at 0x7f5656b45560> Traceback (most recent call last): File "/opt/anaconda/envs/yanktest/lib/python3.7/site-packages/yank/analyze.py", line 336, in del for phase, analyzer in self.analyzers.items(): AttributeError: 'ExperimentAnalyzer' object has no attribute 'analyzers' (yanktest) [email protected]@FAC015000015:/Absolute_free_energy_setup_yank/experiments1$ AttributeError: 'ExperimentAnalyzer' object has no attribute 'analyzers'

Could anyone please suggest how to fix this problem? Thanks in advance. Regards Sadaf

sadafrani6 avatar Apr 20 '21 09:04 sadafrani6