# Centering ligands and protein

**URL:** <https://gromacs.bioexcel.eu/t/centering-ligands-and-protein/2266>\
**Category:** User discussions\
**Created:** [June 1, 2021, 11:45am UTC](https://gromacs.bioexcel.eu/t/centering-ligands-and-protein/2266 "2021-06-01T11:45:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![veerubiotech](https://avatars.discourse-cdn.com/v4/letter/v/e480ec/32.png) [@veerubiotech](https://gromacs.bioexcel.eu/u/veerubiotech)\
**Post date:** [June 1, 2021, 11:45am UTC](https://gromacs.bioexcel.eu/t/centering-ligands-and-protein/2266/1 "2021-06-01T11:45:26Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question  
I have a simulated a system of protein with two ligands. to centre the protein I ligand, I made index file consisting of protein and ligand. then i centred using following commands-

> Blockquote

gmx trjconv -s step4.0\_minimization.tpr -f output.xtc -o outputwhole.xtc -pbc whole -dt 10 n ligand.ndx  
gmx trjconv -s step4.0\_minimization.tpr -f outputwhole.xtc -o outputcluster.xtc -pbc cluster -dt 10 -n ligand.ndx  
gmx trjconv -s step4.0\_minimization.tpr -f outputcluster.xtc -o outputbox.xtc -pbc mol -center -dt 10 n ligand.ndx

> Blockquote

however in the pdb from trajectory, ligands are not centred. how can i centre the ligand?

Another question, can we output more than groups (eg protein and ligand) instead of using index file becuase gromacs have grouped them already.  
Appreciate your reply.

Thank you  
Best Regards  
Veeru

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [June 11, 2021, 12:48pm UTC](https://gromacs.bioexcel.eu/t/centering-ligands-and-protein/2266/2 "2021-06-11T12:48:18Z")

</div>

Hi  
did you try in the last step to use only -center?  
sorry I do not understand the last question. Can you reformulate?  
\Alessandra
