espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] Applying an External Field


From: Salvador H-V
Subject: Re: [ESPResSo-users] Applying an External Field
Date: Mon, 21 Dec 2015 19:09:10 -0600

Hi,

I took a look to your files but I don get it how to apply to my potential.

I just to want to modify the force in x-direction. The potential is "not" pairwise potential, but 1-body force which acts on each atom.

I still do not understand why is not possible to extract the force during the run simulation, add the contribution of the external field and update the forces.

I tried with something like this, but is not working:
set fx [lindex [part $k print f ] 0]
set xif [lindex [part $k print folded_position ] 0]

# Calculate the external force
set fext [expr {2.0*$mypi*$Vo*cos(2.0*$mypi*$xif/$al)/$al}]
# Update the force in x-direction
set fx_new [expr {$fx - $fext}]
part $k f $fx_new $fy $fz

Or do you think I should modify the forces.cpp file?

Thanks a lot

Salvador 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]