Coot 'plugins' are fairly easy. Although we usually not necessarily call them plugins (rather scripts, extensions, ...). Here's what to do (*):

1.) write an extension script which will give you new Menu item with plugin entries which will execute functions, e.g. (simplified)

plugin_menu = coot_menubar_menu("My Plugins")
add_simple_coot_menu_menuitem(plugin_menu, "Run plugin 1", lambda func: plugin1())

2.) Have your plugin being able to be execute by the function 'plugin1', possibly merge into one file (my_plugin.py), i.e.

def plugin1():
   here some code to plugin or call plugin...

plugin_menu = .... (from above)

3.) Place the python script in a directory so that Coot will read it on startup, i.e. either:
- include in $HOME/.coot.py
- place the file into $HOME/.coot-preference
- put the file into whatever directory and set env variable COOT_PYTHON_EXTRAS_DIR to point to that directory

or run manually with Calculate->Scripting->Run Script

4.) Done

Any more questions, I will try to help. Good luck,

B


(*) I know there should be more documentation and we are working on this....

I have a pymol plugin that I would like to bring into coot. Are there
any 'coot plugins'? If so, how do I make one? I know Python but have
no training in computer programming so I'd ask you to keep your
answers at an 'elementary' level. If a coot plugin is beyond a person
who only knows Python thats ok,  just let me know.

Thank you,
Bradley



--
***************************************************

Dr. Bernhard Lohkamp
Assistant Professor
Div. Molecular Structural Biology
Dept. of Medical Biochemistry and Biophysics (MBB)
Karolinska Institutet
S-17177 Stockholm
Sweden

phone: (+46) 08-52487651
fax:   (+46) 08-327626
email: [email protected]

Reply via email to