polyply_1.0 icon indicating copy to clipboard operation
polyply_1.0 copied to clipboard

filter molecule for templates

Open fgrunewald opened this issue 1 year ago • 4 comments

This PR sets the stage for some important changes:

  • instead of matching templates by resnames each residue now requires a template_name attribute. This allows matching of non-identical residues that has the same resname
  • extract blocks now takes a template graph as input to extract the interactions, which is also used in PR #327

To Do

  • [ ] move ExtractBlock to separate file something like manipulate_molecules.py
  • [ ] speed up equivalence check or at least enable a bypass

@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 avatar Aug 12 '23 15:08 fgrunewald

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

fgrunewald avatar Aug 12 '23 16:08 fgrunewald

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

pckroon avatar Aug 14 '23 13:08 pckroon

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

fgrunewald avatar Aug 14 '23 17:08 fgrunewald

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.

pckroon avatar Aug 15 '23 10:08 pckroon

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

fgrunewald avatar Jun 14 '24 13:06 fgrunewald