[gmx-users] How to choose two atoms at the same time, using g_select selection.dat

Teemu Murtola teemu.murtola at cbr.su.se
Thu Apr 26 10:28:31 CEST 2012


On Thu, Apr 26, 2012 at 04:19, mu xiaojia <muxiaojia2010 at gmail.com> wrote:
> e.g, I want to make an "HN" group of both H and N from my 2nd residue,

There are multiple ways to achieve what you want with g_select.
Probably the easiest is
  "resnr 2 and name H N",
or if you need the atoms in a different order (changing the order of H
and N above has no effect),
  "resnr 2 and name H N permute 2 1".
You can also use plus or merge using the syntax "nameH plus nameN"
(plus and merge are equivalent if you are merging selections with
single atoms), but they are meant for more complex situations. You
cannot assign the result of a plus/merge into a variable, which may be
your source of confusion.

- Teemu



More information about the gromacs.org_gmx-users mailing list