You are here

change DOF of NH3 group in N terminus

4 posts / 0 new
Last post
change DOF of NH3 group in N terminus

Hello everyone!

I am trying to change PHI angle, which associated with the 1H atom in NH3 group (that change also moves 2H and 3H atoms). If I set only this parameter through function set_dof everything works fine. However, if I change bond length of C atom (next to the first CA) and bond length of 1H atom (in NH3 group) even with the same values before setting 1H PHI angle it makes change in PHI angle of sidechain CB atom on same value. This change can be detected by writing a pdb file. Here an example and output (pdbs files are attached).

#include <core/import_pose/import_pose.hh>
#include <numeric/NumericTraits.hh>
#include <core/pose/util.hh>
#include <core/pose/Pose.hh>
#include <core/conformation/util.hh>
#include <devel/init.hh>
#include <core/pose/annotated_sequence.hh>

int main( int argc, char * argv [] )
    devel::init(argc, argv);
    core::pose::Pose peptide;
    core::pose::make_pose_from_sequence(peptide, "AAA", *core::chemical::ChemicalManager::get_instance()->residue_type_set( core::chemical::FA_STANDARD ));
    for (size_t i = 1; i <= peptide.total_residue(); i++ )
        peptide.set_phi(i, -135.0);
        peptide.set_psi(i, 135.0);
        peptide.set_omega(i, 179.8);
    size_t seqpos = 1;                 

    core::id::AtomID H1_aid(peptide.residue(seqpos).type().all_bb_atoms().at(5), seqpos);
    std::cout << peptide.residue(seqpos).atom_name(peptide.residue(seqpos).type().all_bb_atoms().at(5)) << std::endl;
    core::id::AtomID C_aid(peptide.residue(seqpos).type().mainchain_atoms().at(3), seqpos);
    std::cout << peptide.residue(seqpos).atom_name(peptide.residue(seqpos).type().mainchain_atoms().at(3)) << std::endl;
    core::id::AtomID CB_aid(peptide.residue(seqpos).type().all_sc_atoms().at(1), seqpos);
    std::cout << peptide.residue(seqpos).atom_name(peptide.residue(seqpos).type().all_sc_atoms().at(1)) << std::endl;
    std::cout << "\ndof: " << peptide.dof(core::id::DOF_ID(CB_aid, core::id::PHI)) << std::endl;

    peptide.set_dof(core::id::DOF_ID(H1_aid, core::id::D), peptide.dof(core::id::DOF_ID(H1_aid, core::id::D)) );
    peptide.set_dof(core::id::DOF_ID(C_aid, core::id::D), peptide.dof(core::id::DOF_ID(C_aid, core::id::D)) );
    peptide.set_dof(core::id::DOF_ID(H1_aid, core::id::PHI), 3.14*0.5 );
    std::cout << "\ndof: " << peptide.dof(core::id::DOF_ID(CB_aid, core::id::PHI)) << std::endl;

    core::import_pose::pose_from_pdb( peptide, "1.pdb", 0 );
    std::cout << "\ndof: " << peptide.dof(core::id::DOF_ID(CB_aid, core::id::PHI)) << std::endl;

dof: -2.14326
dof: -2.14326
dof: -0.573347

So, the questions are, why changes in mc and bb atoms cause change in sc atom and is there a way to avoid this problem?


extended.pdb2.69 KB
1.pdb2.69 KB
Post Situation: 
Wed, 2016-02-03 02:22

I'm not completely sure I understand the question, but I think the answer is the AtomTree.  Unless you changed it (and you didn't), N of residue 1 should be the root of the atom tree.  Because Rosetta works in internal coordinates, all position changes are generated as internal coordinate movements between that root atom and the atom that's moving.

In your case, atoms N, CA, CB, and 1/2/3HB do not move between poses extended and 1.  When you rotate PHI, the terminal H and then the rest of the chain rotates around N-CA, as it should.  I guess you can argue 1H/2H/3H shouldn't be moving - I think it's a consequence of fiddling with PHI on a terminal residue that doesn't really have PHI.

Another issue I note with your code is that you are probably getting stale coordinates.  set_dof triggers residue_torsions_need_updating_ without actually doing it, and then reading the dof won't update them either.  Dumping pose peptide to a file and reading it back in will do this update (as would just dumping it without reading it back in, or doing something trivial like peptide.residue(1) (ignoring the return value).  

Wed, 2016-02-03 08:22

You actually understood and answered on one of my questions, I forgot that the root atom is N (thougth that was first CA).
>it's a consequence of fiddling with PHI on a terminal residue that doesn't really have PHI.
As I see now N have not neither PHI nor THETA.

>Another issue I note with your code is that you are probably getting stale coordinates.
Yes, its looks like this. The set_dof function has indeed the trigger and I thougth it works before posting.

>something trivial like peptide.residue(1) (ignoring the return value)
That, unfortunately, does not work. Setting peptide.residue(1) after my 3.14*0.5 change do not update CB dof. Pose dumb_pdb function refers to core::io::pdb::FileData::dump_pdb from, but I do not see where is update happening. Could you, please, spot the place where the update occurs or give me some other function to invoke?

My second question was, how to avoid change in sidechain CB PHI when changes happen in 1H (PHI and D) and C (D)? It is seems impossible via DOFs change without dumping before 3.14*0.5 change. This question will probably disappear when you specify to me a way for updating DOFs.

Thanks for your explanation.

Thu, 2016-02-04 00:00

I am sorry, forgive my haste. peptide.residue(1) after each set_dof do the trick. The problem is solved, thanks.

Thu, 2016-02-04 00:07