Package schrodinger :: Package infra :: Module mmim
[hide private]
[frames] | no frames]

Module mmim

Wrapper classes and functions for dealing with the MMIM library, which is used to read & write Impact and QSite input files.

See MMIMDict documentation for more details.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  MMIMArgList
A class to provide list-like access to MMIM array properties.
  MMIMDict
A class for setting and getting MMIM keyword values.
Functions [hide private]
 
_convert_to_bool(value)
 
_convert_to_float_array(value)
 
_convert_to_string_array(value)
 
_convert_to_int_array(value)
 
_convert_to_bool_array(value)
 
_get_handlers(key)
Retrieve the mmim functions to use in getting and setting the provided key (integer or string).
 
_get_key_data(key)
Given a key (as integer or string), return a tuple of the *integer* key and the enumerated list endpoint for the key's argument type.
 
convert_string(key, value)
Given a key (integer or string) and a value (string), try to convert the value to the proper type for this keyword.
Variables [hide private]
  _arg_handlers = {110: (0, <schrodinger.infra.mm._Wrapper insta...
  _arg_endpoints = [110, 118, 193, 216, 345, 369, 480, 497]
  _arg_converters = {mm.MMIM_ARG_STRING_END: lambda x: x, mm.MMI...
  _arg_names = {110: 'boolean', 118: 'boolean array', 193: 'inte...
  __package__ = 'schrodinger.infra'
Function Details [hide private]

_get_handlers(key)

 

Retrieve the mmim functions to use in getting and setting the provided key (integer or string).

Returns a tuple of (get function, set function, array length function). If the data type is not an array, the array length function is None.

convert_string(key, value)

 

Given a key (integer or string) and a value (string), try to convert the value to the proper type for this keyword. Return converted value.


Variables Details [hide private]

_arg_handlers

Value:
{mm.MMIM_ARG_BOOL_END:(mm.MMIM_ARG_BOOL_BEGIN, mm.mmim_handle_get_arg_\
bool, mm.mmim_handle_set_arg_bool, None), mm.MMIM_ARG_BOOL_ARRAY_END:(\
mm.MMIM_ARG_BOOL_ARRAY_BEGIN, mm.mmim_handle_get_indexed_arg_bool, mm.\
mmim_handle_set_indexed_arg_bool, mm.mmim_handle_get_indexed_arg_bool_\
count), mm.MMIM_ARG_FLOAT_END:(mm.MMIM_ARG_FLOAT_BEGIN, mm.mmim_handle\
_get_arg_float, mm.mmim_handle_set_arg_float, None), mm.MMIM_ARG_FLOAT\
_ARRAY_END:(mm.MMIM_ARG_FLOAT_ARRAY_BEGIN, mm.mmim_handle_get_indexed_\
arg_float, mm.mmim_handle_set_indexed_arg_float, mm.mmim_handle_get_in\
...

_arg_converters

Value:
{mm.MMIM_ARG_STRING_END: lambda x: x, mm.MMIM_ARG_INT_END: int, mm.MMI\
M_ARG_BOOL_END: _convert_to_bool, mm.MMIM_ARG_FLOAT_END: float, mm.MMI\
M_ARG_FLOAT_ARRAY_END: _convert_to_float_array, mm.MMIM_ARG_INT_ARRAY_\
END: _convert_to_int_array, mm.MMIM_ARG_STRING_ARRAY_END: _convert_to_\
string_array, mm.MMIM_ARG_BOOL_ARRAY_END: _convert_to_bool_array,}

_arg_names

Value:
{110: 'boolean',
 118: 'boolean array',
 193: 'integer',
 216: 'integer array',
 345: 'float',
 369: 'float array',
 480: 'string',
 497: 'string array'}