Acellera / htmd

HTMD: Programming Environment for Molecular Discovery
https://software.acellera.com/docs/latest/htmd/index.html
Other
261 stars 59 forks source link

Analysis of a specific number of simulations. #731

Closed GasparPinto closed 6 years ago

GasparPinto commented 6 years ago

Good morning all,

I have 6 proteins that all have a different number of simulations done. I want to compare a specific distance in every protein but since my adaptive sampling is sampling RMSD, the longer the simulation the bigger that distance is. My question is: Is there away to calculate only the first 100 simulations so I can have the same number of simulations for the six different proteins?

thanks Gaspar

giadefa commented 6 years ago

glob the simulations directories into a list and take only the first 100

On 4 July 2018 at 09:44, GasparPinto notifications@github.com wrote:

Good morning all,

I have 6 proteins that all have a different number of simulations done. I want to compare a specific distance in every protein but since my adaptive sampling is sampling RMSD, the longer the simulation the bigger that distance is. My question is: Is there away to calculate only the first 100 simulations so I can have the same number of simulations for the six different proteins?

thanks Gaspar

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Acellera/htmd/issues/731, or mute the thread https://github.com/notifications/unsubscribe-auth/AHaqOioTNDTj_plcccYROKQdHBR4UBArks5uDHJYgaJpZM4VCGtG .

-- http://www.acellera.com

   <https://twitter.com/acellera>

https://www.youtube.com/user/acelleracom https://www.linkedin.com/company/2133167?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A2133167%2Cidx%3A2-1-2%2CtarId%3A1448018583204%2Ctas%3Aacellera https://www.acellera.com/md-simulation-blog-news/ http://is.gd/1eXkbS

stefdoerr commented 6 years ago

Also you might need to natsort the glob results depending on the naming scheme you used for the simulations.

from natsort import natsorted
from glob import glob

sims1 = simlist(natsorted(glob('./prot1trajectories/*/'))[:100], natsorted(glob('./prot1trajectories/*/structure.pdb'))[:100])
sims2 = simlist(natsorted(glob('./prot2trajectories/*/'))[:100], natsorted(glob('./prot2trajectories/*/structure.pdb'))[:100])
allsims = simmerge(sims1, sims2)

Something like this ought to work depending on you folder organization

GasparPinto commented 6 years ago

Thank you for answers. Worked wonders!