ZofiaTr / DFM

DFM is Python based code using diffusion-map directed sampling to explore the Boltzmann distribution. It uses Openmm for molecular dynamics simulation. Currently under development.
MIT License
1 stars 0 forks source link

Move all run_langevin like methods to use new API #2

Closed jchodera closed 7 years ago

jchodera commented 7 years ago

There's still some issues with the second iteration of runModifiedKineticEnergy() where units are being messed up for the initial conditions of the second iteration:

Iteration 0
Saving traj to file
Iteration 1
Time left 00:00:00
Traceback (most recent call last):
  File "main_run.py", line 113, in <module>
    general_sampler.run(nrSteps, nrIterations, nrRep)
  File "/Users/choderaj/github/zofiatr/DFM.jchodera/srcDiffmap/sampler.py", line 127, in run
    self.runModifiedKineticEnergy(nrSteps, nrIterations, nrRep)
  File "/Users/choderaj/github/zofiatr/DFM.jchodera/srcDiffmap/sampler.py", line 647, in runModifiedKineticEnergy
    xyz += self.integrator.run_modifKinEn_Langevin(nrSteps, save_interval=self.modNr)
  File "/Users/choderaj/github/zofiatr/DFM.jchodera/srcDiffmap/integrator.py", line 361, in run_modifKinEn_Langevin
    x = x + (self.dt  * dK)
TypeError: unsupported operand type(s) for +: 'numpy.ndarray' and 'Quantity'