Package CHEM :: Package search :: Module SEARCHserver :: Class FingerCmd
[hide private]
[frames] | no frames]

Class FingerCmd



cmd.Cmd --+
          |
         FingerCmd

Instance Methods [hide private]
 
__init__(self, search, encoder=None, shutdown=True, **kwargs)
Instantiate a line-oriented interpreter framework.
 
emptyline(self)
Called when an empty line is entered in response to the prompt.
 
cmdloop(self, *args, **kwargs)
KeyboardInterrupts exit gracefully.
 
onecmd(self, line)
Case insensitive commands
 
precmd(self, line)
Hook method executed just before the command line is interpreted, but after the input prompt is generated and issued.
 
postcmd(self, stop, line)
Hook method executed just after a command dispatch is finished.
 
do_collect(self, line)
USAGE: collect
 
do_time(self, line)
USAGE: COMMAND time
 
do_n(self, line)
USAGE: n
 
do_exit(self, line)
Exit the interpreter.
 
do_encoder(self, line)
USAGE: encoder
 
do_encode(self, line)
USAGE: encode SMILES
 
parse_query(self, q)
 
do_fsearch(self, line)
USAGE: fsearch THRESHOLD RESULTS_START RESULTS_END [WEIGHT|][ALPHA|BETA|]FINGERPRINT/SMILES [...
 
help_help(self)
 
do_prompt(self, line)
USAGE: prompt NEWPROMPT
 
do_get(self, line)
USAGE: search ...
 
do_histogram(self, line)
USAGE: search ...
 
do_alpha(self, line)
USAGE: alpha [newvalue]
 
do_beta(self, line)
USAGE: beta [newvalue]
 
do_shutdown(self, line)
Exit command interpreter and shutdown server.

Inherited from cmd.Cmd: columnize, complete, complete_help, completedefault, completenames, default, do_help, get_names, parseline, postloop, preloop, print_topics

Class Variables [hide private]
  prompt = 'finger> '
  doc_header = "TOPICS:"
  misc_header = ""
  ruler = ""
  undoc_header = ""

Inherited from cmd.Cmd: doc_leader, identchars, intro, lastcmd, nohelp, use_rawinput

Method Details [hide private]

__init__(self, search, encoder=None, shutdown=True, **kwargs)
(Constructor)

 

Instantiate a line-oriented interpreter framework.

The optional argument 'completekey' is the readline name of a completion key; it defaults to the Tab key. If completekey is not None and the readline module is available, command completion is done automatically. The optional arguments stdin and stdout specify alternate input and output file objects; if not specified, sys.stdin and sys.stdout are used.
Overrides: cmd.Cmd.__init__
(inherited documentation)

emptyline(self)

 

Called when an empty line is entered in response to the prompt.

If this method is not overridden, it repeats the last nonempty command entered.
Overrides: cmd.Cmd.emptyline
(inherited documentation)

cmdloop(self, *args, **kwargs)

 
KeyboardInterrupts exit gracefully.
Overrides: cmd.Cmd.cmdloop

onecmd(self, line)

 
Case insensitive commands
Overrides: cmd.Cmd.onecmd

precmd(self, line)

 
Hook method executed just before the command line is interpreted, but after the input prompt is generated and issued.
Overrides: cmd.Cmd.precmd
(inherited documentation)

postcmd(self, stop, line)

 
Hook method executed just after a command dispatch is finished.
Overrides: cmd.Cmd.postcmd
(inherited documentation)

do_collect(self, line)

 

USAGE: collect

Collect garbage. This may fix a memory leak problem.

do_time(self, line)

 

USAGE: COMMAND time

Returns the wall clock time of the last command.

do_n(self, line)

 

USAGE: n

Returns number of fingerprints in database.

do_encoder(self, line)

 

USAGE: encoder

Prints encoder options.

do_fsearch(self, line)

 

USAGE: fsearch THRESHOLD RESULTS_START RESULTS_END [WEIGHT|][ALPHA|BETA|]FINGERPRINT/SMILES [... FINGERPRINT/SMILES]

THRESHOLD: Minimum similarity a target compound must have to be in the result set RESULTS_START: Index of the first result to return, inclusive (0-based) RESULTS_END: Index of the last result to return, exclusive (0-based) For the above, using results start and end of 0 and 10 would thus return the top 10 results.

do_get(self, line)

 

USAGE: search ... get STARTI ENDI

Uses python indexing conventions.

do_histogram(self, line)

 

USAGE: search ... histogram

Returns a hitogram of the scores binned into 10 bins from 0 to 1.

do_alpha(self, line)

 

USAGE: alpha [newvalue]

Set/view alpha search paramter. T=C/(A*alpha+B*beta+C)

do_beta(self, line)

 

USAGE: beta [newvalue]

Set/view beta search paramter. T=C/(A*alpha+B*beta+C)