Discussion:
[gmx-users] gmx select with coordinates
Shan Jayasinghe
2018-09-27 06:14:57 UTC
Permalink
Dear Gromacs users,

I want to make an index files with particular x and y coordinates. There is
no restriction for z coordinates. How can I do it with gmx_select? I
already tried with the following command. However, it seems I don't get the
result I want.

gmx select '[45, 90] and [45, 125] and [90, 90] and [90, 125]' -f run05.xtc
-s run05.tpr -b 390000 -e 400000 -on index.ndx

Can anyone help me?

Thank you.
--
Gromacs Users mailing list

* Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-***@gromacs.org.
Shan Jayasinghe
2018-09-27 11:51:23 UTC
Permalink
Dear Gromacs users,

I want to make an index files with molecules in a particular area. I have
four x,y coordinates [(45, 90), (45, 125), (90, 90) and (90, 125)] which
define an area of the system. How can I do it with gmx_select?

Can anyone help me?

Thank you.

On Thu, Sep 27, 2018 at 4:14 PM Shan Jayasinghe <
Post by Shan Jayasinghe
Dear Gromacs users,
I want to make an index files with particular x and y coordinates. There
is no restriction for z coordinates. How can I do it with gmx_select? I
already tried with the following command. However, it seems I don't get the
result I want.
gmx select '[45, 90] and [45, 125] and [90, 90] and [90, 125]' -f
run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx
Can anyone help me?
Thank you.
--
Best Regards
Shan Jayasinghe
--
Gromacs Users mailing list

* Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-***@gromacs.org.
Dan Gil
2018-09-27 13:59:42 UTC
Permalink
Hi,

I believe you are trying to select atoms/particles that are in an
infinitely tall box with the vertices (45, 90), (45, 125), (90, 90) and
(90, 125)?

Gmx select uses commands that are similar in syntax to a software called
VMD. So I like to use VMD to figure out what I need to give to gmx select
in order to get the selections I want.

For example, I think for what you want, I would do:

gmx select -f run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx
[Press Enter]
x > 45 and x < 90 and y > 90 and y < 125 [Press Enter]

If you want to include it in a script without manual user input:

echo x > 45 and x < 90 and y > 90 and y < 125 | gmx select -f run05.xtc -s
run05.tpr -b 390000 -e 400000 -on index.ndx

VMD is great! It's also free software if you haven't tried using it yet.
The only thing you gotta watch out for is that VMD uses Angstroms while GMX
uses nm.

Dan

On Thu, Sep 27, 2018 at 7:51 AM Shan Jayasinghe <
Post by Shan Jayasinghe
Dear Gromacs users,
I want to make an index files with molecules in a particular area. I have
four x,y coordinates [(45, 90), (45, 125), (90, 90) and (90, 125)] which
define an area of the system. How can I do it with gmx_select?
Can anyone help me?
Thank you.
On Thu, Sep 27, 2018 at 4:14 PM Shan Jayasinghe <
Post by Shan Jayasinghe
Dear Gromacs users,
I want to make an index files with particular x and y coordinates. There
is no restriction for z coordinates. How can I do it with gmx_select? I
already tried with the following command. However, it seems I don't get
the
Post by Shan Jayasinghe
result I want.
gmx select '[45, 90] and [45, 125] and [90, 90] and [90, 125]' -f
run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx
Can anyone help me?
Thank you.
--
Best Regards
Shan Jayasinghe
--
Gromacs Users mailing list
* Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
--
Gromacs Users mailing list

* Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-***@gromacs.org.
Shan Jayasinghe
2018-09-28 01:29:29 UTC
Permalink
Dear Prof. Dan,

Thank you very much for the suggestion. However, when I gave the command;
gmx select -f run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx in
VMD TkConsole, I didn't get any output.

I didn't get the cursor in next line to type x > 45 and x < 90 and y > 90
and y. What could be the reason for this? Appreciate, if you can reply me.

Thank you.
Post by Dan Gil
Hi,
I believe you are trying to select atoms/particles that are in an
infinitely tall box with the vertices (45, 90), (45, 125), (90, 90) and
(90, 125)?
Gmx select uses commands that are similar in syntax to a software called
VMD. So I like to use VMD to figure out what I need to give to gmx select
in order to get the selections I want.
gmx select -f run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx
[Press Enter]
x > 45 and x < 90 and y > 90 and y < 125 [Press Enter]
echo x > 45 and x < 90 and y > 90 and y < 125 | gmx select -f run05.xtc -s
run05.tpr -b 390000 -e 400000 -on index.ndx
VMD is great! It's also free software if you haven't tried using it yet.
The only thing you gotta watch out for is that VMD uses Angstroms while GMX
uses nm.
Dan
On Thu, Sep 27, 2018 at 7:51 AM Shan Jayasinghe <
Post by Shan Jayasinghe
Dear Gromacs users,
I want to make an index files with molecules in a particular area. I have
four x,y coordinates [(45, 90), (45, 125), (90, 90) and (90, 125)] which
define an area of the system. How can I do it with gmx_select?
Can anyone help me?
Thank you.
On Thu, Sep 27, 2018 at 4:14 PM Shan Jayasinghe <
Post by Shan Jayasinghe
Dear Gromacs users,
I want to make an index files with particular x and y coordinates.
There
Post by Shan Jayasinghe
Post by Shan Jayasinghe
is no restriction for z coordinates. How can I do it with gmx_select? I
already tried with the following command. However, it seems I don't get
the
Post by Shan Jayasinghe
result I want.
gmx select '[45, 90] and [45, 125] and [90, 90] and [90, 125]' -f
run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx
Can anyone help me?
Thank you.
--
Best Regards
Shan Jayasinghe
--
Gromacs Users mailing list
* Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
--
Gromacs Users mailing list
* Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
--
Best Regards
Shan Jayasinghe
--
Gromacs Users mailing list

* Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-***@gromacs.org.
Dan Gil
2018-10-09 19:53:02 UTC
Permalink
Hi Shan,

Sorry it's been a while - I don't check this email too often. Did you
figure the problem out?

I use the Graphical Representations menu of VMD, although I am sure there
is a way to do it in the console too.

On Thu, Sep 27, 2018 at 9:35 PM Shan Jayasinghe <
Post by Shan Jayasinghe
Dear Prof. Dan,
Thank you very much for the suggestion. However, when I gave the command;
gmx select -f run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx in
VMD TkConsole, I didn't get any output.
I didn't get the cursor in next line to type x > 45 and x < 90 and y > 90
and y. What could be the reason for this? Appreciate, if you can reply me.
Thank you.
Post by Dan Gil
Hi,
I believe you are trying to select atoms/particles that are in an
infinitely tall box with the vertices (45, 90), (45, 125), (90, 90) and
(90, 125)?
Gmx select uses commands that are similar in syntax to a software called
VMD. So I like to use VMD to figure out what I need to give to gmx select
in order to get the selections I want.
gmx select -f run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx
[Press Enter]
x > 45 and x < 90 and y > 90 and y < 125 [Press Enter]
echo x > 45 and x < 90 and y > 90 and y < 125 | gmx select -f run05.xtc
-s
Post by Dan Gil
run05.tpr -b 390000 -e 400000 -on index.ndx
VMD is great! It's also free software if you haven't tried using it yet.
The only thing you gotta watch out for is that VMD uses Angstroms while
GMX
Post by Dan Gil
uses nm.
Dan
On Thu, Sep 27, 2018 at 7:51 AM Shan Jayasinghe <
Post by Shan Jayasinghe
Dear Gromacs users,
I want to make an index files with molecules in a particular area. I
have
Post by Dan Gil
Post by Shan Jayasinghe
four x,y coordinates [(45, 90), (45, 125), (90, 90) and (90, 125)]
which
Post by Dan Gil
Post by Shan Jayasinghe
define an area of the system. How can I do it with gmx_select?
Can anyone help me?
Thank you.
On Thu, Sep 27, 2018 at 4:14 PM Shan Jayasinghe <
Post by Shan Jayasinghe
Dear Gromacs users,
I want to make an index files with particular x and y coordinates.
There
Post by Shan Jayasinghe
Post by Shan Jayasinghe
is no restriction for z coordinates. How can I do it with
gmx_select? I
Post by Dan Gil
Post by Shan Jayasinghe
Post by Shan Jayasinghe
already tried with the following command. However, it seems I don't
get
Post by Dan Gil
Post by Shan Jayasinghe
the
Post by Shan Jayasinghe
result I want.
gmx select '[45, 90] and [45, 125] and [90, 90] and [90, 125]' -f
run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx
Can anyone help me?
Thank you.
--
Best Regards
Shan Jayasinghe
--
Gromacs Users mailing list
* Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
--
Gromacs Users mailing list
* Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
--
Best Regards
Shan Jayasinghe
--
Gromacs Users mailing list
* Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
--
Gromacs Users mailing list

* Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-***@gromacs.org.
Shan Jayasinghe
2018-12-09 23:06:07 UTC
Permalink
Hi Prof. Dan,

Thank you very much for the e-mail. How do we define coordinates what we
want in VMD Graphical Representation menu?

Thank you.
Post by Dan Gil
Hi Shan,
Sorry it's been a while - I don't check this email too often. Did you
figure the problem out?
I use the Graphical Representations menu of VMD, although I am sure there
is a way to do it in the console too.
On Thu, Sep 27, 2018 at 9:35 PM Shan Jayasinghe <
Post by Shan Jayasinghe
Dear Prof. Dan,
Thank you very much for the suggestion. However, when I gave the command;
gmx select -f run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx in
VMD TkConsole, I didn't get any output.
I didn't get the cursor in next line to type x > 45 and x < 90 and y > 90
and y. What could be the reason for this? Appreciate, if you can reply
me.
Post by Shan Jayasinghe
Thank you.
Post by Dan Gil
Hi,
I believe you are trying to select atoms/particles that are in an
infinitely tall box with the vertices (45, 90), (45, 125), (90, 90) and
(90, 125)?
Gmx select uses commands that are similar in syntax to a software
called
Post by Shan Jayasinghe
Post by Dan Gil
VMD. So I like to use VMD to figure out what I need to give to gmx
select
Post by Shan Jayasinghe
Post by Dan Gil
in order to get the selections I want.
gmx select -f run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx
[Press Enter]
x > 45 and x < 90 and y > 90 and y < 125 [Press Enter]
echo x > 45 and x < 90 and y > 90 and y < 125 | gmx select -f run05.xtc
-s
Post by Dan Gil
run05.tpr -b 390000 -e 400000 -on index.ndx
VMD is great! It's also free software if you haven't tried using it
yet.
Post by Shan Jayasinghe
Post by Dan Gil
The only thing you gotta watch out for is that VMD uses Angstroms while
GMX
Post by Dan Gil
uses nm.
Dan
On Thu, Sep 27, 2018 at 7:51 AM Shan Jayasinghe <
Post by Shan Jayasinghe
Dear Gromacs users,
I want to make an index files with molecules in a particular area. I
have
Post by Dan Gil
Post by Shan Jayasinghe
four x,y coordinates [(45, 90), (45, 125), (90, 90) and (90, 125)]
which
Post by Dan Gil
Post by Shan Jayasinghe
define an area of the system. How can I do it with gmx_select?
Can anyone help me?
Thank you.
On Thu, Sep 27, 2018 at 4:14 PM Shan Jayasinghe <
Post by Shan Jayasinghe
Dear Gromacs users,
I want to make an index files with particular x and y coordinates.
There
Post by Shan Jayasinghe
Post by Shan Jayasinghe
is no restriction for z coordinates. How can I do it with
gmx_select? I
Post by Dan Gil
Post by Shan Jayasinghe
Post by Shan Jayasinghe
already tried with the following command. However, it seems I don't
get
Post by Dan Gil
Post by Shan Jayasinghe
the
Post by Shan Jayasinghe
result I want.
gmx select '[45, 90] and [45, 125] and [90, 90] and [90, 125]' -f
run05.xtc -s run05.tpr -b 390000 -e 400000 -on index.ndx
Can anyone help me?
Thank you.
--
Best Regards
Shan Jayasinghe
--
Gromacs Users mailing list
* Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
or
Post by Shan Jayasinghe
Post by Dan Gil
--
Gromacs Users mailing list
* Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
--
Best Regards
Shan Jayasinghe
--
Gromacs Users mailing list
* Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
--
Gromacs Users mailing list
* Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
--
Best Regards
Shan Jayasinghe
--
Gromacs Users mailing list

* Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-***@gromacs.org.
Continue reading on narkive:
Loading...