Skip to content

Add potential_wall constraint to the PW MD verlet

afonari requested to merge (removed):md-potential-wall-dev into develop

It is now possible to set potential wall (at 0 z-axis) constraint:

CONSTRAINTS
1
potential_wall 1.2 1.5 0.9

Output would have:

1) potential wall at 0 z-axis is requested
         External force is proportional to:
               1.200000 (a.u.) *     1.500000 (a.u.) * exp(   -1.500000).
         Force is applied when atom is within     0.900000 (a.u.) from the wall.

See test example.

Also added constants to the constraints module.

In the dynamics module there are two places (one is probably copy paste of the other one), where number of constraints is used to compute number of degrees of freedom, created get_ndof to DRY this. Not sure if it is correct, since one constraint can constraint more than one degree of freedom (??) also not sure if potential_wall should be counted there (currently it is not, see constraints_module :: nconstr_ndof). Please advise.

Merge request reports