Hello all. I am trying to simulate Si-H in LAMMPS and add electric field to see the effects. I could add the Electric Field but couldn’t increase or decrease the strength of it. Is there any way to define the strength of the specified electric field in LAMMPS?
That is a documented feature, so you have to explain why you cannot use it.
I can use the ‘efield’ command but couldn’t find a way to increase or decrease the Electric Field.
As I already stated, the documentation to the fix efield command discusses how to have a variable field: over time or per-atom or both. You need to read more carefully.
Hello. Thanks for your suggestion. I modified my code and the electric field part looks like this:
variable E equal 0.002
variable Ez equal E*time
fix 4 hydrogen efield 0 0 v_Ez
It shows following error:
“Must use variable energy with fix efield (src/fix_efield.cpp:210)”
How can I fix this error?
Keep following the documentation. There are lots of explanations about this.