Jump to content

Module:CineMol/doc

From Wikipedia, the free encyclopedia

Attempt to make a template that can render molecule descriptions. Adapted from CineMol.

It can use Wikidata's P3636 or P683 to decide what to render.

Example

[edit]

As an example, the following produces a picture of folic acid using its Wikidata number.

{{CineMol|wikidata=Q127060|style=tube|ry=1.3}}

In most cases you probably want to use {{Image frame}}

Penicillin-G (Style set to Spacefilling and look set to Glossy)
Penicillin-G (Tube style)
Vitamin B6 (style=ballandstick & look=cartoon)
{{Image frame|
|align=none
|style=width:250px
|caption=Caffine (wireframe mode)
|content=
  {{CineMol
  |style=wireframe
  |look=cartoon
  |pdb-ligand=CFF
  |rx=1.57
  |rz=1.9625
 }}
}}
Caffine (wireframe mode)

Usage

[edit]

You can specify the molecule either by its pdb-ligand id, its wikidata Q number or the contents of a mol file. If unspecified will default to the Q number of the current page.

  • {{CineMol|wikidata=<Q id here>|...}}
  • {{CineMol|pdb-ligand=<ligand id here>|...}}
  • {{CineMol|mol=<SDF FILE HERE>|...}}

You can use the rx, ry, and rz parameters to adjust the viewpoint.

The style parameter determines the type of drawing. The choices are:

  • Space filling
  • Ball and stick
  • Tube
  • Wireframe

The look parameter determines the look of the drawing. There are two choices: Glossy and Cartoon.

By default hyrdogen atoms are not shown. To include them specify hydrogen=yes.

See template data for additional parameters.

Template data

[edit]

Display diagrams of molecules based on a mol file or ligand id

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
stylestyle

Style of molecule drawing to do

Suggested values
SpaceFilling BallAndStick Tube Wireframe
Default
SpaceFilling
Stringsuggested
looklook

Look of rendering (Cartoon or glossy)

Suggested values
Cartoon Glossy
Default
Glossy
Stringsuggested
resolutionresolution

Resolution of drawing (Todo: Clarify this)

Default
30
Numberoptional
scalescale

What scale to draw image at

Default
5
Numberoptional
focal_lengthfocal_length

focal length of camera (This might not work properly)

Numberoptional
rotation over x axisrx

How much to rotate the x axis

Default
0
Numberoptional
rotation over y axisry

How much to rotate the y axis

Default
0
Numberoptional
rotation over z axisrz

How much to rotate over the z axis

Default
0
Numberoptional
hydrogenhydrogen

Show hydrogen molecules

Default
no
Example
yes
Booleanoptional
lightboxlightbox

Allow clicking to show a zoomed version of image.

Default
yes
Example
no
Booleanoptional
widthwidth

Width of images in pixels

Default
250
Numbersuggested
heightheight

Height in pixels. (Note: supplying both height and width will adjust the aspect ratio)

Numberoptional
molmol

Contents of mol/sdf file to render

Stringoptional
pdb-ligandpdb-ligand

The id of a compound in PDB's chemical component dictionary

Stringoptional
ChEBIChEBI

ChEBI id of molecule to render

Stringoptional
wikidatawikidata

A Wikidata Q-ID to use the value of P3636 to render a molecule. Will default to the current page

Stringoptional
csscss

Extra CSS to apply to the image

Stringoptional
altalt

Alternate text for screen readers that can't view images

Stringoptional
classclass

CSS class to apply to image

Stringoptional
titletitle

Tooltip to display on hover

Stringoptional
linklink

Either url or pagename to link image to

Stringoptional
lightbox_captionlightbox_caption

Caption for when user clicks to zoom. If unspecified and using a wikidata or pdb-ligend source, a caption will be automatically generated.

Contentoptional