Previous Thread
Next Thread
Print Thread
A selection problem
#38139 12/31/20 03:04 PM
Joined: Mar 2005
Posts: 70
R
rossi Offline OP
Forum Member
OP Offline
Forum Member
R
Joined: Mar 2005
Posts: 70
Hello Everyone.

I have a molecule with four (4) residues, and I want to select the number of molecules interacting within a certain distance of another molecule

Here is a snippet of the code for selecting the number of molecules near cor2. Either selection seems to work the same way ... incorrectly

define nearby sele .byresidue. ( resn MACR .and. ( prop Z .le. +10.0 ) .and. ( segid cor2 .around. 53.0 ) ) end
define nearby sele .byresidue. ( ( segid MACR .and resid 1:4 ) .and. ( prop Z .le. +10.0 ) .and. ( segid cor2 .around. 53.0 ) ) end

calc ntest = ?nsel / 53

There are definitely 53 atoms in the molecule with 4 residues. Since I am using .byresidue. it should give me the number of residues divided by 53 as a whole number. (If the moleculesurrounding COR2 has one (1) residue, it works just fine.)

The problem is that, for the 4 residue molecule, ntest is NOT a whole number. HELP! All different attempts at selection do not work (e.g. without using .byresidue.).

If you view the final results with vmd, then some of the molecules near COR2 have the correct number of residues (i.e. 4) but there are others with only one (1) residue. That's why I am getting a
selection value (ntest) that is not a whole number.

Can you please help me with a selection command that will always provide a selection with four (4) residues?

Thanks so much for your help with this.

Kind regards and Happy New Year (2021)!

Angelo

Re: A selection problem
rossi #38140 12/31/20 05:25 PM
Joined: Sep 2003
Posts: 8,572
Likes: 9
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,572
Likes: 9
How big is the box? Is the COR2 segment centered in the middle of the box? Is each MACR residue a whole molecule? Or is each molecule in the MACR segment composed of multiple (e.g. 4) residues?

The value 53.0 is a fairly large cutoff distance for the .around. operator, esp. to characterize interactions.

The .byres. operator will not select a whole molecule if some of the residues in the molecule are outside the other criteria (.around. and prop Z), so you may need additional selections that utilize the .bonded. operator to get the whole molecules.

Ideally, whole molecules are either residues or segments; a segment with many multiple residue molecules poses distinct challenges fro atom selection.


Rick Venable
computational chemist

Re: A selection problem
rmv #38141 12/31/20 05:59 PM
Joined: Mar 2005
Posts: 70
R
rossi Offline OP
Forum Member
OP Offline
Forum Member
R
Joined: Mar 2005
Posts: 70
Dear Rick,

Thanks for helping me.

COR2 is a graphene molecule and flat.

Before the selection, I issue the command coor orient select resname COR2 end which ensures that it is in the xy-plane. It has a large radius so that a large .around. value allows molecules
interacting with it to be selected. Also, using prop Z is a way to select molecules above the xy-plane of the graphene.

The box size is x by y by z is 50 x 50 x 115 and has a complicated mix of molecules

How about this after the above selection:

format(I5)

calc ntest = ?nsel / 4

format

Now I have the number of molecules.

Can I somehow use .subset. to get the molecules I want? I am not sure.

I will try the following

set newnearby select nearby .subset 1:@ntest end

Regards,

Angelo


Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 5.6.33-0+deb8u1 Page Time: 0.010s Queries: 20 (0.003s) Memory: 0.9056 MB (Peak: 0.9780 MB) Data Comp: Off Server Time: 2021-09-17 08:12:48 UTC
Valid HTML 5 and Valid CSS