Esempio n. 1
0
from . import fileio
from . import workflow

# Initialize module-level logger
from gmxapi import logger as root_logger

logger = root_logger.getChild('mdrun')
logger.info('Importing {}'.format(__name__))

# Output in the gmxapi.operation Context.
# TODO: Consider using a single base class for the DataProxy, but have distinct
#  data descriptor behavior (or different descriptor implementations in different
#  subclasses) so that static code inspection can more easily determine the
#  attributes of the data proxies.
_output_descriptors = (_op.OutputDataDescriptor('_work_dir', str),
                       _op.OutputDataDescriptor('trajectory', str),
                       _op.OutputDataDescriptor('parameters', dict))
_publishing_descriptors = {
    desc._name: gmxapi.operation.Publisher(desc._name, desc._dtype)
    for desc in _output_descriptors
}
_output = _op.OutputCollectionDescription(**{
    descriptor._name: descriptor._dtype
    for descriptor in _output_descriptors
})


class OutputDataProxy(_op.DataProxyBase, descriptors=_output_descriptors):
    """Implement the 'output' attribute of MDRun operations."""
Esempio n. 2
0
class OutputDataProxy(
        _op.DataProxyBase,
        descriptors={'_work_dir': _op.OutputDataDescriptor('_work_dir', str)}):
    """Implement the 'output' attribute of MDRun operations."""
Esempio n. 3
0
import gmxapi
import gmxapi.abc
import gmxapi.exceptions
import gmxapi.operation as _op
import gmxapi.typing
from gmxapi.operation import InputCollectionDescription
from .abc import ModuleObject

# Initialize module-level logger
from gmxapi import logger as root_logger

logger = root_logger.getChild('modify_input')
logger.info('Importing {}'.format(__name__))

_output_descriptors = (
    _op.OutputDataDescriptor('_simulation_input', str),
    _op.OutputDataDescriptor('parameters', dict)
)
_publishing_descriptors = {desc._name: gmxapi.operation.Publisher(desc._name, desc._dtype) for desc in
                           _output_descriptors}
_output = _op.OutputCollectionDescription(**{descriptor._name: descriptor._dtype for descriptor in
                                             _output_descriptors})


class OutputDataProxy(ModuleObject,
                      _op.DataProxyBase,
                      descriptors=_output_descriptors):
    """Implement the 'output' attribute of ReadTpr operations."""

    def __init__(self, *args, **kwargs):
        _op.DataProxyBase.__init__(self, *args, **kwargs)
Esempio n. 4
0
from . import fileio
from . import workflow

# Initialize module-level logger
from gmxapi import logger as root_logger

logger = root_logger.getChild('mdrun')
logger.info('Importing {}'.format(__name__))

# Output in the gmxapi.operation Context.
# TODO: Consider using a single base class for the DataProxy, but have distinct
#  data descriptor behavior (or different descriptor implementations in different
#  subclasses) so that static code inspection can more easily determine the
#  attributes of the data proxies.
_output_descriptors = (_op.OutputDataDescriptor('_work_dir', str),
                       _op.OutputDataDescriptor('trajectory', str))
_publishing_descriptors = {
    desc._name: gmxapi.operation.Publisher(desc._name, desc._dtype)
    for desc in _output_descriptors
}
_output = _op.OutputCollectionDescription(**{
    descriptor._name: descriptor._dtype
    for descriptor in _output_descriptors
})


class OutputDataProxy(_op.DataProxyBase, descriptors=_output_descriptors):
    """Implement the 'output' attribute of MDRun operations."""