New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Residue groups #178
Comments
I am a bit worried about proliferation of ad-hoc structures here, with both Residue and ResidueGroup being loosely integrated with the Frame (both only store index of atoms/residues in a separated frame). What is made available by If there is a real need for ResidueGroup as a separated class, maybe we can re-organize the code to make the whole ResiudeGroup -> Residue -> Atom clearer. On this matter, see https://khinsen.wordpress.com/2013/04/10/lessons-from-sixteen-years-of-molecular-simulation-in-python/, at the end he says he would prefer having only Atom and Group instead of the whole Atoms, Groups, Molecules, Complexes, AminoAcidResidue, PeptideChain, and Protein. He does not go on to say why, but I would guess less types of groups make the code more general and easier to understand. |
I really like the selection based idea, although I would have no idea how to implement it... |
Just to be sure, you mean that a Selection based solution would fulfil your needs here? On the implementation side, the selection engine is basically a simple interpreter for a small language. The main matching happens in one of the chemfiles/include/chemfiles/selections/expr.hpp Lines 20 to 30 in 26ea194
The main function here is Creating the Adding support for generic property would be hard, so we could start with only string properties. On the Selector side, this would mean adding a new On the parser side, the code would depend on the desired syntax. We could add support for chain_id specifically by adding a new chemfiles/src/selections/parser.cpp Lines 19 to 23 in 26ea194
A more generic solution for arbitrary property names and types could be nice, but is much harder to achieve. Syntax wise, I would go for something like |
Yes, a selection mechanism would satisfy my needs (in my own project I build the residue group myself anyway, I was really just suggesting to move that upstream). I could add the selector part my self as it looks easy enough, but I need to finish up some other projects before I can look at this more in detail. |
This issue is closed, with the above PRs. |
I believe there is a need for residue groups in the
Frame
class to store data such as chain IDs and other related information in Biologic systems (I'm sure other applications could benefit here, but I do not know them). Such an implementation could look like:Thoughts?
The text was updated successfully, but these errors were encountered: