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

CA filtering in the evaluation code #36

Open
ynshen opened this issue Sep 3, 2024 · 0 comments
Open

CA filtering in the evaluation code #36

ynshen opened this issue Sep 3, 2024 · 0 comments

Comments

@ynshen
Copy link

ynshen commented Sep 3, 2024

Hi @bjing2016,

Thanks for open-sourcing this awesome work!

I am running through the evaluation code scripts/analyze_ensembles.py but found this line might not correctly filter CA atoms for the sample ensemble aftraj.

out['ca_mask'] = ca_mask = [a.index for a in traj_aa.top.atoms if a.name == 'CA']

# For example: name = 6y2x_A. aftraj is the ensemble generated by AlphaFlow-MD.
>>> [a for a in traj.top.atoms]
[GLY1-CA,
 SER2-CA,
 GLU3-CA,
 PRO4-CA,
 GLU5-CA,
 PRO6-CA,
 GLU7-CA,
...]

>>> [a for a in aftraj.top.atoms]
[GLY1-CA,
 SER2-CA,
 GLU3-CA,
 PRO4-C,
 GLU5-CA,
 PRO6-C,
 GLU7-CA,
...]

It is likely due to different atom ordering in the topology files for certain amino acids. Would need to filter them separately to ensure getting the CA-only ensemble:

af_ca_mask = [a.index for a in aftraj_aa.top.atoms if a.name == 'CA']
aftraj_fixed = aftraj_aa.atom_slice(af_ca_mask, False)
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

No branches or pull requests

1 participant