Help - coloring segments of an RNA chain

I have a single stranded RNA molecule that folds into 3D structure in the presence of a ligand. I would like to display the backbone as tube with base pairs as ladders. But really I want to display selected segments of the backbone in different colors so that I can differentiate them. The DS Visualizer does not treat groups of nucleotides as nucleic acids, and therefore I cannot manipulate the segments as DNA/RNA. Anybody can help?

Thanks
Answers 1
HP
HP 2009-12-30
The color of the backbone of a nucleic acid in the tube representation is currently a property at the chain level as far as I know. This means that all of the backbone of a particular nucleic acid chain will have the same color. However, you can manipulate the color of the ladder part of the display either by editing its color in the table view (if you only have a few to change colors for, otherwise this would be too tedious), or by using scripting. The second option could be done by
pasting a script such as the one attached below into a scripting window, then selecting the desired segments in the Molecule Window (after changing the display style to tube/ladder) and executing the script. The ladder parts for the selected nucleic acids will be changed to the color specified in line 25 of the script, which should allow you to differentiate the segment.

I hope this is helpful.
Marc


#######################################################
#!/usr/bin/perl -w
# Illustrate the use of Mdm::NucleicAcid objects.
use strict;
use MdmDiscoveryScript;

# Define some common colors by their RBG values
my $red = Mdm::Color::Create(255,0,0);
my $green = Mdm::Color::Create(0,255,0);
my $blue = Mdm::Color::Create(0,0,255);
my $yellow = Mdm::Color::Create(255,255,0);
my $lightblue = Mdm::Color::Create(0,255,255);
my $magenta = Mdm::Color::Create(255,0,255);

# Get the last Molecule Window that was active
my $document = DiscoveryScript::LastActiveDocument(MdmModelType);

# Get an array of all nucleic acids
my $nucleicAcids = $document->NucleicAcids;

# Iterate over all nucleic acids
foreach my $nucleicAcid (@$nucleicAcids) {
# Check if the current nucleic acid is selected
if ($nucleicAcid->IsSelected()) {
# If yes, change its color to e.g. green
$nucleicAcid->Color($green);
}
}

########################################################