# PCA done on backbone, how to make movie for whole protein?

**URL:** https://gromacs.bioexcel.eu/t/pca-done-on-backbone-how-to-make-movie-for-whole-protein/2924
**Category:** User discussions
**Created:** [October 6, 2021, 8:19pm UTC](https://gromacs.bioexcel.eu/t/pca-done-on-backbone-how-to-make-movie-for-whole-protein/2924 "2021-10-06T20:19:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pat1](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@pat1](https://gromacs.bioexcel.eu/u/pat1)
#### Post date: [October 6, 2021, 8:19pm UTC](https://gromacs.bioexcel.eu/t/pca-done-on-backbone-how-to-make-movie-for-whole-protein/2924/1 "2021-10-06T20:19:15Z")

</div>

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

Hi, I have done PCA on the backbone trajectory from a protein simulation using gmx covar and gmx anaeig.

But how do we extract the movie of the entire protein’s motion along the first two principal components from the PCA done on backbone trajectory?

So what I generally do is:

I have a protein structure file protein.gro and trajectory file protein.xtc, Iet’s say I extract backbone.gro and backbone.xtc and now do the following:

**gmx covar -s** backbone.gro **-f** backbone.xtc **-o** WT\_eigenval\_bb.xvg **-v** WT\_eigenvec\_bb.trr

**gmx anaeig -s** backbone.gro **-f** backbone.xtc **-v** WT\_eigenvec\_bb.trr **-2d** WT\_pca\_2d.xvg **-filt** backbone\_reduced.xtc **-first** 1 **-last** 2

This gives the movie of the backbone, but how do I get the movie of the whole protein along the first two eigenvectors. What I thought was to project the protein.xtc along the first two eigenvectors derived from the backbone motion like this:

**gmx anaeig -s** protein.gro **-f** protein.xtc **-v** WT\_eigenvec\_bb.trr **-2d** WT\_ _protein_ \_pca\_2d.xvg **-filt** protein\_reduced.xtc **-first** 1 **-last** 2

Can you please let me know if this is right?

Thank You!

PS note: the gromacs commands are inspired from the discussion of user: [minghao2121](https://gromacs.bioexcel.eu/u/minghao2121)

---

<div class="post-metadata">

### Author: ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)
#### Post date: [October 12, 2021, 6:32am UTC](https://gromacs.bioexcel.eu/t/pca-done-on-backbone-how-to-make-movie-for-whole-protein/2924/2 "2021-10-12T06:32:35Z")

</div>

You can only generate coordinates for atoms you have done the PCA on.
