VMD-L Mailing List
From: Jason Smith (jason_smith_18_at_sfu.ca)
Date: Tue Jul 06 2021 - 10:28:03 CDT
- Next message: fan li: "Re: Randomly select molecules and delete them"
- Previous message: fan li: "Randomly select molecules and delete them"
- In reply to: fan li: "Randomly select molecules and delete them"
- Next in thread: fan li: "Re: Randomly select molecules and delete them"
- Reply: fan li: "Re: Randomly select molecules and delete them"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Is this something you need to do often or a once off? As a once off, you could use a random number generator for e.g. resid or whatever you like, and use those as the selection criteria. tcl does have a generator, not sure if it's implemented in vmd, though.
rand<https://urldefense.com/v3/__https://wiki.tcl-lang.org/page/rand__;!!DZ3fjg!qY2TRYCfZxacRgIlw3eovMSDGWNpJ2YcyLfsELNbfNSd3Gr0UWQNGWEEics44b4l5w$ >
wiki.tcl-lang.org
Tclers wiki
Cheers,
-
Jason Smith
Post-Doctoral Fellow
Robert N. Young Lab, Simon Fraser University
8888 University Drive, Burnaby, BC, V5A-1S6
Canada
________________________________
From: owner-vmd-l_at_ks.uiuc.edu <owner-vmd-l_at_ks.uiuc.edu> on behalf of fan li <fanliqmul_at_gmail.com>
Sent: Tuesday, 6 July 2021 3:23:48 AM
To: vmd-L
Subject: vmd-l: Randomly select molecules and delete them
Dear VMD users
I have a group of molecules with resname PRO, I would like to randomly select 30% of those molecules then delete them. Finally, I would like to write out the PDB and psf files. I do know how to select molecules by atomselection function, but I don't how to randomly select molecules.
Any help would be appreciated.
Thank you
Fan
- Next message: fan li: "Re: Randomly select molecules and delete them"
- Previous message: fan li: "Randomly select molecules and delete them"
- In reply to: fan li: "Randomly select molecules and delete them"
- Next in thread: fan li: "Re: Randomly select molecules and delete them"
- Reply: fan li: "Re: Randomly select molecules and delete them"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]