## Re: [PyMOL] distances and selections within states?

 Re: [PyMOL] distances and selections within states? From: DeLano Scientific - 2007-04-18 02:54:07 > "Find me the distance between atom1 and atom2 in state 4" print cmd.get_distance("atom1","atom2",4) > "select all waters that are within 5.0 angstroms of residue > 15 during state 7" Hmm...not easily done. The problem is that distance-based selection criteria apply to all states, giving you a superset of what you actually want. To perform a selection operation on a single state, you must first copy all the content into a single-state object: Assuming trajectory object "traj"... create tmp_obj, (traj///15/ & polymer) or ((traj and solvent) within 5 of (traj///15/ & polymer),7,1 select tmp_near, (tmp_obj and solvent) within 5 of (tmp_obj///15/) select traj_near, traj in tmp_sele dele tmp_* Ugly! Cheers, Warren > -----Original Message----- > From: pymol-users-bounces@... > [mailto:pymol-users-bounces@...] On Behalf > Of Michael Lerner > Sent: Tuesday, April 17, 2007 12:29 PM > To: pymol-users@... > Subject: [PyMOL] distances and selections within states? > > Hi, > > I feel like I'm missing something obvious here. How do I say > > "Find me the distance between atom1 and atom2 in state 4" > > or > > "select all waters that are within 5.0 angstroms of residue > 15 during state 7" > > I'm trying to analyze various properties throughout the > course of a trajectory. > > I made an el cheapo hack that loads up a chunk of the > trajectory, calls split_states, calculates things for the > individual states, deletes everything, loads up the next > chunk, etc. It's really slow, though. It's even slower (or > blows up) if I load the whole thing up and call split_states > for my many-nanosecond trajectory. > > Thanks, > > -Michael > > -- > Biophysics Graduate Student > Carlson Lab, University of Michigan > http://www.umich.edu/~mlerner http://lernerclan.net > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by DB2 Express Download DB2 > Express C - the FREE version of DB2 express and take control > of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@... > https://lists.sourceforge.net/lists/listinfo/pymol-users

### Thread view

 [PyMOL] distances and selections within states? From: Michael Lerner - 2007-04-17 19:29:31 Hi, I feel like I'm missing something obvious here. How do I say "Find me the distance between atom1 and atom2 in state 4" or "select all waters that are within 5.0 angstroms of residue 15 during state 7" I'm trying to analyze various properties throughout the course of a trajectory. I made an el cheapo hack that loads up a chunk of the trajectory, calls split_states, calculates things for the individual states, deletes everything, loads up the next chunk, etc. It's really slow, though. It's even slower (or blows up) if I load the whole thing up and call split_states for my many-nanosecond trajectory. Thanks, -Michael -- Biophysics Graduate Student Carlson Lab, University of Michigan http://www.umich.edu/~mlerner http://lernerclan.net
 Re: [PyMOL] distances and selections within states? From: DeLano Scientific - 2007-04-18 02:54:07 > "Find me the distance between atom1 and atom2 in state 4" print cmd.get_distance("atom1","atom2",4) > "select all waters that are within 5.0 angstroms of residue > 15 during state 7" Hmm...not easily done. The problem is that distance-based selection criteria apply to all states, giving you a superset of what you actually want. To perform a selection operation on a single state, you must first copy all the content into a single-state object: Assuming trajectory object "traj"... create tmp_obj, (traj///15/ & polymer) or ((traj and solvent) within 5 of (traj///15/ & polymer),7,1 select tmp_near, (tmp_obj and solvent) within 5 of (tmp_obj///15/) select traj_near, traj in tmp_sele dele tmp_* Ugly! Cheers, Warren > -----Original Message----- > From: pymol-users-bounces@... > [mailto:pymol-users-bounces@...] On Behalf > Of Michael Lerner > Sent: Tuesday, April 17, 2007 12:29 PM > To: pymol-users@... > Subject: [PyMOL] distances and selections within states? > > Hi, > > I feel like I'm missing something obvious here. How do I say > > "Find me the distance between atom1 and atom2 in state 4" > > or > > "select all waters that are within 5.0 angstroms of residue > 15 during state 7" > > I'm trying to analyze various properties throughout the > course of a trajectory. > > I made an el cheapo hack that loads up a chunk of the > trajectory, calls split_states, calculates things for the > individual states, deletes everything, loads up the next > chunk, etc. It's really slow, though. It's even slower (or > blows up) if I load the whole thing up and call split_states > for my many-nanosecond trajectory. > > Thanks, > > -Michael > > -- > Biophysics Graduate Student > Carlson Lab, University of Michigan > http://www.umich.edu/~mlerner http://lernerclan.net > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by DB2 Express Download DB2 > Express C - the FREE version of DB2 express and take control > of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@... > https://lists.sourceforge.net/lists/listinfo/pymol-users