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

deformAtoms and atomGroups #1979

Closed
rks5854 opened this issue Oct 28, 2024 · 16 comments · May be fixed by #1983
Closed

deformAtoms and atomGroups #1979

rks5854 opened this issue Oct 28, 2024 · 16 comments · May be fixed by #1983

Comments

@rks5854
Copy link

rks5854 commented Oct 28, 2024

Thank you for all previous help and for creating the patch!

We got the update installed and working - I can now use extendModel without issue. However, after not getting the expected result and doing some searching, I realized the function I actually want to use (in addition) is deformAtoms. My goal is to save the conformations of multiple modes as PDB so I can easily compare the modes of the same protein in complex with different binding partners (dimer vs monomer, LBD vs LBD-DBD, different ligands, presence of DNA, etc) using pyMol.

Because deformAtoms takes an atomGroup as an argument, I converted fex_bb as used previously into an atomGroup with fex_bb_group = fex_bb.getAtomGroup(). I did the same with fex_ca.

With either group as the argument, I get this error:
image

Do you have suggestions?

Thanks!

@jamesmkrieger
Copy link
Contributor

Perhaps you can use .copy() to convert to atomgroup instead

@rks5854
Copy link
Author

rks5854 commented Oct 30, 2024

sorry for the delayed response, but while that did create an atomGroup object, the error remains
image

@jamesmkrieger
Copy link
Contributor

oh, that's a shame. Can you perhaps try another function such as traverseMode instead? I haven't used deformAtoms so I don't know what it can do.

You may also want to try our new method ANMD in #1981. This would fix and minimise the starting structure before running ANM and traverseMode and then minimise the structures from traverseMode too. I've also just added options so you can skip modes and to use your own input modes.

@jamesmkrieger
Copy link
Contributor

I have also just created #1983, which allows deformAtoms to take other Atomic objects besides AtomGroup as input. You can try the branch behind there too

@rks5854
Copy link
Author

rks5854 commented Oct 31, 2024

my understanding is that deformAtoms will extend the backbone atoms onto a specific state that has been deformed from the starting state (i.e. a mode). i want to use it to make pdb files of different modes and compare them using pyMOL - currently I can view modes in VMD using only the alpha carbons, and cannot superimpose or observe motion. i will look into traverseMode and see if it does what I need, thanks!

the structures have already been minimized and heated using amber - i am primarily a MD researcher, so i already have protocols in place, but i am very glad this resource exists to prevent evaluation of modes resulting from non-minimized structures, since as far as i can tell from the literature, starting from a local minimum is a requirement of physiologically relevant elastic network modeling

how can i test #1983? i would be more than happy to try it out

@rks5854
Copy link
Author

rks5854 commented Oct 31, 2024

traverseMode may be what i was looking for! will update if it works (and if so, if it does the thing my research group is looking for)

@jamesmkrieger
Copy link
Contributor

Classical normal mode analysis requires the structure to be at a precise local minimum from minimisation. With elastic network models and especially coarse grained ones like our Calpha-based ANM, we parameterise them such that the starting structure is the minimum and that's a reasonable assumption as that structure was observed experimentally and the modes are robust to different model choices and structural details.

It doesn't look like deformAtoms is extending to the backbone, so you would still need to use extendModel first and the same applies for traverseMode. The new tool ANMD includes extendModel as part of it and minimises the structures from traverseMode as well as the initial one.

@rks5854
Copy link
Author

rks5854 commented Oct 31, 2024

thank you!

the first part makes sense, it is no problem to extend the model first. but what would be the purpose of minimizing the structure from traverseMode? my understanding is that the reason for viewing the modes is to see what conformations the protein is likely to take on when leaving a local minimum, so wouldn't minimization bring it back to that minimum? or is it restrained minimization done to resolve things like steric tension?

@jamesmkrieger
Copy link
Contributor

to test any pull request, you would do a git checkout of the branch behind it. For #1983, this is jamesmkrieger:deformAtoms_atomic.

To do this, you would need a development installation of ProDy from Github:

git clone git@github.com:prody/ProDy.git
cd ProDy
pip install -Ue .
python setup.py build_ext --inplace --force

If you want to add a branch from someone else's ProDy repo such as mine, you'd do the following:

git remote add james git@github.com:jamesmkrieger/ProDy.git
git fetch james
git checkout deformAtoms_atomic

As long as there aren't any changes to the C/C++ extensions, then you wouldn't have to do any more install and the python code should just be replaced and work from doing that.

You should then see that the prody version is 2.5.0, which we will release at some point

@jamesmkrieger
Copy link
Contributor

You could also make your own fork of prody and clone from there and add the main one as a remote called something like upstream

@jamesmkrieger
Copy link
Contributor

For 1981, the branch is jamesmkrieger:anmd, so once you had my remote fetched then you could just checkout that branch and try it too

@jamesmkrieger
Copy link
Contributor

thank you!

the first part makes sense, it is no problem to extend the model first. but what would be the purpose of minimizing the structure from traverseMode? my understanding is that the reason for viewing the modes is to see what conformations the protein is likely to take on when leaving a local minimum, so wouldn't minimization bring it back to that minimum? or is it restrained minimization done to resolve things like steric tension?

The normal mode landscape is an approximation, especially when we use elastic networks and coarse graining, and is much smoother than the real landscape, which is very rugged and has many local minima. The modes themselves are also an approximation and will induce elastic deformations that aren't really realistic, especially when we push them quite far from the starting structure and when we consider all the atoms and not just the overall conformation. If we want a realistic structure from the modes extended to all the atoms then we need to minimise into another local minimum to remove unrealistically stretched bonds and clashes. It may well find a local minimum that is closer to the starting one, but not by much.

We could restrain it but at the moment, we aren't doing that

@rks5854
Copy link
Author

rks5854 commented Oct 31, 2024

that makes sense - i will have to try out ANMD then!

i was able to make traverseMode work with the objects fex_anm[1] and fex_ca! i didnt use extendModel this time because it was just a test of the function. now i just need to save this trajectory as a nc, dcd, or multi-frame pdb. searching the database currently but i am always open to suggestions/recommendations

@rks5854 rks5854 closed this as completed Oct 31, 2024
@jamesmkrieger
Copy link
Contributor

You can save it as a dcd with writeDCD or use writePDB to get a multi-frame pdb. ProDy doesn't support nc files. You could use mdtraj or mdanalysis to convert it though after saving. Or you could find a hack to add the coordinates to a trajectory object from one of them to save directly

@rks5854
Copy link
Author

rks5854 commented Oct 31, 2024

this is exactly what i was looking for, thanks!

@jamesmkrieger
Copy link
Contributor

the first part makes sense, it is no problem to extend the model first. but what would be the purpose of minimizing the structure from traverseMode? my understanding is that the reason for viewing the modes is to see what conformations the protein is likely to take on when leaving a local minimum, so wouldn't minimization bring it back to that minimum? or is it restrained minimization done to resolve things like steric tension?

Just to update you that I've just found out that OpenMM's minimization is indeed local and restrained, using the L-BFGS algorithm (see http://docs.openmm.org/7.5.0/api-python/generated/simtk.openmm.openmm.LocalEnergyMinimizer.html)

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 a pull request may close this issue.

2 participants