[gmx-users] space dependent electric field

David van der Spoel spoel at xray.bmc.uu.se
Mon Jul 29 08:28:32 CEST 2019


Den 2019-07-29 kl. 04:24, skrev Maryam:
> Dear all,
> 
> I want to apply a space but not time dependent electric field to my system.
> I reviewed the source code of the electric field but it only has constant
> and time dependent EF (pulsed EF). Can anyone help me find out how I can
> change the source code to have space dependent EF without changing the
> defined parameters in gromacs so that I wont face the problem of changing
> all related subroutines? Which routines should I apply required changes if
> I want to add some new parameters for the space dependent EF?
> Thank you
> 
I assume you are looking at routine calculateForces in 
gromacs/src/gromacs/applied_forces/electricfield.cpp ?
Please start by checking out the development version of gromacs if not.

There you can extract the coordinates of the particle from the 
ForceProviderInput structure (see 
gromacs/src/gromacs/mdtypes/iforceprovider.h). To make things work 
quickly you can just hardcode the extra parameters you might need or 
abuse the existing one.

Cheers,
-- 
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.
http://www.icm.uu.se


More information about the gromacs.org_gmx-users mailing list