Skip to content
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

Bond angles dihedrals #139

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Bond angles dihedrals #139

wants to merge 16 commits into from

Conversation

brittyscience
Copy link
Contributor

Bond angles and dihedrals code and unit test.

@Jgmedina95
Copy link
Contributor

Hi Brittany, thanks for working on this.
My general comments are that this tools as they are, are hard to use, they return a big array of angles and a big array of indices... which I don't believe can be very useful, neither for the agent nor the user. It would be better to at least save the values into a file, but even then, a list of values is not very useful alone. Is not that important to wrap all the mdtraj functions as tools, but rather make general use cases from them.

Here I found some nice plots that could be done with the information from these angles(yes, Ram plots are here too!):
https://dunbrack.fccc.edu/bbdep2010/ConformationalAnalysis.php

Please try to include one or some of these plots, first. The output of the compute_chiX methods are an array of indices and an array of values per angle.
The documentation states:

Returns
indicesnp.ndarray, shape=(n_chi, 4)
The indices of the atoms involved in each of the chi dihedral angles

anglesnp.ndarray, shape=(n_frames, n_chi)
The value of the dihedral angle for each of the angles in each of the frames.

So I imagine it may be useful to identify/map which residues correspond to the atom indices for the corresponding plots.
Something like this may be helpful

# Create a dictionary to map atom indices to residue names
traj = mdtraj.load(trajectory_path, top=topology_path)
atom_to_residue = {atom.index: atom.residue for atom in traj.topology.atoms}

# For each set of chi1 indices, map them to their residues
residues_per_chi1 = [[atom_to_residue[idx] for idx in chi_set] for chi_set in chi1_indices]

@brittyscience
Copy link
Contributor Author

Thank you for your feedback, Jorge. There still need to be more troubleshooting with the ram plot and the output of indices. Something is still missing, but the code is there. Hopefully it just needs a bit of tweaking.

@brittyscience
Copy link
Contributor Author

When you have time, I would really appreciate a second set of eyes to see what I am missing here. The script seems to be all set, minus the ram plot. I am missing something here. @Jgmedina95

@brittyscience
Copy link
Contributor Author

I need a second set of eyes here. More details in Notion stand up notes about this.

Copy link
Contributor

@SamCox822 SamCox822 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see the comments I made on the other PRs, most apply to this one too. additionally, can you combine the Chi tools into 1 tool and have the agent specify the type or some other mapping? rather than chi1, chi2, etc. which will probably be difficult for the agent

will the agent ever have a preference of the types?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants