marrink-lab / polyply_1.0

Generate input parameters and coordinates for atomistic and coarse-grained simulations of polymers, ssDNA, and carbohydrates
Apache License 2.0
119 stars 21 forks source link

filter molecule for templates #339

Closed fgrunewald closed 1 month ago

fgrunewald commented 11 months ago

This PR sets the stage for some important changes:

To Do

@pckroon do you have any idea how to do the code below in faster? https://github.com/marrink-lab/polyply_1.0/blob/b97ba7126cfb972bd33f2a1315059f5cbf16a2b8/polyply/src/generate_templates.py#L295-L314

fgrunewald commented 11 months ago

note to self vf2pp from networkx 3 might speed up matching process also proper line by line benchmark is needed

pckroon commented 11 months ago

Not fundamentally, no. I'm also not sure what the goal you're trying to achieve is.

fgrunewald commented 11 months ago

Currently polyply assumes all residues are unique. That is mostly true but not quite at least at the all-atom level. For example, there might be a hydrogen extra or less depending on if a residue is located in the center or at the terminal. This functionality checks each residue against a collection of unique residues in order to find those that have the same resname but deviate as graphs. It makes generating the templates more robust for complicated AA structures

pckroon commented 11 months ago

Alright. I don't think there's really a faster way then. Unless you are willing to accept approximation, e.g. only check atom names.

fgrunewald commented 1 month ago

@csbrasnett this PR should fix the issue with the residue names; I think it is about time that we added this functionality