polyply_1.0
polyply_1.0 copied to clipboard
filter molecule for templates
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
note to self vf2pp from networkx 3 might speed up matching process also proper line by line benchmark is needed
Not fundamentally, no. I'm also not sure what the goal you're trying to achieve is.
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
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.
@csbrasnett this PR should fix the issue with the residue names; I think it is about time that we added this functionality