TaproomSource

class openff.evaluator.datasets.taproom.TaproomSource(doi='', comment='', technique='', host_identifier='', guest_identifier='')[source]

Contains metadata about the source of a host-guest binding affinity measurement which was pulled from the taproom package.

__init__(doi='', comment='', technique='', host_identifier='', guest_identifier='')[source]

Constructs a new MeasurementSource object.

Parameters
  • doi (str) – The DOI for the source

  • comment (str) – A description of where the value came from in the source.

  • technique (str) – The technique used to measure this value.

  • host_identifier (str) – The unique three letter host identifier

  • guest_identifier (str) – The unique three letter guest identifier

Methods

__init__([doi, comment, technique, ...])

Constructs a new MeasurementSource object.

from_json(file_path)

Create this object from a JSON file.

json([file_path, format])

Creates a JSON representation of this class.

parse_json(string_contents)

Parses a typed json string into the corresponding class structure.

classmethod from_json(file_path)

Create this object from a JSON file.

Parameters

file_path (str) – The path to load the JSON from.

Returns

The parsed class.

Return type

cls

json(file_path=None, format=False)

Creates a JSON representation of this class.

Parameters
  • file_path (str, optional) – The (optional) file path to save the JSON file to.

  • format (bool) – Whether to format the JSON or not.

Returns

The JSON representation of this class.

Return type

str

classmethod parse_json(string_contents)

Parses a typed json string into the corresponding class structure.

Parameters

string_contents (str or bytes) – The typed json string.

Returns

The parsed class.

Return type

Any