From: John Stone (
Date: Tue Oct 06 2020 - 10:55:54 CDT

  I wanted to mention a new feature in the test builds of VMD 1.9.4,
which is a command that builds a new molecule from an arbitrary
set of selections in any number of other molecules:
  mol fromsels $sel1 $sel2 .... $selX

The main advantage of using that approach vs. others, is that the heavy
lifting is done entirely internally in VMD, thereby avoiding scripting
overheads and/or file I/O, so it's particularly good when dealing with
very large selections, large numbers of selections, and large
resulting structures.

  John Stone

On Thu, Oct 01, 2020 at 06:01:07PM -0600, Josh Vermaas wrote:
> I don't think so. The way I'd do it is to *either* merge the two molecules
> together (topotools mergemols,
> [1]
> first, or use the selection for a specific coordinate of interest. The
> standard way of picking within 5 Angstroms of the point (5,-2,3) is:
> ((x-5)*(x-5)+(y+2)*(y+2)+(z-3)*(z-3)<5*5)
> -Josh
> On Thu, Oct 1, 2020 at 11:48 AM Asghar Razavi <[2]>
> wrote:
> If I have two separate molecules in VMD, e.g. mol 0 and mol 1, is there
> a way to use the "within" command to select atoms from mol 0 that are
> within 5 angstrom of residue A in mol 1?
> References
> Visible links
> 1.
> 2.

NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801           Phone: 217-244-3349