|
32 | 32 | __RELAX_TARGET_PRESSURE__ = "target_pressure" |
33 | 33 | __RELAX_FIXVOLUME__ = "fix_volume" |
34 | 34 | __RELAX_BULK_MODULUS__ = "bulk_modulus" |
| 35 | +__RELAX_SOBOL__ = "sobol_sampling" |
| 36 | +__RELAX_SOBOL_SCATTER__ = "sobol_scatter" |
35 | 37 |
|
36 | 38 | __TYPE_SINGLE__ = "sscha" |
37 | 39 | __TYPE_RELAX__ = "relax" |
@@ -203,6 +205,14 @@ def setup_from_namelist(self, namelist): |
203 | 205 | if __RELAX_FIXVOLUME__ in keys: |
204 | 206 | self.fix_volume = bool(c_info[__RELAX_FIXVOLUME__]) |
205 | 207 |
|
| 208 | + # ****Diegom_test**** |
| 209 | + self.sobol = False |
| 210 | + if __RELAX_SOBOL__ in keys: |
| 211 | + self.sobol = bool(c_info[__RELAX_SOBOL__]) |
| 212 | + |
| 213 | + self.sobol_scatter = 0.0 |
| 214 | + if __RELAX_SOBOL_SCATTER__ in keys: |
| 215 | + self.sobol_scatter = np.float64(c_info[__RELAX_SOBOL_SCATTER__]) |
206 | 216 |
|
207 | 217 | # Check the allowed keys |
208 | 218 | for k in keys: |
@@ -257,7 +267,7 @@ def setup_custom_functions(self, custom_function_pre = None, |
257 | 267 |
|
258 | 268 |
|
259 | 269 | def relax(self, restart_from_ens = False, get_stress = False, |
260 | | - ensemble_loc = None, start_pop = None, sobol = False, sobol_scramble = False, sobol_scatter = 0.0): |
| 270 | + ensemble_loc = None, start_pop = None, sobol = self.sobol, sobol_scramble = False, sobol_scatter = self.sobol_scatter): |
261 | 271 | """ |
262 | 272 | COSTANT VOLUME RELAX |
263 | 273 | ==================== |
@@ -382,7 +392,7 @@ def relax(self, restart_from_ens = False, get_stress = False, |
382 | 392 | def vc_relax(self, target_press = 0, static_bulk_modulus = 100, |
383 | 393 | restart_from_ens = False, |
384 | 394 | ensemble_loc = None, start_pop = None, stress_numerical = False, |
385 | | - cell_relax_algorithm = "sd", fix_volume = False, sobol = False, sobol_scramble = False, sobol_scatter = 0.0): |
| 395 | + cell_relax_algorithm = "sd", fix_volume = False, sobol_scramble = False, sobol_scatter = self.sobol_scatter): |
386 | 396 | """ |
387 | 397 | VARIABLE CELL RELAX |
388 | 398 | ==================== |
@@ -446,7 +456,7 @@ def vc_relax(self, target_press = 0, static_bulk_modulus = 100, |
446 | 456 | Set the optional scrambling of the generated numbers taken from the Sobol sequence. |
447 | 457 | sobol_scatter : real (0.0 to 1) (Deafault = 0.0) |
448 | 458 | Set the scatter parameter to displace the Sobol positions randommly. |
449 | | - |
| 459 | +
|
450 | 460 | Returns |
451 | 461 | ------- |
452 | 462 | status : bool |
|
0 commit comments