# How to create an index file for 1st and 5th carbon of the 1st lipid molecule in a lipid bilayer

**URL:** <https://gromacs.bioexcel.eu/t/how-to-create-an-index-file-for-1st-and-5th-carbon-of-the-1st-lipid-molecule-in-a-lipid-bilayer/2496>\
**Category:** User discussions\
**Created:** [July 12, 2021, 7:14am UTC](https://gromacs.bioexcel.eu/t/how-to-create-an-index-file-for-1st-and-5th-carbon-of-the-1st-lipid-molecule-in-a-lipid-bilayer/2496 "2021-07-12T07:14:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![samapika](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@samapika](https://gromacs.bioexcel.eu/u/samapika)\
**Post date:** [July 12, 2021, 7:14am UTC](https://gromacs.bioexcel.eu/t/how-to-create-an-index-file-for-1st-and-5th-carbon-of-the-1st-lipid-molecule-in-a-lipid-bilayer/2496/1 "2021-07-12T07:14:46Z")

</div>

GROMACS version:2018.1  
GROMACS modification: No  
Hello  
I have a homogenous lipid bilayer containing 128 lipid molecules.  
I need to create index files for all of the 128 lipid molecules individually.  
For the 1st lipid molecule index file the 1st and the 5th carbon need to be selected to describe a vector. Similarly for 128 such lipid molecules 128 index file needs to be created.

How should I approach?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Ali](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/ali/32/170_2.png) [@Ali](https://gromacs.bioexcel.eu/u/Ali)\
**Post date:** [July 13, 2021, 3:53pm UTC](https://gromacs.bioexcel.eu/t/how-to-create-an-index-file-for-1st-and-5th-carbon-of-the-1st-lipid-molecule-in-a-lipid-bilayer/2496/2 "2021-07-13T15:53:02Z")

</div>

See [here](http://www.mdtutorials.com/gmx/membrane_protein/09_analysis.html) for some good examples.  
Using a `.gro` file, you can make selections based on atom numbers, e.g. in `gmx make_ndx`, you might select the first and second 100 atoms by:

```auto
> a 1-100
> a 101-200
> q

```

selections from each group then is easy. Let’s say you need to select C1 and C5 from the first 100 atoms (called group number e.g. 15)

```auto
> 15 & a C1
> 15 & a C5

```

Good luck.

---

<div class="post-metadata">

**Author:** ![samapika](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@samapika](https://gromacs.bioexcel.eu/u/samapika)\
**Post date:** [July 14, 2021, 5:46am UTC](https://gromacs.bioexcel.eu/t/how-to-create-an-index-file-for-1st-and-5th-carbon-of-the-1st-lipid-molecule-in-a-lipid-bilayer/2496/3 "2021-07-14T05:46:39Z")

</div>

thanks a lot for your suggestions and time. I will work on it.
