Dear,
For the RNA defined as follows, I want to pin the first "A" to the ground. I would appreciate to know how I can relate MobilizedBody::pin .... to my code, or there may exist easier way to do that.
CompoundSystem system;
SimbodyMatterSubsystem matter(system);
DecorationSubsystem decoration(system);
DuMMForceFieldSubsystem forces(system);
forces.loadAmber99Parameters();
// Initialize molmodel objects
RNA rna("AAA");
rna.setCompoundBondMobility(BondMobility::Torsion);
rna.setRNABondMobility(BondMobility::Rigid,0,0);
rna.setRNABondMobility(BondMobility::Rigid,1,1);
rna.setRNABondMobility(BondMobility::Rigid,2,2);
system.adoptCompound(rna);
system.modelCompounds();
Pin the RNA to the ground
- Christopher Bruns
- Posts: 32
- Joined: Thu Apr 07, 2005 1:10 pm
RE: Pin the RNA to the ground
The modelCompounds() method automatically creates a multibody system based on the BondMobilities of the molecule. But modelCompounds() always creates molecules that are free to move with respect to Ground. There is no easy way for you to get around that behavior.
But you might be able to get the system to do what you want by adding a Constraint. For example, a Constraint::Weld could be used to affix a body in your model to a location in the Ground frame. If you want the same effect as a MobilizedBody::Pin, which has one rotational degree of freedom, you might need to apply multiple Constraints or create a custom Constraint. I don't see a Constraint in the documentation at https://simtk.org/api_docs/simtkcore/ap ... index.html that is equivalent to a MobilizedBody::Pin.
Be aware that adding Constraints might make your simulation slower.
But you might be able to get the system to do what you want by adding a Constraint. For example, a Constraint::Weld could be used to affix a body in your model to a location in the Ground frame. If you want the same effect as a MobilizedBody::Pin, which has one rotational degree of freedom, you might need to apply multiple Constraints or create a custom Constraint. I don't see a Constraint in the documentation at https://simtk.org/api_docs/simtkcore/ap ... index.html that is equivalent to a MobilizedBody::Pin.
Be aware that adding Constraints might make your simulation slower.