This is a read-only mirror of pymolwiki.org

Difference between revisions of "PyMOLWiki:Community Portal"

From PyMOL Wiki
Jump to navigation Jump to search
Line 3: Line 3:
  
 
== Helping ==
 
== Helping ==
* A wiki edit/user policy is needed.
 
* Graphic design and CSS layout: We need logos, BG images and CSS layout
 
 
* Importing the email list content:  We have (lots) of email to sift through, extract data from and import into the Wiki
 
* Importing the email list content:  We have (lots) of email to sift through, extract data from and import into the Wiki
 
* If you feel you have the time to help import data into the PyMol wiki, please email [[User:Tree|Tree]].
 
* If you feel you have the time to help import data into the PyMol wiki, please email [[User:Tree|Tree]].
 
=== Categories/Content ===
 
You may now add content to the wiki.  This is a semi-structured wiki in that the categories are pseudo-hierarchically linked. 
 
If you feel we're missing a category, please find where it would most logically fit, add it to the main page via the [[Top Level Schema Policy]].
 
  
 
=== New! GeShi: Syntax Highlighting for Python & More ===
 
=== New! GeShi: Syntax Highlighting for Python & More ===
Line 21: Line 15:
 
  <npython>line-numbered code here</npython>
 
  <npython>line-numbered code here</npython>
 
</pre>
 
</pre>
 
 
We now have a syntax highlighter installed.  It now supports something like 28 programming languages!  When you paste your code simply wrap it in
 
&lt;language_name&gt; ... code here ... &lt;/language_name&gt;. 
 
 
Here's an example:
 
<pre>
 
&lt;python&gt;
 
  # axes.py
 
from pymol.cgo import *
 
from pymol import cmd
 
from pymol.vfont import plain
 
 
# create the axes object, draw axes with cylinders coloured red, green,
 
#blue for X, Y and Z
 
 
obj = [
 
  CYLINDER, 0., 0., 0., 50., 0., 0., 0.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.,
 
  CYLINDER, 0., 0., 0., 0., 50., 0., 0.2, 1.0, 1.0, 1.0, 0., 1.0, 0.,
 
  CYLINDER, 0., 0., 0., 0., 0., 50., 0.2, 1.0, 1.0, 1.0, 0., 0.0, 1.0,
 
  ]
 
 
# add labels to axes object (requires pymol version 0.8 or greater, I
 
# believe
 
 
cyl_text(obj,plain,[-5.,-5.,-1],'Origin',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])
 
cyl_text(obj,plain,[50.,0.,0.],'X',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])
 
cyl_text(obj,plain,[0.,50.,0.],'Y',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])
 
cyl_text(obj,plain,[0.,0.,50.],'Z',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])
 
 
# then we load it into PyMOL
 
cmd.load_cgo(obj,'axes')
 
 
&lt;python&gt;
 
</pre>
 
 
gives us the code
 
<source lang="python">
 
# axes.py
 
from pymol.cgo import *
 
from pymol import cmd
 
from pymol.vfont import plain
 
 
# create the axes object, draw axes with cylinders coloured red, green,
 
#blue for X, Y and Z
 
 
obj = [
 
  CYLINDER, 0., 0., 0., 50., 0., 0., 0.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.,
 
  CYLINDER, 0., 0., 0., 0., 50., 0., 0.2, 1.0, 1.0, 1.0, 0., 1.0, 0.,
 
  CYLINDER, 0., 0., 0., 0., 0., 50., 0.2, 1.0, 1.0, 1.0, 0., 0.0, 1.0,
 
  ]
 
 
# add labels to axes object (requires pymol version 0.8 or greater, I
 
# believe
 
 
cyl_text(obj,plain,[-5.,-5.,-1],'Origin',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])
 
cyl_text(obj,plain,[50.,0.,0.],'X',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])
 
cyl_text(obj,plain,[0.,50.,0.],'Y',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])
 
cyl_text(obj,plain,[0.,0.,50.],'Z',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])
 
 
# then we load it into PyMOL
 
cmd.load_cgo(obj,'axes')
 
</source>
 
  
 
Now with line numbers!
 
Now with line numbers!

Revision as of 07:17, 2 March 2005

CP

Look here for ways to get involved in the PyMolWiki!

Helping

  • Importing the email list content: We have (lots) of email to sift through, extract data from and import into the Wiki
  • If you feel you have the time to help import data into the PyMol wiki, please email Tree.

New! GeShi: Syntax Highlighting for Python & More

Update: I have added the option for numbered syntax highlighting and non-numbered.

 <source lang="python">Non line-numbered code here</source>
 <npython>line-numbered code here</npython>

Now with line numbers!

<npython>

# axes.py

from pymol.cgo import * from pymol import cmd from pymol.vfont import plain

  1. create the axes object, draw axes with cylinders coloured red, green,
  2. blue for X, Y and Z

obj = [

  CYLINDER, 0., 0., 0., 50., 0., 0., 0.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.,
  CYLINDER, 0., 0., 0., 0., 50., 0., 0.2, 1.0, 1.0, 1.0, 0., 1.0, 0.,
  CYLINDER, 0., 0., 0., 0., 0., 50., 0.2, 1.0, 1.0, 1.0, 0., 0.0, 1.0,
  ]
  1. add labels to axes object (requires pymol version 0.8 or greater, I
  2. believe

cyl_text(obj,plain,[-5.,-5.,-1],'Origin',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]]) cyl_text(obj,plain,[50.,0.,0.],'X',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]]) cyl_text(obj,plain,[0.,50.,0.],'Y',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]]) cyl_text(obj,plain,[0.,0.,50.],'Z',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])

  1. then we load it into PyMOL

cmd.load_cgo(obj,'axes') </npython>


See The Geshi Home Page

Tree