Ids order in O.interactions

Asked by Hadda on 2016-10-10

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:
2016-10-11
Last query:
2016-10-11
Last reply:
2016-10-11

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

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

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

Hadda (hadda) said : #4

Thank you Bruno, yes it did!