Beispiel #1
0
    def setUp(self):
        self.plugin = SurfactantPlugin()
        self.factory = self.plugin.data_source_factories[3]
        self.data_source = self.factory.create_data_source()

        self.traj_file = gromacs_coordinate_file
        self.formulation = ProbeFormulation()
    def setUp(self):
        self.plugin = SurfactantPlugin()
        self.factory = self.plugin.notification_listener_factories[0]
        self.notification_listener = self.factory.create_listener()
        self.model = self.factory.create_model()

        self.notification_listener.initialize(self.model)

        self.surfactant = ProbePrimaryIngredient()
        self.salt = ProbeSaltIngredient()
        self.solvent = ProbeSolventIngredient()

        self.surfactant.name = "Primary Surfactant"
        self.salt.name = "Sodium Chloride"
        self.solvent.name = "Water"

        self.parameters = [
            DataValue(name="surfactant_name", value="best chemical ever"),
            DataValue(name="surfactant_conc", value=1.0),
            DataValue(name="salt_conc", value=5.0),
        ]
        self.kpis = [
            DataValue(name="viscosity", value=5.7),
            DataValue(name="cost", value=10),
        ]
    def setUp(self):
        self.plugin = SurfactantPlugin()
        self.factory = self.plugin.data_source_factories[4]
        self.data_source = self.factory.create_data_source()
        self.model = self.factory.create_model()

        self.formulation = ProbeFormulation()
        self.input = [self.formulation]
    def setUp(self):
        self.plugin = SurfactantPlugin()
        self.factory = self.plugin.mco_factories[0]
        self.mco = self.factory.create_optimizer()
        self.model = self.factory.create_model()

        self.parameters = [
            IngredientMCOParameter(
                mock.Mock(spec=IngredientMCOParameterFactory),
                categories=["A", "B"],
            ),
            FixedMCOParameter(mock.Mock(spec=FixedMCOParameterFactory),
                              value=12.0),
            ListedMCOParameter(mock.Mock(spec=ListedMCOParameterFactory),
                               levels=[0.1, 2.5]),
            RangedMCOParameter(
                mock.Mock(spec=RangedMCOParameterFactory),
                upper_bound=1.5,
                n_samples=3,
            ),
        ]
Beispiel #5
0
    def setUp(self):
        self.plugin = SurfactantPlugin()
        self.factory = self.plugin.data_source_factories[1]
        self.data_source = self.factory.create_data_source()

        #: Example input values
        self.size = 4000
        self.name = "test_experiment"
        self.martini_parameters = "test_martini.itp"
        self.md_min_parameters = "test_min_parm.mdp"
        self.md_prod_parameters = "test_prod_parm.mdp"

        self.model = self.factory.create_model()
        self.model.n_molecule_types = 4
        self.model.martini_parameters = self.martini_parameters
        self.model.md_prod_parameters = self.md_prod_parameters
        self.model.md_min_parameters = self.md_min_parameters
        self.model.size = self.size
        self.model.name = self.name

        self.surfactants = [
            ProbePrimaryIngredient(),
            ProbeSecondaryIngredient(),
        ]
        self.salt = ProbeSaltIngredient()
        self.solvent = ProbeSolventIngredient()

        self.ingredients = self.surfactants + [self.salt] + [self.solvent]
        self.concentrations = [12, 4, 0.5, 83.5]
        self.formulation = Formulation(ingredients=self.ingredients,
                                       concentrations=self.concentrations)
        self.input_values = [self.formulation]

        self.masses = [
            self.surfactants[0].mass,
            self.surfactants[1].mass,
            self.salt.mass,
            self.solvent.mass,
        ]
Beispiel #6
0
 def setUp(self):
     self.plugin = SurfactantPlugin()
     self.factory = self.plugin.data_source_factories[0]
     self.data_source = self.factory.create_data_source()