Ids order in O.interactions

Asked by Hadda

Hi,

Is there any physical meaning/convention behind the order at which pairwise particles ids are appended to O.interactions?

I am interested in the default ones:

for i in O.interactions:
print i.id1, i.id2

I know that I can switch them when calling a specific existing contact, but it seems that the default values recorded in .phys do not change according to whether calling O.interactions[id1,id2] or O.interactions[id2,id1].

Any clues?

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Hadda
Solved:
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

Hi Nejib, there is no convention.
The fact that O.interactions[x,y] is the same as O.interactions[y,x] is a desirable feature, isn't it?
Both ways give the same interaction, hence the same particular ordering of ids.
Bruno

Revision history for this message
Hadda (hadda) said :
#2

Hi Bruno,

Thank you for your answer - I was just wondering if they were arranged such that one can know the force applied by id1 on id2 without using the normal.

Cheers

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

The force is always applied by i.id1 on i.id2. No need to use the normal.
Does it answer your question?

Revision history for this message
Hadda (hadda) said :
#4

Thank you Bruno, yes it did!