[lammps-users] Electric field and NPT


How do I apply external electric field and at the same time fix NPT?

I was doing like: fix 1 all npt efield 323 323 100 xyz 0.99 0.99 1000 0.0 0.0 .005

but I am getting an error.

Can you please tell me the correct script?


Fixes like npt and efield have to be given as separate commands in the script. Each one is documented in the manual, so you can find the correct syntaxes there.