choderalab / perses

Experiments with expanded ensembles to explore chemical space
http://perses.readthedocs.io
MIT License
180 stars 51 forks source link

CDK2 example does not run #499

Closed jchodera closed 5 years ago

jchodera commented 5 years ago

Here is the output running the master branch:

[chodera@lilac:cdk2-example]$ python ../../scripts/setup_relative_calculation.py cdk2_sams.yaml
Warning: OEAssignPartialCharges has been deprecated please use OEAssignCharges instead!
Warning: SelectElfDiverseConfs: elfPop.NumConfs 1 <= elfLimit 1
DEBUG:openmoltools.openeye:keep_confs was set to 1. Molecule positions will be reset.
DEBUG:openmoltools.openeye:~{N}-(3-bromophenyl)-6-(cyclohexylmethoxy)-9~{H}-purin-2-amine
Warning: SelectElfDiverseConfs: elfPop.NumConfs 1 <= elfLimit 1
DEBUG:openmoltools.openeye:keep_confs was set to 1. Molecule positions will be reset.
DEBUG:openmoltools.openeye:6-(cyclohexylmethoxy)-~{N}-phenyl-9~{H}-purin-2-amine
/home/chodera/miniconda/lib/python3.6/site-packages/parmed/openmm/parameters.py:111: UserWarning: Residue ~{N contains atom type ca not found in parameter set and will be dropped.
  warnings.warn('Residue {} contains atom type {} not found in parameter set and will be dropped.'.format(residue.name, atom.type))
/home/chodera/miniconda/lib/python3.6/site-packages/parmed/openmm/parameters.py:111: UserWarning: Residue 6-( contains atom type ca not found in parameter set and will be dropped.
  warnings.warn('Residue {} contains atom type {} not found in parameter set and will be dropped.'.format(residue.name, atom.type))
DEBUG:parmed.openmm.parameters:Valid patch combinations:
[H]c1c(c(c(c(c1[H])[H])N([H])c2nc3c(c(n2)OC([H])([H])C4(C(C(C(C(C4([H])[H])([H])[H])([H])[H])([H])[H])([H])[H])[H])nc(n3[H])[H])[H])[H]
[H]c1c(c(c(c(c1[H])Br)[H])N([H])c2nc3c(c(n2)OC([H])([H])C4(C(C(C(C(C4([H])[H])([H])[H])([H])[H])([H])[H])([H])[H])[H])nc(n3[H])[H])[H]
Generated forcefield
INFO:proposal_engine:Generating atom map...
INFO:proposal_engine:Atom map took 0.231 s
Warning: SelectElfDiverseConfs: elfPop.NumConfs 1 <= elfLimit 1
DEBUG:openmoltools.openeye:keep_confs was set to 1. Molecule positions will be reset.
DEBUG:openmoltools.openeye:MOL
DEBUG:parmed.openmm.parameters:Valid patch combinations:
preparing to add solvent
solvent added, parameterizing
INFO:proposal_engine:Generating System...
INFO:proposal_engine:System generation took 5.856 s
System parameterized
['[H]c1c(c(c(c(c1[H])[H])N([H])c2nc3c(c(n2)OC([H])([H])C4(C(C(C(C(C4([H])[H])([H])[H])([H])[H])([H])[H])([H])[H])[H])nc(n3[H])[H])[H])[H]', '[H]c1c(c(c(c(c1[H])Br)[H])N([H])c2nc3c(c(n2)OC([H])([H])C4(C(C(C(C(C4([H])[H])([H])[H])([H])[H])([H])[H])([H])[H])[H])nc(n3[H])[H])[H]']
INFO:proposal_engine:Building new Topology object...
INFO:proposal_engine:Topology generation took 0.525 s
INFO:proposal_engine:Generating System...
Warning: SelectElfDiverseConfs: elfPop.NumConfs 1 <= elfLimit 1
DEBUG:openmoltools.openeye:keep_confs was set to 1. Molecule positions will be reset.
DEBUG:openmoltools.openeye:MOL
DEBUG:parmed.openmm.parameters:Valid patch combinations:
INFO:proposal_engine:System generation took 9.604 s
INFO:proposal_engine:Generating atom map...
INFO:proposal_engine:Atom map took 0.291 s
INFO:proposal_engine:Proposed transformation would delete 1 atoms and create 1 atoms.
adding heavy atoms
adding hydrogen atoms
INFO:geometry:Adding CustomBondForce: 75954 75981 : chargeprod   -0.013 e^2, sigma    3.000 A, epsilon    0.018 kcal/mol, growth_idx     1
INFO:geometry:Adding CustomBondForce: 75965 75981 : chargeprod    0.014 e^2, sigma    3.000 A, epsilon    0.018 kcal/mol, growth_idx     1
INFO:geometry:Adding CustomBondForce: 75981 75982 : chargeprod    0.015 e^2, sigma    2.600 A, epsilon    0.007 kcal/mol, growth_idx     1
INFO:geometry:Adding CustomBondForce: 75981 75987 : chargeprod    0.016 e^2, sigma    2.600 A, epsilon    0.007 kcal/mol, growth_idx     1
Writing omega-00000.mol2
DEBUG:root:There are 1 new atoms
INFO:geometry:Proposing atom <Atom H15 [75981]; In MOL 22866> from torsion <Dihedral; <Atom H15 [75981]; In MOL 22866>--<Atom C10 [75952]; In MOL 22866>--<Atom C18 [75966]; In MOL 22866>--<Atom H21 [75987]; In MOL 22866>; type=None>
INFO:geometry:   75981 logp_r        0.000 | logp_theta        1.575 | logp_phi       -0.410 | log(detJ)       -4.597
DEBUG:root:Proposal order time: 0.000007 s | Growth system generation: 5.460887 s | Total torsion scan time 1.465757 s | Total energy computation time 0.161971 s | Position set time 6.483934 s| Total time 34.133015 s
preparing to add solvent
solvent added, parameterizing
INFO:proposal_engine:Generating System...
INFO:proposal_engine:System generation took 0.473 s
System parameterized
INFO:proposal_engine:Generating System...
INFO:proposal_engine:System generation took 0.124 s
adding heavy atoms
adding hydrogen atoms
INFO:geometry:Adding CustomBondForce:    11    38 : chargeprod   -0.013 e^2, sigma    3.000 A, epsilon    0.018 kcal/mol, growth_idx     1
INFO:geometry:Adding CustomBondForce:    22    38 : chargeprod    0.014 e^2, sigma    3.000 A, epsilon    0.018 kcal/mol, growth_idx     1
INFO:geometry:Adding CustomBondForce:    38    39 : chargeprod    0.015 e^2, sigma    2.600 A, epsilon    0.007 kcal/mol, growth_idx     1
INFO:geometry:Adding CustomBondForce:    38    44 : chargeprod    0.016 e^2, sigma    2.600 A, epsilon    0.007 kcal/mol, growth_idx     1
Writing omega-00000.mol2
DEBUG:root:There are 1 new atoms
INFO:geometry:Proposing atom <Atom H15 [38]; In MOL 0> from torsion <Dihedral; <Atom H15 [38]; In MOL 0>--<Atom C10 [9]; In MOL 0>--<Atom C18 [23]; In MOL 0>--<Atom C17 [22]; In MOL 0>; type=None>
INFO:geometry:      38 logp_r        0.000 | logp_theta       -1.444 | logp_phi        1.386 | log(detJ)       -4.722
DEBUG:root:Proposal order time: 0.000006 s | Growth system generation: 0.761225 s | Total torsion scan time 0.000748 s | Total energy computation time 0.010429 s | Position set time 0.266283 s| Total time 1.437596 s
Setup object has been created.
Traceback (most recent call last):
  File "../../scripts/setup_relative_calculation.py", line 33, in <module>
    setup_dict = relative_setup.run_setup(setup_options)
  File "/home/chodera/miniconda/lib/python3.6/site-packages/perses-0.1-py3.6.egg/perses/dispersed/relative_setup.py", line 1030, in run_setup
    n_equilibrium_steps_per_iteration = setup_options['n_equilibrium_steps_per_iteration']
KeyError: 'n_equilibrium_steps_per_iteration'

Looks like the YAML file is not up to date. Can you update this?

jchodera commented 5 years ago

Thanks @pgrinaway ! We made it further, but after the 100 iterations, it dies with

DEBUG:yank.multistate.multistatesampler:********************************************************************************
DEBUG:yank.multistate.multistatesampler:Iteration 100/100
DEBUG:yank.multistate.multistatesampler:********************************************************************************
DEBUG:yank.mpi:Single node: executing <function SAMSSampler._mix_replicas at 0x2b54e6fcdd90>
DEBUG:yank.multistate.sams:Updating thermodynamic states using global-jump scheme...
DEBUG:openmmtools.utils:Mixing of replicas took    0.000s
DEBUG:yank.multistate.sams:Accepted 1/101 attempted swaps (1.0%)
DEBUG:yank.multistate.sams:Updating logZ estimates...
DEBUG:yank.multistate.sams:    state histogram counts (100 total): [9 3 4 8 3 8 6 5 7 4 9 2 2 6 0 3 2 2 1 0 1 0 4 1 2 1 1 3 1 1 0 0 1 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
DEBUG:yank.multistate.sams:logZ-flatness criteria met (36 total): [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
DEBUG:yank.multistate.sams:  stage: 0
DEBUG:yank.multistate.sams: Replica 0 state 10
DEBUG:yank.multistate.sams:  logZ: [   6.3,    6.1,    5.8,    5.6,    5.4,    5.1,    4.9,    4.7,    4.5,    4.3,    4.0,    3.8,    3.6,    3.4,    3.2,    3.0,    2.8,    2.6,    2.4,    2.2,    2.0,    1.8,    1.6,    1.5,    1.3,    1.2,    1.0,    0.9,    0.8,    0.7,    0.6,    0.5,    0.4,    0.4,    0.3,    0.3,    0.2,    0.2,    0.1,    0.1,    0.1,    0.1,    0.1,    0.1,    0.1,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0]
DEBUG:yank.multistate.multistatesampler:Propagating all replicas...
DEBUG:yank.mpi:Running _propagate_replica serially.
DEBUG:yank.mpi:Running _get_replica_move_statistics serially.
DEBUG:openmmtools.utils:Propagating all replicas took    1.029s
DEBUG:yank.mpi:Running _compute_replica_energies serially.
DEBUG:openmmtools.utils:Computing energy matrix took    0.150s
DEBUG:yank.mpi:Single node: executing <function MultiStateSampler._report_iteration at 0x2b54e6f951e0>
DEBUG:yank.mpi:Single node: executing <function SAMSSampler._report_iteration_items at 0x2b54e6fcdc80>
DEBUG:yank.mpi:Single node: executing <function MultiStateSampler._report_iteration_items at 0x2b54e6f95488>
DEBUG:openmmtools.utils:Storing sampler states took    0.003s
DEBUG:openmmtools.utils:Writing iteration information to storage took    0.935s
DEBUG:yank.multistate.multistatesampler:Will perform offline analysis
DEBUG:yank.mpi:Single node: executing <function MultiStateSampler._offline_analysis at 0x2b54e6f95d08>
DEBUG:yank.multistate.multistatesampler:Computing free energy with MBAR...
DEBUG:yank.multistate.multistateanalyzer:Checking if we need to unbias the restraint...
DEBUG:yank.multistate.multistateanalyzer:Reading energies...
DEBUG:yank.multistate.multistatereporter:read_replica_thermodynamic_states: iteration = [  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35
  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53
  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71
  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89
  90  91  92  93  94  95  96  97  98  99 100]
DEBUG:yank.multistate.multistateanalyzer:Done.
DEBUG:yank.multistate.multistateanalyzer:Assembling effective timeseries...
DEBUG:yank.multistate.multistateanalyzer:Done.
DEBUG:yank.multistate.multistateanalyzer:t0 found; using initial t0 = 1 instead of 1
DEBUG:yank.multistate.multistateanalyzer:Equilibration data: [2, 1.3555735, 73.769516]
DEBUG:yank.multistate.multistateanalyzer:Assembling uncorrelated energies...
DEBUG:yank.multistate.multistateanalyzer:Found expanded cutoff states in the energies!
DEBUG:yank.multistate.multistateanalyzer:Free energies will be reported relative to them instead!
DEBUG:yank.multistate.multistateanalyzer:Done.
DEBUG:yank.multistate.multistateanalyzer:Computing free energy differences...
DEBUG:openmmtools.utils:Computing offline free energy estimate took    0.030s
DEBUG:yank.multistate.multistatesampler:Iteration took 2.148s.
DEBUG:yank.multistate.multistatesampler:Estimated completion in 0:00:00, at Tue Jan 29 20:09:01 2019 (consuming total wall clock time 0:02:47.601269).
Traceback (most recent call last):
  File "../../scripts/setup_relative_calculation.py", line 111, in <module>
    phase, free_energies[phase], hss_run._last_err_free_energy))
TypeError: must be real number, not NoneType
jchodera commented 5 years ago

Fixed by #500