On Wed, Sep 29, 2010 at 5:06 AM, Axel Arnold
<address@hidden> wrote:
On Wednesday 29 September 2010 03:20:51 Mikheil Azatov wrote:
> Hi espresso users!
>
> In my simulation I need to delete bond between two particles depending on
> some conditions. I learned before what to do to add bonds between
> particles. Now I need to remove the bond for some conditions.Has anyone
> ever had to do that ? I was wondering if there's a way to modify espresso
> files to do that?
Hi,
the routine local_change_bond in particle_data.c can both add and delete a
bond. However, note that a bond is always attached to a particle. That is,
assume there is a bond between particles 3 and 5. If you added the bond to
particle 3, then only particle 3 carries the information that those two
particles are bonded. If you want to delete the bond, you need to delete it
from particle 3. That is, you need:
int x[] = {type, 5};
local_change_bond(3, x, 1);
However, there is no problem if the bond doesn't exist; therefore you can
simply delete both possible bonds, that is, also call:
int x[] = {type, 3};
local_change_bond(5, x, 1);
Many regards,
Axel
--
JP Dr. Axel Arnold Tel: +49 711 685 67609
ICP, Universität Stuttgart Email: address@hidden
Pfaffenwaldring 27
70569 Stuttgart, Germany
_______________________________________________
ESPResSo mailing list
address@hidden
https://fias.uni-frankfurt.de/mailman/listinfo/espresso