[gmx-users] multiple electric fields

David van der Spoel spoel at xray.bmc.uu.se
Tue Oct 30 09:50:25 CET 2018

Den 2018-10-28 kl. 00:47, skrev Alex:
>> I would propose you add the constant in the code for now and work with 
>> it. If it works well please upload a redmine issues with a feture 
>> request.
>> You literally have to add somewhere
>> field = field + c
>> check src/gromacs/applied_forces/electricfield.cpp
> Thanks for the file location, but this may turn into a bit of a 
> nightmare, because that value of c would need to be varied in sweeps, so 
> I suppose we will probably stick with LAMMPS for now. That said, of 
> course, I would really like to request this feature either in the form 
> of offset, or the ability to supply multiple statements for the same 
> vector component.
> Alex
The mdp file also hosts "user" variables in the inputrecord, see
If you set userreal1 in the mdp file to your desired value you can 
extract it in the code with some effort.

David van der Spoel, Ph.D., Professor of Biology
Head of Department, Cell & Molecular Biology, Uppsala University.
Box 596, SE-75124 Uppsala, Sweden. Phone: +46184714205.

More information about the gromacs.org_gmx-users mailing list