marrink-lab / vermouth-martinize

Describe and apply transformation on molecular structures and topologies
Apache License 2.0
97 stars 43 forks source link

non-edge directive #371

Open fgrunewald opened 3 years ago

fgrunewald commented 3 years ago

Doesn't this code assume that in the non-edge directive the first node is always in link? If it is not the non-edge would just be ignored or am I missing something here?

https://github.com/marrink-lab/vermouth-martinize/blob/1b7826784ab68bcf921cf91c180c2332957dfc6f/vermouth/processors/do_links.py#L30-L35

pckroon commented 3 years ago

Looks that way... I thought that maybe the atoms get sorted by the parser, but I can't find it there either.

fgrunewald commented 3 years ago

Yeah I don't think there is any sorting going on. Anyways since non-edges are actually treated very different from edges, that's fine but we should keep this in mind about the parser and documentation. I therefore would change the label to parser and keep the issue open until we either have documentation or a new parser.

pckroon commented 3 years ago

Agreed

fgrunewald commented 3 years ago

Related to this: I think non-edges also does not support the '>' rich order comparison, because the compare function assumes this to be an int of some sort.