def sanity_check(self): """ This method can be overloaded by adaptors to check runtime conditions on adaptor load time. The adaptor should raise an exception if it will not be able to function properly in the given environment, e.g. due to missing dependencies etc. """ raise NotImplementedError(method_name="get_name", class_name=type(self))
def build_input_file(self, replica): """Generates input file for individual replica, based on template input file Arguments: replica - Replica object """ raise NotImplementedError(method_name="build_input_file", \ class_name=type(self))
def perform_swap(self, replica_i, replica_j): """Performs an exchange of replica parameters Arguments: replica_i - a replica object replica_j - a replica object """ raise NotImplementedError(method_name="compose_swap_matrix", \ class_name=type(self))
def prepare_replica_for_exchange(self, replica): """Creates a list of radical.ensemblemd.Kernel objects for exchange step to be performed on a target resource. Arguments: replica - Replica object Returns: exchange_replica - radical.ensemblemd.Kernel object """ raise NotImplementedError(method_name="prepare_replica_for_exchange", \ class_name=type(self))
def prepare_replica_for_md(self, replica): """Creates a list of radical.ensemblemd.Kernel objects for MD simulation step. Here are specified input/output files to be transferred to/from target resource and other details associated with execution of MD step. Arguments: replica - Replica object Returns: compute_replica - radical.ensemblemd.Kernel object """ raise NotImplementedError(method_name="prepare_replica_for_md", \ class_name=type(self))
def exchange(self, r_i, replicas, swap_matrix): """Produces a replica "j" for exchange with given replica "i" Arguments: r_i - given replica for which is found partner replica replicas - list of Replica objects swap_matrix - matrix of dimension-less energies, where each column is a replica and each row is a state Returns: r_j - replica to exchnage parameters with """ raise NotImplementedError(method_name="exchange", class_name=type(self))
def get_swap_matrix(self, replicas, matrix_columns): """Creates and populates swap matrix, which is used to determine exchange probabilities. Arguments: replicas - list of Replica objects matrix_columns - matrix of energy parameters obtained during the exchange step Returns: swap_matrix - 2D list of lists of dimension-less energies, where each column is a replica and each row is a state """ raise NotImplementedError(method_name="compose_swap_matrix", \ class_name=type(self))
def set2element_initialization(self, element): """This method returns a :class:`radical.ensemblemd.Kernel` object and is executed once before comparison for all the elements in the second set **Arguments:** * **element** [`int`] The element parameter is a positive integer and references to an element of the set **Returns:** Implementations of this method **must** return a :class:`radical.ensemblemd.Kernel` object. An exception is thrown otherwise. """ raise NotImplementedError(method_name="set2element_initialization", class_name=type(self))
def element_comparison(self, elements1, elements2): """This method returns a :class:`radical.ensemblemd.Kernel` object **Arguments:** * **elements1** [`list`] The first list of elements from the set used for the comparison * **elements2** [`list`] The second list of elements from the set used for the comparison **Returns:** Implementations of this method **must** return a list :class:`radical.ensemblemd.Kernel` object. An exception is thrown otherwise. """ raise NotImplementedError(method_name="element_comparison", class_name=type(self))
def analysis_step(self, iteration, instance): """The :class:`radical.ensemblemd.Kernel` returned by `analysis_step` is executed once per loop iteration after `simulation_step`. **Arguments:** * **iteration** [`int`] The iteration parameter is a positive integer and references the current iteration of the simulation-analysis loop. * **instance** [`int`] The instance parameter is a positive integer and references the instance of the simulation step, which is in the range [1 .. simulation_instances]. **Returns:** Implementations of this method **must** return either a single or a list of :class:`radical.ensemblemd.Kernel` object(s). An exception is thrown otherwise. """ raise NotImplementedError(method_name="analysis_step", class_name=type(self))
def execute_pattern(self, pattern, resource): """Execute the pattern. """ raise NotImplementedError(method_name="execute_pattern", class_name=type(self))
def verify_pattern(self, pattern, resource): """Verify the pattern. """ raise NotImplementedError(method_name="verify_pattern", class_name=type(self))
def initialize_replicas(self): """Initializes replicas and their attributes to default values. """ raise NotImplementedError(method_name="initialize_replicas", \ class_name=type(self))
def _bind_to_resource(self, resource_key, pattern_name=None): """Binds the kernel to a specific resource. """ raise NotImplementedError(method_name="_get_kernel_description", class_name=type(self))
def get_name(self): """Returns the name of the execution pattern. """ raise NotImplementedError( method_name="get_name", class_name=type(self))
def allocate(self): """Allocates the requested resources. """ raise NotImplementedError( method_name="allocate", class_name=type(self))
def run(self, pattern, force_plugin=None): """Creates a new ExecutionContext instance. """ raise NotImplementedError( method_name="execute", class_name=type(self))