espressomd-users
[Top][All Lists]
Advanced

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

Re: excpetion


From: Jean-Noël Grad
Subject: Re: excpetion
Date: Fri, 1 Nov 2019 16:14:03 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Hi Marcos,

To add a bond between two particles, you need to first register the bond parameters in the espresso system:

from espressomd.interactions import HarmonicBond
harmonic_bond = HarmonicBond(k=1, r_0=1, r_cut=5)
system.bonded_inter.add(harmonic_bond)
system.part[1].add_bond((harmonic_bond, 2))

Best regards,
JN

On 11/1/19 4:06 PM, marcos nolasco wrote:
i'm buildin a model that needs harmonic bonds between its components, but when i run the code, expresso shows me the following sentence:

/"File "particle_data.pyx", line 1514, in espressomd.particle_data.ParticleHandle.add_bond/ /  File "particle_data.pyx", line 1448, in espressomd.particle_data.ParticleHandle.check_bond_or_throw_exception Exception: The bonded interaction has not yet been added to the list of active bonds in Espresso"/
/
/
so, i'd like to know, is this list of active bonds the same in myconfig? how can i solve this? thanks!



reply via email to

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