schrodinger.utils.sea.evalor module

Module for parameter validation. See schrodinger.utils.sea for more details. Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.utils.sea.evalor.Evalor(map, err_break='\n\n')

Bases: object

This is the evaluator class for checking validity of parameters.

__init__(map, err_break='\n\n')

map – ‘map’ contains all parameters to be checked.

property err

Returns true if there is no error and unchecked maps.

record_error(mapname=None, err='')

Records the error.

  • mapname – The name of the checked parameter.

  • err – The error message.

property unchecked_map

Returns a string that tell which parameters have not been checked.


Makes a copy from ‘ev’.


ev – A ‘Evalor’ object.

schrodinger.utils.sea.evalor.check_map(map, valid, ev, tag={})

Checks the validity of a map.


Returns True if ‘x’ is a power of 2, or False otherwise.

schrodinger.utils.sea.evalor.reg_xcheck(name, func)

Registers external checker.

  • name – Name of the checker.

  • func – Callable object that checks validity of a parameter. For interface requirement, see ‘_xchk_power2’, or ‘_xchk_file_exists’, or ‘_xchk_dir_exists’ for example.