Closed satyajitkhatua09 closed 1 year ago
Hi Satyajit Khatua,
you can use mdtraj to compute the SASA using their implementation of the Shrake-Rupley algorithm. It's documented here. This function computes the SASA from an mdtraj-Trajectory
object, which is exactly what you need in order to implement your own custom feature. There's an example on how to do that here https://github.com/markovmodel/PyEMMA/issues/1566#issuecomment-1155126017, can you use that as a template?
Hi,
Thank you for the quick response. I will try to import the sasa as you have mentioned. Will report you back.
Thanks again, Satyajit Khatua
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Tim Hempel @.> Sent: Monday, January 2, 2023 5:10:22 PM To: markovmodel/PyEMMA @.> Cc: satyajitkhatua09 @.>; Author @.> Subject: Re: [markovmodel/PyEMMA] how to import solvent accessible surface area as a feature in pyemma? (Issue #1586)
Hi Satyajit Khatua, you can use mdtraj to compute the SASA using their implementation of the Shrake-Rupley algorithm. It's documented herehttps://www.mdtraj.org/1.9.8.dev0/api/generated/mdtraj.shrake_rupley.html. This function computes the SASA from an mdtraj-Trajectoryobject, which is exactly what you need in order to implement your own custom feature. There's an example on how to do that here #1566 (comment)https://github.com/markovmodel/PyEMMA/issues/1566#issuecomment-1155126017, can you use that as a template?
— Reply to this email directly, view it on GitHubhttps://github.com/markovmodel/PyEMMA/issues/1586#issuecomment-1368871724, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYWUQ2TJJ2KCYPRCQUMNIE3WQK5CNANCNFSM6AAAAAATOGEPW4. You are receiving this because you authored the thread.Message ID: @.***>
Hi,
I have tried to calculate the SASA feature in these two different instances. The problems are attached herewith. I actually intended to calculate the SASA value for the ligand molecule, not all of the residues. That is where I am getting the errors. Can you help me with this? I have tried importing different options inside mdtraj.shrake_rupley() function. It seems nothing is working for me.
With regards, Satyajit Khatua
The function call shrake_rupley(traj, mode='residue')
returns an array of shape (n_frames, n_residues)
that contains the SASA per residue for each time frame. You can select the SASA of your ligand if you know which residue-index your ligand has (make sure to use 0-based residue indexing as this is a numpy array). The code inside the function could look something like this: (CAUTION: I didn't check if it works! Please let me know if it does.)
def custom_function(traj, ligand_resid=FIXME):
# compute ligand sasa and select ligand
# returns array with length n_frames
ligand_sasa = mdtraj.shrake_rupley(traj, mode='residue')[:, ligand_resid]
# expand dimension to (n_frames, 1) as required by pyemma and return
return ligand_sasa[:, None]
Hi,
Thanks a lot. I have got the ligand sasa as per your suggestion.
With regards, Satyajit Khatua
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Tim Hempel @.> Sent: Tuesday, January 3, 2023 9:04:21 PM To: markovmodel/PyEMMA @.> Cc: satyajitkhatua09 @.>; Author @.> Subject: Re: [markovmodel/PyEMMA] how to import solvent accessible surface area as a feature in pyemma? (Issue #1586)
The function call shrake_rupley(traj, mode='residue') returns an array of shape (n_frames, n_residues) that contains the SASA per residue for each time frame. You can select the SASA of your ligand if you know which residue-index your ligand has (make sure to use 0-based residue indexing as this is a numpy array). The code inside the function could look something like this: (CAUTION: I didn't check if it works! Please let me know if it does.)
def custom_function(traj, ligand_resid=FIXME):
ligand_sasa = mdtraj.shrake_rupley(traj, mode='residue')[:, ligand_resid]
return ligand_sasa[:, None]
— Reply to this email directly, view it on GitHubhttps://github.com/markovmodel/PyEMMA/issues/1586#issuecomment-1369908182, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYWUQ2Q7NFCZLQ4X3ML6V63WQRBH3ANCNFSM6AAAAAATOGEPW4. You are receiving this because you authored the thread.Message ID: @.***>
Hi,
For one ligand unbinding, I want to use SASA as one of my CVs. Is there a way to import this feature in PyEMMA? If yes, can you tell me how to do that? This may be a simple question, but I am unable to include this feature. Please help.
WIth regards, Satyajit Khatua