This is a read-only mirror of pymolwiki.org

Difference between revisions of "Pymol-script-repo"

From PyMOL Wiki
Jump to navigation Jump to search
Line 38: Line 38:
 
  help(colorbydisplacement)
 
  help(colorbydisplacement)
  
This means, that if a PyMOL user look in his/her local repo directory, and wonder what colorbydisplacement.py does.
+
This means, that if a PyMOL user look in his/her local repo directory, and wonder what '''colorbydisplacement.py''' does.
 
Then he/she can write:
 
Then he/she can write:
 
http://www.pymolwiki.org/index.php/colorbydisplacement
 
http://www.pymolwiki.org/index.php/colorbydisplacement
  
 
And then a easy description of the of script is presented, with example of use and images.
 
And then a easy description of the of script is presented, with example of use and images.
When he/she then wants to use the script, he/she simply write:
+
When he/she then wants to use the script, he/she simply write: '''import colorbydisplacement'''
import colorbydisplacement
 
  
 
Then find out the defined functions. He/she can then either look at the wiki page, OR write in PyMOL.
 
Then find out the defined functions. He/she can then either look at the wiki page, OR write in PyMOL.
"help(colorbydisplacement)" which automatically returns the functions.
+
'''help(colorbydisplacement)''' which automatically returns the functions.
  
 
= Read more here =
 
= Read more here =

Revision as of 15:45, 30 November 2011

Introduction

In November 2011, a group of PyMOL users initiated together with Jason Vertrees, a project to let PyMOL scripts be under version control system (VCS) called Git. We hope that script authors and PyMOL users would be interested in this option.

Benefits

The benefits from this project, is

  1. A convenient way, to let PyMOL users download all scripts at the PyMOL wiki, with a minimum of effort.
  2. The possibility to let script authors push changes to their script out to PyMOL users.
  3. Easier requiring assistance from the PyMOL mailing list.
  4. Script will be tested for malicious code before added to the official repository.

Official repository

The official repository is located at:

https://github.com/Pymol-Scripts/Pymol-script-repo

And the Git Read-Only access is:

git://github.com/Pymol-Scripts/Pymol-script-repo.git

Same namespace

As a part of this project, we recommend that the name for script filename and pagename at the PyMOL wiki are the same. All letters should also be small for both.
This will ease the use of the script

Example: colorbydisplacement

Example of namespace

For a description of use

http://www.pymolwiki.org/index.php/colorbydisplacement

For a color coded view

https://github.com/Pymol-Scripts/Pymol-script-repo/blob/master/colorbydisplacement.py.py

For the raw code

https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/colorbydisplacement.py

In the users local script librarr

/home/tlinnet/Software/pymol/Pymol-script-repo/colorbydisplacement.py

To import in PyMOL

import colorbydisplacement

To print the available functions in PyMOL

help(colorbydisplacement)

This means, that if a PyMOL user look in his/her local repo directory, and wonder what colorbydisplacement.py does. Then he/she can write: http://www.pymolwiki.org/index.php/colorbydisplacement

And then a easy description of the of script is presented, with example of use and images. When he/she then wants to use the script, he/she simply write: import colorbydisplacement

Then find out the defined functions. He/she can then either look at the wiki page, OR write in PyMOL. help(colorbydisplacement) which automatically returns the functions.

Read more here

  1. Install instructions
    http://www.pymolwiki.org/index.php/Git_install