diff options
Diffstat (limited to 'modelcif/data.py')
| -rw-r--r-- | modelcif/data.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/modelcif/data.py b/modelcif/data.py new file mode 100644 index 0000000..c80bf73 --- /dev/null +++ b/modelcif/data.py @@ -0,0 +1,44 @@ +"""Classes to track inputs/outputs of modeling protocols. + + See also :class:`modelcif.protocol.Step`. +""" + + +class Data: + """Some part of the system that is input or output by part of + the modeling protocol, and/or stored in a file. + + Usually a subclass is passed to :class:`modelcif.protocol.Step` + to describe the input or output, or to :class:`modelcif.associated.File` + to point to where the data are stored: + + - A database of possible template sequences/structures to construct + or search (:class:`modelcif.ReferenceDatabase`) + - A template structure (:class:`modelcif.Template`) + - The sequence of the target (:class:`modelcif.Entity`) + - A target-template alignment (:mod:`modelcif.alignment`) + - Target structure coordinates (:class:`modelcif.model.Model`) + + However, this class can also be used directly to describe other kinds + of input/output data. + + :param str name: A short name for the data. + :param str details: A longer description of the data. + """ + data_content_type = 'other' + data_other_details = None + + def __init__(self, name, details=None): + self.name = name + self.data_other_details = details + + +class DataGroup(list): + """A number of :class:`Data` objects that are grouped together. + + This class can be used to group together multiple :class:`Data` + objects if a given modeling protocol step consumes or generates + multiple pieces of data. See :class:`modelcif.protocol.Step`. It behaves + like a regular Python list. + """ + pass |
