Extension of RasMol to Display Surfaces,
to Handle CML/XML and Other New Features

by
 
Herbert J. Bernstein
Dowling College, Oakdale, NY 11769, USA
 
Frances C. Bernstein
Bernstein + Sons, Bellport, NY 11713, USA
 
(Work Supported in part (for HJB) by NSF grant DBI-0203064)
(expanded report of talk presented at IUCr meeting in Geneva, August 2002)


RasMol


Capabilities being Added


Surface Calculation


Two Carbon atoms and an Oxygen probe


New Approach for RasMol


Reentrant surface formed by probe atom rolling in tangent contact


Top left: molecular surface;      Top Right: CPK model
Bottom Center: pseudo-bond three-membered ring


Transparent and Translucent Surfaces





Transparent rendering of alternate conformers of residue 29 of 4ins


The Basics of XML

XML Markup consists of

start-tags

<name>

<name attribute=value attribute=value ...>

-- marks the beginning of an XML element. The attribute-value pairs are optional and no attribute may appear more than once

end-tags

</name>

-- marks the end of the XML element begun by the start-tag with a matching name

empty-element

tags

<name/>

<name attribute=value attribute=value ... />

-- this is a special form equivalent to <name></name> or <name attribute=value attribute=value ...></name> which is used when a tag has no content

entity references

&name;

%name;

-- entity references refer to objects by name. The symbols "&", "<", ">", "'", and the double quote are represented by "&amp;", "&lt;", "&gt;", "&apos;", "&quot;" respectively.

character

references

&#nnn;

-- specifies a character with decimal unicode value nnn

 

&#xhhh;

-- specifies a character with hexadecimal unicode value hhh

comments

<!-- comment -->

-- this special markup is used to include comment text

CDATA sections

<![CDATA[ character_data ]]>

-- this special markup is used to embed text which might otherwise be interpreted as markup.

document type

declarations

<?xml version="1.0"?>

-- this optional special markup unambiguously identifies an XML document.

 

<!DOCTYPE name ... >

-- this optional special markup provides information on the markup declarations that define the grammar of the document.

element type

declarations

<!ELEMENT name contents>

 

attribute list

declarations

<!ATTLIST name elementname type default ... >

 

entity declarations

<!ENTITY name entity_definition >

<!ENTITY % name parsed_entity_definition >

 

notation

declarations

<!NOTATION name id >

 

processing

instructions

<?program_name parameters ?>

 

XML has been used as a framework for definition of a Chemical Markup Language (CML) [Murray-Rust, Rzepa 99]. The program Jmol [Gezelter 99] is able to display CML datasets. A typical fragment of a CML dataset presents atomic coordinates by columns, as seen in this example of methanol distributed as an example in the Jmol release:




<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE molecule SYSTEM "cml.dtd" []>
<molecule id="METHANOL">
  <atomArray>
     <stringArray builtin="id">a1 a2 a3 a4 a5 a6</stringArray>
     <stringArray builtin="elementType">C O H H H H</stringArray>
     <floatArray builtin="x3" units="pm">-0.748 0.558 -1.293 -1.263 -0.699 0.716
</floatArray>
     <floatArray builtin="y3" units="pm">-0.015 0.420 0.202 0.754 -0.934 1.404</floatArray>
     <floatArray builtin="z3" units="pm">0.024 -0.278 -0.901 0.600 0.609 0.137</floatArray>
  </atomArray>
</molecule>


Issues in Handling CML/XML in RasMol

Data used to translate from CML to mmCIF



typedef struct _cmlitem {

char* tag; char* atttag; char* valtag; char* atttag2; char* valtag2; char* ciftag; char* ciftag2; char* ciftag3; cifitem ciftype; } cmlitem; #define CMLlist 200 #define NULL (char *)0 static cmlitem CMLitems[CMLlist] = { { "atom", "id", "%", NULL, NULL, "_atom_site.label_atom_id", NULL, NULL, tag }, { "atomArray", NULL, NULL, NULL, NULL, "atom_site", NULL, NULL, category }, { "coordinate3", "builtin", "xyz3", NULL, NULL, "_atom_site.Cartn_x", "_atom_site.Cartn_y", "_atom_site.Cartn_z", tag }, …


CML File rendered by Jmol and RasMol

   

Example of CML/XML data set of Glycine Crystal from Jmol release kit, rendered on the left by Jmol and on the right by RasMol

References