espressomd-users
[Top][All Lists]
Advanced

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

Re: [ESPResSo] deleting bonds


From: Axel Arnold
Subject: Re: [ESPResSo] deleting bonds
Date: Wed, 29 Sep 2010 11:05:49 +0200
User-agent: KMail/1.10.3 (Linux/2.6.27.48-0.3-default; KDE/4.1.3; x86_64; ; )

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




reply via email to

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