Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help
Special pages
SBGrid Resources
SBGrid Consortium
SBGrid Data Bank
Software Webinars
PyMOL Webinar
PyMOL Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Apropos
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Infobox psico |module = psico.helping }} '''DESCRIPTION''' "apropos" searches through the documentation of all currently defined commands and lists those commands for which the keyword is either contained in the documentation or matches the command name itself. If an appropriate '''DESCRIPTION''' section is provided in the documentation of the command, the first 80 characters are listed as a summary. '''INSTALLATION''' 1. copy the script bellow to a folder and name it ''apropos.py'' 2. run it from within pymol with the '''run''' command: <source lang="python"> run apropos.py </source> 3. see example bellow on how to use it '''USAGE''' <source lang="python"> apropos [keyword or regexp] </source> '''EXAMPLE''' ''apropos fit'' <pre> ###EXACT MATCH FOR: fit ==> try 'help fit' at the prompt. ###The following commands are NOT documented. vdw_fit ###The following commands are documented. 'help command' fit : "fit" superimposes the model in the first selection on to the model intra_fit : "intra_fit" fits all states of an object to an atom selection rms : "rms" computes a RMS fit between two atom selections, but does not pair_fit : "pair_fit" fits a set of atom pairs between two models. Each atom intra_rms_cur : "intra_rms_cur" calculates rms values for all states of an object commands : >>>>>>>> Ooopsie, no DESCRIPTION found for this command!!! <<<<<< zoom : "zoom" scales and translates the window and the origin to cover the intra_rms : "intra_rms" calculates rms fit values for all states of an object align : "align" performs a sequence alignment followed by a structural rms_cur : "rms_cur" computes the RMS difference between two atom fitting : "fitting" allows the superpositioning of object1 onto object2 using </pre> '''SEE ALSO''' grepset(www.pymolwiki.org), Python re module '''apropos.py''' <source lang="python"> # # apropos.py # Author: Ezequiel Panepucci # Date: 2006-07-20 # from pymol import cmd import re def apropos(regexp=''): ''' DESCRIPTION "apropos" searches through the documentation of all currently defined commands and lists those commands for which the keyword is either contained in the documentation or matches the command name itself. If an appropriate "DESCRIPTION" section is provided in the documentation of the command, the first 80 characters are listed as a summary. USAGE apropos [keyword or regexp] EXAMPLE apropos fit ###EXACT MATCH FOR: fit ==> try 'help fit' at the prompt. ###The following commands are NOT documented. vdw_fit ###The following commands are documented. 'help command' fit : "fit" superimposes the model in the first selection on to the model intra_fit : "intra_fit" fits all states of an object to an atom selection rms : "rms" computes a RMS fit between two atom selections, but does not pair_fit : "pair_fit" fits a set of atom pairs between two models. Each atom intra_rms_cur : "intra_rms_cur" calculates rms values for all states of an object commands : >>>>>>>> Ooopsie, no DESCRIPTION found for this command!!! <<<<<< zoom : "zoom" scales and translates the window and the origin to cover the intra_rms : "intra_rms" calculates rms fit values for all states of an object align : "align" performs a sequence alignment followed by a structural rms_cur : "rms_cur" computes the RMS difference between two atom fitting : "fitting" allows the superpositioning of object1 onto object2 using SEE ALSO grepset(www.pymolwiki.org), Python re module ''' cmd.set("text","1",quiet=1) count=0 docre = re.compile(regexp, re.MULTILINE | re.IGNORECASE) cmdre = re.compile(regexp, re.IGNORECASE) matches_with_help = [] matches_without_help = [] maxcclen=0 for cc in cmd.keyword: if cc == regexp: print '\n###EXACT MATCH FOR: %s ==> try \'help %s\' at the prompt.' % (cc,cc) doc = cmd.keyword[cc][0].__doc__ if doc == None: if re.search(regexp, cc, re.IGNORECASE): count += 1 matches_without_help.append(cc) continue if re.search(regexp, doc, re.MULTILINE | re.IGNORECASE): count += 1 if len(cc) > maxcclen: maxcclen = len(cc) docmatches = re.match(r"""^\s+DESCRIPTION\s+(.{0,80})\S*""", doc, re.IGNORECASE) if docmatches == None: desc = '>>>>>>>> Ooopsie, no DESCRIPTION found for this command!!! <<<<<<' else: desc = docmatches.group(1) matches_with_help.append( (cc, desc ) ) if len(matches_without_help) > 0: print '\n###The following commands are NOT documented.\n' for cc in matches_without_help: print '%*s' % (maxcclen, cc) if len(matches_with_help) > 0: print '\n###The following commands are documented. \'help command\' \n' for cc,desc in matches_with_help: print '%*s : %s' % (maxcclen, cc,desc) cmd.extend('apropos',apropos) </source> ''Author: Ezequiel (Zac) Panepucci'' [[Category:Script_Library|Apropos]] [[Category:UI_Scripts]]
Summary:
Please note that all contributions to PyMOL Wiki are considered to be released under the GNU Free Documentation License 1.2 (see
PyMOL Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Infobox psico
(
edit
)
Search
Search
Editing
Apropos
Add topic