Difference between revisions of "Jmol testpage"

From NMReDATA
Jump to: navigation, search
(Using script)
 
(6 intermediate revisions by the same user not shown)
Line 19: Line 19:
 
<jmolFile>Chair.cml</jmolFile>
 
<jmolFile>Chair.cml</jmolFile>
 
</nowiki></code>
 
</nowiki></code>
 +
== this also works... ==
  
 
<jmol>
 
<jmol>
Line 25: Line 26:
 
   </jmolApplet>
 
   </jmolApplet>
 
</jmol>
 
</jmol>
 +
<code><nowiki>
 +
<jmol>
 +
  <jmolApplet>
 +
    <uploadedFileContents>Chair.cml</uploadedFileContents>
 +
  </jmolApplet>
 +
</jmol>
 +
</nowiki></code>
 
== this also works... ==
 
== this also works... ==
 
<jmol>
 
<jmol>
Line 33: Line 41:
 
     <caption>demo - note: needs at least one char on first line of inline content</caption>  
 
     <caption>demo - note: needs at least one char on first line of inline content</caption>  
 
     <inlineContents>
 
     <inlineContents>
T
+
Menthol
 
OpenBabel02151916433D
 
OpenBabel02151916433D
  
Line 110: Line 118:
  
 
   <jmolLink>
 
   <jmolLink>
     <script> spacefill 23% </script>
+
     <script> spacefill 2% </script>
 
     <text> ball and stick </text>
 
     <text> ball and stick </text>
 
     <target> C </target>
 
     <target> C </target>
Line 154: Line 162:
 
     <item>
 
     <item>
 
       <text> green </text>
 
       <text> green </text>
       <script> color green </script>
+
       <script> color green </script>
 
     </item>
 
     </item>
 
   </jmolRadioGroup>
 
   </jmolRadioGroup>
 
 
</jmol>
 
</jmol>
  
 +
== Using script ==
 +
<jmol>
  
this also works
 
 
 
==== Using script ====
 
<jmol>
 
 
   <jmolApplet>
 
   <jmolApplet>
 
     <name>A</name>  
 
     <name>A</name>  
 
     <title>This box might hold a 3D model</title>  
 
     <title>This box might hold a 3D model</title>  
 
     <color>blueTint</color>  
 
     <color>blueTint</color>  
     <size>150</size>  
+
     <size>500</size>  
 
     <script> echo Hi there! </script>
 
     <script> echo Hi there! </script>
 
   </jmolApplet>
 
   </jmolApplet>
Line 182: Line 186:
 
     <title>This box might hold a 3D model</title>  
 
     <title>This box might hold a 3D model</title>  
 
     <color>blueTint</color>  
 
     <color>blueTint</color>  
     <size>150</size>  
+
     <size>500</size>  
 
     <script> echo Hi there! </script>
 
     <script> echo Hi there! </script>
 
   </jmolApplet>
 
   </jmolApplet>
Line 188: Line 192:
  
 
</tr>
 
</tr>
 +
 +
== Using urlContents ==
 +
<jmol>
 +
  <jmolApplet>
 +
    <name>B</name>
 +
    <title>A file retrieved from the PDB</title>
 +
    <caption>Murine adipocyte lipid binding protein at pH 4.5 (1AB0.pdb)</caption>
 +
    <color>blueTint</color>
 +
    <size>300</size>
 +
    <urlContents> https://files.rcsb.org/download/1ab0.pdb.gz </urlContents>
 +
    <pspeed>2</pspeed>
 +
    <controls>spin popup</controls>
 +
  </jmolApplet>
 +
</jmol>

Latest revision as of 09:24, 4 March 2019


Note that I could not find a includes/mime.types file in main wiki folder ...

Newer MW versions locate that in includes/libs/mime/mime.types

I may be related: I could not manage to allow the upload of .sdf .mol . But .cml files works (I followed these instructions)

this works

aspirin

<jmolSmiles>aspirin</jmolSmiles>

Chair.cml

<jmolFile>Chair.cml</jmolFile>

this also works...

<jmol> <jmolApplet> <uploadedFileContents>Chair.cml</uploadedFileContents> </jmolApplet> </jmol>

this also works...

demo - note: needs at least one char on first line of inline content

Using script

This box might hold a 3D model


<jmol>
  <jmolApplet>
    <name>A</name> 
    <title>This box might hold a 3D model</title> 
    <color>blueTint</color> 
    <size>500</size> 
    <script> echo Hi there! </script>
  </jmolApplet>
</jmol>

</tr>

Using urlContents

A file retrieved from the PDB

Murine adipocyte lipid binding protein at pH 4.5 (1AB0.pdb)