コード例 #1
0
    def __init__(self, config_parser, exclude=[], include=[]):
        """Wrap existing ConfigParser so that it excludes entries
    for unwanted species.

    Note: only one of `exclude` and `include` arguments can be specified.

    :param config_parser: ConfigParser instance to be wrapped.
    :param exclude: Collection of species labels, 
      entries for species included in `exclude` will be removed from
      the lists returned by properties such as `pair`, `eam_density` and `eam_embed`.
    :param include: Species labels that should be returned by `pair`, `eam_density` and `eam_embed` functions."""
        ObjectProxy.__init__(self, config_parser)

        if exclude and include:
            raise ValueError(
                "Both exclude and include arguments specified. Only one can be used at one time."
            )

        if exclude:
            self._species_list = exclude
            self._exclude_flag = True
        else:
            self._species_list = include
            self._exclude_flag = False
コード例 #2
0
ファイル: proxies.py プロジェクト: djKooks/omniduct
 def __init__(self, tree, is_flat=False, get_nesting=None):
     ObjectProxy.__init__(self, tree.get(None))
     self._self_tree = tree
     self._self_tree_is_flat = is_flat
     self._self_tree_get_nesting = get_nesting
コード例 #3
0
 def __init__(self, wrapped, trace=None):
     ObjectProxy.__init__(self, wrapped)
     self._self_trace = trace
コード例 #4
0
 def __init__(self, wrapped):
     ObjectProxy.__init__(self, wrapped)
コード例 #5
0
ファイル: proxies.py プロジェクト: codeaudit/omniduct
 def __init__(self, tree, is_flat=False, get_nesting=None):
     ObjectProxy.__init__(self, tree.get(None))
     self._self_tree = tree
     self._self_tree_is_flat = is_flat
     self._self_tree_get_nesting = get_nesting
コード例 #6
0
ファイル: observable.py プロジェクト: mjredmond/macrolog
 def __init__(self, wrapped):
     ObjectProxy.__init__(self, wrapped)
     AbstractObservable.__init__(self)