Amber-MD / cpptraj

Biomolecular simulation trajectory/data analysis.
Other
138 stars 64 forks source link

Selecting second molecule #1065

Closed almeida85 closed 6 months ago

almeida85 commented 9 months ago

Hello,

I need to wrap and align a trajectory of a system prepared with CHARM-GUI. According to CHIMERA, the complex is composed of chain A (residues 1-236) and chain B (residues 237-665). I want to align the trajectory, without solvent taking the first chain as reference. My script looks like:

parm ../amber/step3_input.parm7
trajin ./step7.0_prod.nc    

autoimage   

strip :WAT,SOD nobox parmout step3_input_no_water.prmtop

rms fit ::A:1-236@C,CA,N

trajout step7.0_prod_no-solv.nc 

go

The output says:

0: [autoimage   ]
    Using first molecule as anchor.
    1 molecules are fixed to anchor: 2
    73269 molecules are mobile.

I also tried rms fit ::A:1-236@C,CA,Nto superpose against chain A, but always do it against chain B, which is somehow recognized as the first molecule.

How can I ensure that the fittong is against chain A?

Thanks in advance.

drroe commented 9 months ago

I don't think CHARMM-GUI automatically adds PDB info (like chain ID) to Amber topologies. You'll need to either use the addPDB command of parmed, or you can manually set the information using cpptraj's change command after the parm command, e.g.

parm ../amber/step3_input.parm7
change chainid of :1-236 to A
change chainid of :237-665 to B

Hope this helps.

drroe commented 8 months ago

Also, not sure why I didn't think of this before, but you can also select by molecule with the ^ operator. So if you want to do the RMSD of the first molecule (which presumably is chain A you could use e.g.:

rms R0 first ^1&@C,CA,N out rms.R0.dat

If you then want the RMSD of chain B (molecule 2) but still using the previous fit (to molecule 1) you would add the nofit keyword:

rms R1 first ^2&@C,CA,N nofit out rms.R1.dat

Let me know if this works!

drroe commented 6 months ago

Hopefully this issue is now resolved - if not please reopen it.