From: Ashar Malik (asharjm_at_gmail.com)
Date: Tue Feb 20 2018 - 03:35:19 CST

I am not familiar with Lammps data, however I can comment on VMD.

It has a very powerful atom selection language. This can help you make
selection in a number of ways.

Assuming your system is binary (gas/polymer) and each have separate
segments/chains, you can use those two.

For example if your chain A had gas and B had polymer, you can do

set sel [atomselect top "chain A and within 5 of chain B"]

This will select everything from chain A (gas in this example) which is
within 5 Ang of chain B (polymer in this example).
>From here to get the index number (which is of atoms not molecules) you can
do

$sel get index

where *sel* was the variable you selected in the previous step.

Other things apart from chain can also be selected ( see this:
http://www.ks.uiuc.edu/Research/vmd/vmd-1.3/ug/node133.html#SECTION001010000000000000000
)

If Lammps doesn't have chain identifiers, you can use atom names. E.g. if
you have a set of atoms that make your gas molecules which are different
from polymer atoms you can use those.

For example if your gas is just Oxygen and its atom type in your system is
OG (just made this up) and the polymer is e.g atoms X you can make a
selection like this:

set sel [atomselect top "name OG and within 5 of name X"]

$sel get index

*sel *will again have indices of atoms.

Have a look here for some more examples :
http://www.ks.uiuc.edu/Research/vmd/vmd-1.3/ug/node132.html

Also the examples illustrated above are not tested and only used for
explaining how you can couple things to make a selection and then recover
indices from that selection.

Hope this helps.

On Tue, Feb 20, 2018 at 8:31 PM, Jeams Anderson <anddersonnyc_at_gmail.com>
wrote:

> Dear All
>
> I have Lammps simulation file for some polymer and gas mixture. After 3ns
> simulation In VMD I could see that some of gas molecules are very close to
> the particular sites of polymer. Now I want to know the index number of
> those gas molecules for my further implementation.
>
> Any help about how can I do it??
>
> Thank you
>
> James
>

-- 
Best,
/A