# Gmx command with additional input with csh

**URL:** <https://gromacs.bioexcel.eu/t/gmx-command-with-additional-input-with-csh/3611>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [February 6, 2022, 3:46am UTC](https://gromacs.bioexcel.eu/t/gmx-command-with-additional-input-with-csh/3611 "2022-02-06T03:46:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![explodedpt](https://avatars.discourse-cdn.com/v4/letter/e/8baadc/32.png) [@explodedpt](https://gromacs.bioexcel.eu/u/explodedpt)\
**Post date:** [February 6, 2022, 3:46am UTC](https://gromacs.bioexcel.eu/t/gmx-command-with-additional-input-with-csh/3611/1 "2022-02-06T03:46:10Z")

</div>

GROMACS version: 2021.3  
GROMACS modification: No  
Here post your question

Hello, recently I have started using csh when I run gromacs.  
I feel it is very convenient cause I can do all simulation with one command.  
But I don’t know how to set selection with csh.

For example, when I run the following csh file I have to type ‘10 0’ manually.

* * *

#!/bin/csh

# 

gmx energy -f step4.0\_minimization.edr -o step4.0\_potential.xvg  
10 0

end

* * *

## Select the terms you want from the following list by selecting either (part of) the name or the number or a combination. End your selection with an empty line or a zero.

1 Bond 2 U-B 3 Proper-Dih. 4 Improper-Dih.  
5 CMAP-Dih. 6 LJ-14 7 Coulomb-14 8 LJ-(SR)  
9 Coulomb-(SR) 10 Coul.-recip. 11 Position-Rest. 12 Dih.-Rest.  
13 Potential 14 Pressure 15 Constr.-rmsd 16 Vir-XX  
17 Vir-XY 18 Vir-XZ 19 Vir-YX 20 Vir-YY  
21 Vir-YZ 22 Vir-ZX 23 Vir-ZY 24 Vir-ZZ  
25 Pres-XX 26 Pres-XY 27 Pres-XZ 28 Pres-YX  
29 Pres-YY 30 Pres-YZ 31 Pres-ZX 32 Pres-ZY  
33 Pres-ZZ 34 #Surf\*SurfTen 35 T-rest

* * *

I have tried ‘\>10 0’ instead, but it doesn’t work.  
Is there any way to set selection in one gmx command line?

Any suggestion would be greatly appreciated.  
Thanks!

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [February 6, 2022, 4:19am UTC](https://gromacs.bioexcel.eu/t/gmx-command-with-additional-input-with-csh/3611/2 "2022-02-06T04:19:57Z")

</div>

Try this:  
`echo 10 0 | gmx energy -f step4.0_minimization.edr -o step4.0_potential.xvg`

---

<div class="post-metadata">

**Author:** ![explodedpt](https://avatars.discourse-cdn.com/v4/letter/e/8baadc/32.png) [@explodedpt](https://gromacs.bioexcel.eu/u/explodedpt)\
**Post date:** [February 6, 2022, 1:28pm UTC](https://gromacs.bioexcel.eu/t/gmx-command-with-additional-input-with-csh/3611/3 "2022-02-06T13:28:32Z")

</div>

Oh that’s the way!!! Thanks a lot jalemkul!!!

I also have tried two selection, and it works too.  
echo 4 4 | gmx trjconv -s step4.1\_equilibration.tpr -f step4.1\_equilibration.xtc -o step4.1\_protein\_water.xtc -pbc nojump -ur compact -center -dt 10

* * *

## Reading file step4.1\_equilibration.tpr, VERSION 2021.3-dev-20210818-11266ae-dirty-unknown (single precision) Select group for centering Group 0 ( System) has 90396 elements Group 1 ( Protein) has 7850 elements Group 2 ( Protein-H) has 3952 elements Group 3 ( C-alpha) has 499 elements Group 4 ( Backbone) has 1497 elements Group 5 ( MainChain) has 1994 elements Group 6 ( MainChain+Cb) has 2471 elements Group 7 ( MainChain+H) has 2469 elements Group 8 ( SideChain) has 5381 elements Group 9 ( SideChain-H) has 1958 elements Group 10 ( Prot-Masses) has 7850 elements Group 11 ( non-Protein) has 82546 elements Group 12 ( Other) has 82546 elements Group 13 ( BGLCNA) has 54 elements Group 14 ( AMAN) has 22 elements Group 15 ( SOD) has 82 elements Group 16 ( CLA) has 77 elements Group 17 ( TIP3) has 82311 elements Select a group: Selected 4: ‘Backbone’ Select group for output Group 0 ( System) has 90396 elements Group 1 ( Protein) has 7850 elements Group 2 ( Protein-H) has 3952 elements Group 3 ( C-alpha) has 499 elements Group 4 ( Backbone) has 1497 elements Group 5 ( MainChain) has 1994 elements Group 6 ( MainChain+Cb) has 2471 elements Group 7 ( MainChain+H) has 2469 elements Group 8 ( SideChain) has 5381 elements Group 9 ( SideChain-H) has 1958 elements Group 10 ( Prot-Masses) has 7850 elements Group 11 ( non-Protein) has 82546 elements Group 12 ( Other) has 82546 elements Group 13 ( BGLCNA) has 54 elements Group 14 ( AMAN) has 22 elements Group 15 ( SOD) has 82 elements Group 16 ( CLA) has 77 elements Group 17 ( TIP3) has 82311 elements Select a group: Selected 4: ‘Backbone’ Reading frame 0 time 0.000 Precision of step4.1\_equilibration.xtc is 0.001 (nm) Using output precision of 0.001 (nm) Last frame 1 time 5.000

---

<div class="post-metadata">

**Author:** ![bjwiley23](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bjwiley23](https://gromacs.bioexcel.eu/u/bjwiley23)\
**Post date:** [November 20, 2022, 3:39am UTC](https://gromacs.bioexcel.eu/t/gmx-command-with-additional-input-with-csh/3611/4 "2022-11-20T03:39:43Z")

</div>

I saw this was only post that mentions `CMAP-Dih.` as an energy term. I have two energy terms which I am not seeing very often in this forum or on Google. They are:

```auto
2 Connect-Bonds
6 CMAP-Dih.

```

My system is a two chain protein and I am using OPLS-AA forcefield. When I run the complex with the ligand I see `2 Angle` replaces `2 Connect-Bonds` but then I see another energy term for `6 Periodic-Improper-Dih.`

What are `Connect-Bonds` and also what is difference between `Improper-Dih.` and `Periodic-Improper-Dih.`

---

<div class="post-metadata">

**Author:** ![bjwiley23](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bjwiley23](https://gromacs.bioexcel.eu/u/bjwiley23)\
**Post date:** [November 20, 2022, 3:53am UTC](https://gromacs.bioexcel.eu/t/gmx-command-with-additional-input-with-csh/3611/5 "2022-11-20T03:53:33Z")

</div>

Ok I see ACPYPE generates forcefield with periodic function type 9. Makes sense I see it in ligand and complex but not protein. See unsure of the `Connect-Bonds` vs. shouldn’t I typically see `Angle` here?

```auto
[dihedrals] ; propers
; for gromacs 4.5 or higher, using funct 9
; i j k l func phase kd pn
     1 4 3 6 9 180.00 15.16700 2 ; O1- C2- C1- C4
     1 4 3 8 9 180.00 15.16700 2 ; O1- C2- C1- C6

```
