# Help centering, fitting, and analysis on a protein that contains a chain of D-residues

**URL:** <https://gromacs.bioexcel.eu/t/help-centering-fitting-and-analysis-on-a-protein-that-contains-a-chain-of-d-residues/11444>\
**Category:** User discussions\
**Tags:** analysis-tools, gmx-trjconv\
**Created:** [February 3, 2025, 2:24pm UTC](https://gromacs.bioexcel.eu/t/help-centering-fitting-and-analysis-on-a-protein-that-contains-a-chain-of-d-residues/11444 "2025-02-03T14:24:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsamdin](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tsamdin](https://gromacs.bioexcel.eu/u/tsamdin)\
**Post date:** [February 3, 2025, 2:24pm UTC](https://gromacs.bioexcel.eu/t/help-centering-fitting-and-analysis-on-a-protein-that-contains-a-chain-of-d-residues/11444/1 "2025-02-03T14:24:40Z")

</div>

GROMACS version: 2024.1  
GROMACS modification: No

Is there a way to have gmx trjconv center on multiple groups at once? My simulated protein has both L and D residues in the main chain. However, the choices I’m offered split the protein into the L residue component (Group 1), and each D residue as an individual component (Groups 13 - 18).

Or is there a way to have gromacs read my .tpr file and recognize that the L and D residue components should be counted as one group?

[samdintd@cn4270 concatonate]$ gmx trjconv -s md\_66\_0\_50.tpr -f md\_66\_0\_300.xtc -o md\_66\_0\_300\_reimage\_test.xtc -pbc mol -ur compact -center  
:-) GROMACS - gmx trjconv, 2024.4 (-:

Executable: /usr/local/apps/gromacs/2024.4-intel2022/bin/gmx  
Data prefix: /usr/local/apps/gromacs/2024.4-intel2022  
Working dir: /gpfs/gsfs12/users/samdintd/gromacs/Ripple/strand\_4/output\_S4\_16\_0066/concatonate  
Command line:  
gmx trjconv -s md\_66\_0\_50.tpr -f md\_66\_0\_300.xtc -o md\_66\_0\_300\_reimage\_test.xtc -pbc mol -ur compact -center

Note that major changes are planned in future for trjconv, to improve usability and utility.  
Will write xtc: Compressed trajectory (portable xdr format): xtc  
Reading file md\_66\_0\_50.tpr, VERSION 2024.1 (single precision)  
Reading file md\_66\_0\_50.tpr, VERSION 2024.1 (single precision)  
Select group for centering  
Group 0 ( System) has 13758 elements  
Group 1 ( Protein) has 784 elements  
Group 2 ( Protein-H) has 383 elements  
Group 3 ( C-alpha) has 50 elements  
Group 4 ( Backbone) has 150 elements  
Group 5 ( MainChain) has 200 elements  
Group 6 ( MainChain+Cb) has 246 elements  
Group 7 ( MainChain+H) has 251 elements  
Group 8 ( SideChain) has 533 elements  
Group 9 ( SideChain-H) has 183 elements  
Group 10 ( Prot-Masses) has 784 elements  
Group 11 ( non-Protein) has 12974 elements  
Group 12 ( Other) has 107 elements  
Group 13 ( DPHE) has 20 elements  
Group 14 ( DGLU) has 15 elements  
Group 15 ( DILE) has 19 elements  
Group 16 ( DASN) has 14 elements  
Group 17 ( DLEU) has 19 elements  
Group 18 ( DSER) has 12 elements  
Group 19 ( NA) has 9 elements  
Group 20 ( CLA) has 8 elements  
Group 21 ( Water) has 12858 elements  
Group 22 ( SOL) has 12858 elements  
Group 23 ( non-Water) has 900 elements  
Group 24 ( Ion) has 9 elements  
Group 25 ( Water\_and\_ions) has 12867 elements

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [February 3, 2025, 2:42pm UTC](https://gromacs.bioexcel.eu/t/help-centering-fitting-and-analysis-on-a-protein-that-contains-a-chain-of-d-residues/11444/2 "2025-02-03T14:42:34Z")

</div>

What do you mean precisely with center on multiple groups?

If the group you want to center is not available in the standard index file or in the .tpr you are using, you can generate a new index file with `gmx make_ndx` that contains the group with respect to which you plan to center, and then pass this new index file to `gmx trjconv`.
