PyFrag
|
Public Member Functions | |
def | __getitem__ (self, name) |
def | __setitem__ (self, name, value) |
def | __delitem__ (self, name) |
def | copy (self) |
def | as_dict (self) |
def | from_dict (cls, kwargs) |
def | overlay (self, other) |
def | update (self, other) |
Public Member Functions inherited from qmworks.plams.core.settings.Settings | |
def | __init__ (self, args, kwargs) |
def | __missing__ (self, name) |
def | __setitem__ (self, name, value) |
def | __getattr__ (self, name) |
def | __setattr__ (self, name, value) |
def | __delattr__ (self, name) |
def | __str__ (self) |
def | __iter__ (self) |
def | __reduce__ (self) |
def | copy (self) |
def | soft_update (self, other) |
def | update (self, other) |
def | merge (self, other) |
def | find_case (self, key) |
def | as_dict (self) |
This is a subclass of the :class:`plams.Settings`. The difference with respect to plams' Settings are: - settings['a.b'] is equivalent to settings['a']['b'] = settings.a.b - in update(): settings.__block_replace = True results in removal of all existing key value pairs. __block_replace can be either in the updated settings or in the updating settings object.
def qmworks.settings.Settings.__delitem__ | ( | self, | |
name | |||
) |
Like plams Settings.__setitem__, but "del settings['a.b']" is equivalent to "del settings['a']['b'] = 'c'"
def qmworks.settings.Settings.__getitem__ | ( | self, | |
name | |||
) |
Like plams Settings.__getitem__, but "settings['a.b'] == 'c'" is equivalent to "settings['a']['b'] == 'c'"
def qmworks.settings.Settings.__setitem__ | ( | self, | |
name, | |||
value | |||
) |
Like plams Settings.__setitem__, but "settings['a.b'] = 'c'" is equivalent to "settings['a']['b'] = 'c'"
def qmworks.settings.Settings.overlay | ( | self, | |
other | |||
) |
Return new instance of |Settings| that is a copy of this instance updated with *other*.
def qmworks.settings.Settings.update | ( | self, | |
other | |||
) |
Like PLAMS update, but: __block_replace = True results in removing all existing key value pairs in the current node of the settings tree For example: >>> from qmworks import Settings >>> t=Settings() >>> t.input.xc.lda = "" >>> u = Settings() >>> u.input.xc.hybrid = 'b3lyp' >>> print(t.overlay(u)) input: xc: hybrid: b3lyp lda: >>> u.input.xc.__block_replace = True >>> print(t.overlay(u)) input: xc: __block_replace: True hybrid: b3lyp