schrodinger.application.jaguar.user_config module

User profiles and configuration support for Jaguar input files

exception schrodinger.application.jaguar.user_config.JaguarConfigError

Bases: Exception

__cause__

exception cause

__class__

alias of builtins.type

__context__

exception context

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.jaguar.user_config', '__weakref__': <attribute '__weakref__' of 'JaguarConfigError' objects>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.jaguar.user_config'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__setstate__()
__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__suppress_context__
__traceback__
__weakref__

list of weak references to the object (if defined)

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

schrodinger.application.jaguar.user_config.get_config_filename()

Return path to Jaguar config file

schrodinger.application.jaguar.user_config.preprocess_infile(infile, outfile)

Preprocess macros in file <infile> and write postprocessed file <outfile>. If files names are the same, <infile> is overwritten.

Parameters:
  • infile (str) – name of file to be preprocessed
  • outfile (str) – name of postprocessed file
schrodinger.application.jaguar.user_config.get_macro(name, reread=False)

Return the dictionary of keywords set by the jaguar macro called name. If the macro does not exist, a ValueError is thrown.

The function will lazily initialize the global _macros variable.

Parameters:
  • name (str) – name of macro to convert into a dictionary
  • reread (bool) – whether the configuration file should be re-read
Returns:

dictionary of jaguar keywords

Return type:

dict

Raises:
  • ValueError – if name is not in the dictionary of known macros
  • JaguarConfigError – if there are problems with the config file