espressomd-users
[Top][All Lists]
Advanced

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

Re: "Exception: The bonded interaction has not yet been added to the lis


From: Jean-Noël Grad
Subject: Re: "Exception: The bonded interaction has not yet been added to the list of active bonds in Espresso."
Date: Sun, 03 Nov 2019 14:31:31 +0100
User-agent: Roundcube Webmail/1.3.10

Hi,

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

import espressomd.interactions
hb = interactions.HarmonicBond(k=80, r_0=0.3, r_cut=1.5)
system.bonded_inter.add(hb)
for id in range(1, len(system.part)):
    system.part[id].add_bond((hb, id - 1))

Best regards,
JN

On 2019-11-02 22:56, Thiago Puccinelli wrote:
Hello all,

I have just installed the newest version of espresso... Since, I work
with dimers and polymers, I was looking forward to simulate dimers
with Harmonic interactions between its monomers... And it is here
where lies my problem...

For instance, when I set this interaction by using the command, as
follows:
"hb = interactions.HarmonicBond(k=80, r_0=0.3, r_cut=1.5)"

After executing the script, I get something like this:
File "poly.py", line 88, in <module> system.part[id].add_bond((hb, id
- 1)) File "particle_data.pyx", line 1487, in
espressomd.particle_data.ParticleHandle.add_bond File
"particle_data.pyx", line 1420, 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.

Should I install any feature to use this kind of bonded interaction in
my simulations?

Best
Thiago

--

Thiago Puccinelli Orlandi Nogueira
Soft Matter Physics
C.V. http://lattes.cnpq.br/5068320085993516
tel. (+55) 92 99534-0404



reply via email to

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