-
Notifications
You must be signed in to change notification settings - Fork 50
update caprieval
to handle coarse-grained structures
#1223
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really needed to add the cgffversion
parameter ? Can't we detect that we are already working with coarse-grain ?
There is an issue with the variable cg
set in the init.py:
- It is set to be an integer, but the CAPRI class and other functions are defined receiving
bool
types. - Also
cg
integer is used to point a specific position in lists, and therefore cannot be of typebool
.
Instead of lists, I would rather use dicts (in libalign.py
):
PROT_ATOMS = [
PROT_ATOMS_AA,
PROT_ATOMS_MARTINI2,
PROT_ATOMS_MARTINI2 # The backbone particle is identical between MARTINI 2 and 3
]
to
PROT_ATOMS = {
"aa": PROT_ATOMS_AA,
"martini2": PROT_ATOMS_MARTINI2,
"martini3": PROT_ATOMS_MARTINI2 # The backbone particle is identical between MARTINI 2 and 3
}
(this also applies for DNA and RNA lists)
and make cg
of type str
, taking possible values aa
, martini2
(and in the future martini3
)
I think it will be easier to understand what is happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs some tests to make sure that the resulting numbers make sense
For the cgffversion parameter, I chose this option instead of opening and closing the pdb files in the caprieval module directly, which was the only other solution I could think of to check if it was CG or not. This pdb opening or closing felt tedious, especially because it is tricky to differentiate between martini2 and martini3 structures based on the pdb. |
Co-authored-by: Victor Reys <132575181+VGPReys@users.noreply.github.com>
For the variable cg , I indeed made a mistake, at first it was a bool then I changed my mind but didn't change the definition of the variable |
Don't you have access to the type of topology based on the content of the |
caprieval
to handle coarse-grained structures.
caprieval
to handle coarse-grained structures.caprieval
to handle coarse-grained structures
Hi, |
Co-authored-by: Victor Reys <132575181+VGPReys@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me! especially since you compared the results to other methods
Side note : the example silently breaks the traceback option (as now two topology modules can be defined within the same workflow). That will have to be fixed before the CG PR gets merged into the main
Co-authored-by: Victor Reys <132575181+VGPReys@users.noreply.github.com>
You are about to submit a new Pull Request. Before continuing make sure you read the contributing guidelines.
Checklist
Summary of the Pull Request
This pull request corresponds to the adaptation of the caprieval module for coarse-grained structures.
Related Issue
Additional Info