I tried to fit the whole trajectory from molecular dynamics simulation (using Gromacs) using the initial structure (using -fit rot + trans), but when I compare two structures they are not aligned. Any suggestions?
Try fitting to the backbone or C-alpha. Trying to fit to the entire protein is very challenging, as side chain and other motions can impair the fitting algorithm (and they're not necessarily reflective of actual structural changes).
I want to align all pdbs resulting from clustering with one structure of a used trajectory of such clustering. When I see the pdb of the clustering and the one of the trajectory they are not together. And I performed docking with the trajectory data, but when I use the same box for pdbs the clusters pdbs these are not in the same frame of reference of the pdb trajectory.
So did you do the fit on the trajectory, or are you trying to fit multiple configurations that are in, e.g. a multi-frame PDB file? It shouldn't matter either way, but the best and most robust approach is:
1. Remove periodicity effects with trjconv -pbc (may take several steps, but for a simple protein in water, trjconv -pbc mol -center should work very easily)
2. Then run trjconv -fit rot+trans on the output of step 1
3. Cluster using the output of step 2, fitting to backbone or C-alpha and outputting the whole protein.
I have done that procedure many times and have never had an issue.
1. First, I removed periodicity effects with trjconv -pbc mol -center (fitting to backbone and outputting the whole protein)
2. I Run trjconv -fit rot+trans on the output of step 1(fitting to backbone and outputting the whole protein)
3. I Reduced the trajectory (because 'segmentation fault') with trjconv -dt, outputting the whole protein
4. Cluster using the output of step 3, fitting to backbone and outputting the whole protein.
Then, I separated the frames from trajectory reduced and the central clustering frames to analyse if they were together. Unfortunately they were not together. And I do not understand what is wrong.
I see the issue now. The fitting algorithms are different, so the frame in the original trajectory won't necessarily have the same coordinates as the output from clustering. The clustering does N x N fitting (where N is the number of frames) and assembles the clusters after doing fitting against the structures in those frames. The fitting done by trjconv is only ever done against the reference coordinates in the structure file passed to -s.
I think I finally solve the problem. I selected one pdb of the reduced trajectory and then ran the fit rot + trans to -cl cluster.xtc (the central structures of each cluster). All they structures compared was now together (of the trajectory with the clustering).