-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
How to get all angles and bond lengths of a residue? #4213
Comments
Which bond/angles do you want? If you want all of them, then as you say traversing seems appropriate. There may be a helper functions like |
There are also arrays of the angle and length data at the chain level, but
these will need to be filtered if e.g. you want something like just all
backbone psi, phi and omega angles.
Another option is to process the Chain.internal_coords.ordered_aa_ic_list,
which may be easier depending on your application.
I've placed a copy of the updated documentation waiting to be merged at
https://janerob.com/assets/ .
…On Wed, Jan 11, 2023 at 8:14 PM Seldon ***@***.***> wrote:
The *Bio.PDB.internal_coords* module provides APIs such as *"get_angle"*
and *"get_length"* that could return a specific angle or a bond length.
But I didn't find an easy way to get all angles and bond lengths in the
source code and official tutorial. Whether this purpose can only be
implemented by traversing every angle or bond?
—
Reply to this email directly, view it on GitHub
<#4213>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZW3QFD2BBI47EIUPFFBTTWR5EH3ANCNFSM6AAAAAATYUMJ6Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
For the GLY residue, call the get_length("N:CA") in the internal_coord returns None, but it works well for residue of other types and return normal bond length between N and CA. Is this a bug? |
Even when i set the gly_cbeta to true by IC_Residue.gly_Cbeta = True
chain.atom_to_internal_coordinates() i still cannot get the N:CA bond length of GLY. |
It seems that N:CA length doesn't take effect in "internal_coord_to_atom_coordindates", since the atom coordinates keep unchanged after the N:CA length is set to other values. |
Is this a bug?
Sorry, more of an 'unimplemented feature' which I will add to my current
pull request. Should have expected it would get hit.
The problem is that the N:CA:C (tau) hedron is stored on the previous
residue except in the case of the initial residue of a chain. This is
discussed in the pick_angle() documentation, and the issue is handled for
pick_angle() but not for pick_length() (which get_length() calls). For the
current codebase, the workaround would be to specify "1N:1CA" for the
previous residue, e.g.
residue.internal_coord.rprev[0].get_length("1N:1CA")
The AtomKey syntax for residues i+/-1 is discussed in that class
documentation. rprev is a list of previous residues to handle the
possibility of alternate residues/locations.
If your goal is to print a list of just these lengths, the loop is probably
best using the line above and then handling the start residues as a special
case when `rprev == []`.
If you're wanting 'everything' printed out for a protein, I suggest having
a look at the .pic files (write_pic()), possibly using StringIO if you want
to modify the format.
If you want arbitrary read/write access to bond lengths, angles and
dihedrals, the best approach may be to work with the .hedra and .dihedra
dictionaries on the Chain.internal_coords structure directly.
…On Thu, Jan 12, 2023 at 8:34 PM Seldon ***@***.***> wrote:
For the GLY residue, call the get_length("N:CA") in the internal_coord
returns None, but it works well for residue of other types and return
normal bond length between N and CA. Is this a bug?
—
Reply to this email directly, view it on GitHub
<#4213 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZW3QGK66CUMNKW35K2FSTWSCPHVANCNFSM6AAAAAATYUMJ6Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
However there is a bug related to this for set_length() on a backbone bond, causing some atom coordinates to not be updated as you found. |
The Bio.PDB.internal_coords module provides APIs such as "get_angle" and "get_length" that could return a specific angle or a bond length. But I didn't find an easy way to get all angles and bond lengths in the source code and official tutorial. Whether this purpose can only be implemented by traversing every angle or bond?
The text was updated successfully, but these errors were encountered: