fix efield

Dear all,

Suppose that the electric field in a particular region of the simulation box has been pre-computed by solving Laplace’s equation and the values have been stored in a data file. Is it possible to specify such a spatially varying electric field in LAMMPS? The fix efield command appears to require a formula specifying the components of the field as a function of position. The functionality I am looking for is similar to pair_style table, although I intend to supply values of electric field rather than pair potential.

Best,
Karthik

DISCLAIMER The sender of this email is an alumnus of National University of Singapore (NUS). Kindly note that NUS is not responsible for the contents of this email, and views and opinions expressed are solely the sender’s.

Dear all,

Suppose that the electric field in a particular region of the simulation box has been pre-computed by solving Laplace’s equation and the values have been stored in a data file. Is it possible to specify such a spatially varying electric field in LAMMPS? The fix efield command appears to require a formula specifying the components of the field as a function of position. The functionality I am looking for is similar to pair_style table, although I intend to supply values of electric field rather than pair potential.

with LAMMPS the rule applies: what you see is what you get.
meaning, if not mentioned in the manual, a functionality is not (directly) available.

on the other hand, LAMMPS has become such a large package, that it is near impossible to memorize all functionality.
i am not aware of anything you describe, but don’t take my word for it. better check yourself.

axel.

No such capabilitiy exists in LAMMPS. You would need to write a new (derived) fix efield
class which took a file of 3d grid values as an input. They could be stored, and you could
write code to interpolate from the grid to get an Efield vector value at each atom position.
For big problems an additional complication is if you need to store the 3d grid of
values in a distributed fashion.

Steve