-
Notifications
You must be signed in to change notification settings - Fork 144
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
About writing NMD file #1656
Comments
Hi Tianming, I'd say the answer is yes. You just need to get your PCA or displacement vectors into ProDy format. For example,
or
|
Thanks for the quick response James! Just to clarify, after my_pca.setEigens(my_vectors, my_variances), my_pca would be the ‘mode’ input for writeNMD, is this correct?
Tianming
From: James Krieger ***@***.***>
Date: Wednesday, February 8, 2023 at 11:59 AM
To: prody/ProDy ***@***.***>
Cc: Tianming Qu ***@***.***>, Author ***@***.***>
Subject: Re: [prody/ProDy] About writing NMD file (Issue #1656)
Hi Tianming,
I'd say the answer is yes. You just need to get your PCA or displacement vectors into ProDy format. For example,
my_pca = PCA()
my_pca.setEigens(my_vectors, my_variances)
or
my_defvec = Vector(my_vector)
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/prody/ProDy/issues/1656*issuecomment-1422944038__;Iw!!Epnw_ITfSMW4!safYNzJQqBD5AotifrXZDpm6Nsefz1NyCAW8p0I3uMTYDuxoMpl0cTHOUc7ewo4Ss1KuIZrs4i17pcNcKcRtZ8TrLfE$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AQXNBSTDGGA4J27WI5U6T5DWWPGHHANCNFSM6AAAAAAUVPYJFY__;!!Epnw_ITfSMW4!safYNzJQqBD5AotifrXZDpm6Nsefz1NyCAW8p0I3uMTYDuxoMpl0cTHOUc7ewo4Ss1KuIZrs4i17pcNcKcRt-_6gJvk$>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Yes, exactly. Let me know if you have any problems |
Hi James, I tried to use setEigens today with my eigenvectors and eigenvalues, the array of eigenvectors has a shape (number of atoms, 30) and the eigenvalues has a shape (30,). When i do setEigens(eigenvectors,eigenvalues), it says the number of vectors and values do not match, is there anyway I can solve this problem? |
The vectors should be (3*n_atoms, n_modes). Probably that’s the problem. If you want only one coordinate per atom then you should set my_pca._is3d to False first |
How can I set this to false? By setting this as my_pca.setEigens(eigen_vectors, eigen_values, _is3d=True), like this?
Tianming
From: James Krieger ***@***.***>
Date: Monday, March 6, 2023 at 4:19 PM
To: prody/ProDy ***@***.***>
Cc: Tianming Qu ***@***.***>, Author ***@***.***>
Subject: Re: [prody/ProDy] About writing NMD file (Issue #1656)
The vectors should be (3*n_atoms, n_modes). Probably that’s the problem. If you want only one coordinate per atom then you should set my_pca._is3d to False first
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/prody/ProDy/issues/1656*issuecomment-1457018216__;Iw!!Epnw_ITfSMW4!oRnWGNkgn5uqpubsbawNYgaGhISmuMrvCE6jSmT9Q6E7CffqZSnsk13xULL2YKjLn3rqtptJPGdKKlD-NUnk6n6rGYY$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AQXNBSSW4LLSNYIS3SGJW4TW2ZIHDANCNFSM6AAAAAAUVPYJFY__;!!Epnw_ITfSMW4!oRnWGNkgn5uqpubsbawNYgaGhISmuMrvCE6jSmT9Q6E7CffqZSnsk13xULL2YKjLn3rqtptJPGdKKlD-NUnkEIdr1GM$>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Actually I am facing a following problem: I do pca to water density obtained from each frame and I wonder how I can visualized the fluctuation of water density PCs with Normal mode wizard. I now have the displacements of the water density along each PC and the eigenvalue and eigenvector of each PC. Do you think there is anyway I can do this in Prody? |
You could maybe use two objects: one for eigenvectors and one for fluctuations. The PCA one would be a standard PCA object and I guess the fluctuations would not be 3d. You could maybe modify the fluctuations object before using setEigens or maybe use a GNM object instead instead of a 3d one. |
NMWiz shows GNM modes as colours so that may work for fluctuations. |
Could you be more specific on how to make these two objects? |
Try this: obj1 = PCA() # is3d True so vectors1 is shape (n_atoms*3, n_modes) obj2 = GNM() # is3d False so vectors2 is shape (n_atoms, n_modes) |
Dear ProDy developer,
Is there anyway I can write an NMD file with the PCA vector or displacement I got from other resources instead of ProDy so that I can visualize it on VMD?
Best,
Tianming
The text was updated successfully, but these errors were encountered: