Skip to content

WIP: Updating langevin to work with QM/MM and RATTLE constraints

username-removed-559845 requested to merge asod/ase:centerofmass_simple into master

My first MR ever, be gentle :)

A few issues to be discussed:

1.: Fixing Center of Mass in md/langevin.py The new version works fixes the CoM an a much simpler (maybe too simple?) way than previously. I've run a load of tests and can't find any difference. I've run scripts 2 and 3 on https://wiki.fysik.dtu.dk/ase/tutorials/md/md.html both with langevin, and this branch seems to give the same results as master. I've also run tests on water dimers and water boxes, made a google doc with some graphs etc for the very interested (probably NOT best practice i know but again, be gentle :) ) https://docs.google.com/document/d/1F-JJ8Sus4aTTuve3XMBqoqMnCRAtSLlgixULZqVWizw/edit?usp=sharing

2.: The RATTLE implementation Currently simply using the RATTLE implementation from md/verlet.py - BUT this should be moved into constraints.py and be "officialized", see 2A.

2A.: Temperature Since the temperature depends of the total number of Degrees of Freedom (DOFs) in the system, get_temperature() gives the wrong value when constraints are used. My current very WIP fix is to ask for constraints, look for the number, calculate the correct temperature. This hack does not help if other kinds of constraints are used (i.e. wrt atom positions in space), so I suggest that all constraint classes should be able to return the number of DOFs it has removed from the system.

Merge request reports