Skip to content

Commit

Permalink
Tidies up standard layers example (RascalSoftware#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrPaulSharp authored Nov 12, 2024
1 parent 11ab487 commit 21c5c1a
Showing 1 changed file with 20 additions and 178 deletions.
198 changes: 20 additions & 178 deletions RATapi/examples/non_polarised/DSPC_standard_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,95 +7,18 @@

def DSPC_standard_layers():
"""Standard Layers fit of a DSPC floating bilayer"""
problem = RAT.Project(
name="original_dspc_bilayer",
calculation="non polarised",
model="standard layers",
geometry="substrate/liquid",
absorption=False,
)
problem = RAT.Project(name="original_dspc_bilayer", model="standard layers", geometry="substrate/liquid")

# Set up the relevant parameters
problem.parameters.append(
name="Oxide Thickness",
min=5.0,
value=19.54,
max=60.0,
fit=True,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="Oxide SLD",
min=3.39e-06,
value=3.39e-06,
max=3.41e-06,
fit=False,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="SAM Tails Thickness",
min=15.0,
value=22.66,
max=35.0,
fit=True,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="SAM Tails SLD",
min=-5e-07,
value=-4.01e-07,
max=-3e-07,
fit=False,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="SAM Tails Hydration",
min=1.0,
value=5.252,
max=50.0,
fit=True,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="SAM Roughness",
min=1.0,
value=5.64,
max=15.0,
fit=True,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="CW Thickness",
min=10.0,
value=17.12,
max=28.0,
fit=True,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="CW SLD",
min=0.0,
value=0.0,
max=1e-09,
fit=False,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(name="Oxide Thickness", min=5.0, value=19.54, max=60.0, fit=True)
problem.parameters.append(name="Oxide SLD", min=3.39e-06, value=3.39e-06, max=3.41e-06, fit=False)
problem.parameters.append(name="SAM Tails Thickness", min=15.0, value=22.66, max=35.0, fit=True)
problem.parameters.append(name="SAM Tails SLD", min=-5e-07, value=-4.01e-07, max=-3e-07, fit=False)
problem.parameters.append(name="SAM Tails Hydration", min=1.0, value=5.252, max=50.0, fit=True)
problem.parameters.append(name="SAM Roughness", min=1.0, value=5.64, max=15.0, fit=True)
problem.parameters.append(name="CW Thickness", min=10.0, value=17.12, max=28.0, fit=True)
problem.parameters.append(name="CW SLD", min=0.0, value=0.0, max=1e-09, fit=False)

problem.parameters.append(
name="SAM Heads Thickness",
min=5.0,
Expand All @@ -106,23 +29,14 @@ def DSPC_standard_layers():
mu=10.0,
sigma=2.0,
)
problem.parameters.append(
name="SAM Heads SLD",
min=1.0e-07,
value=1.75e-06,
max=2.0e-06,
fit=False,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(name="SAM Heads SLD", min=1.0e-07, value=1.75e-06, max=2.0e-06, fit=False)
problem.parameters.append(
name="SAM Heads Hydration",
min=10.0,
value=45.45,
max=50.0,
fit=True,
prior_type="uniform",
prior_type="gaussian",
mu=30.0,
sigma=3.0,
)
Expand All @@ -136,86 +50,14 @@ def DSPC_standard_layers():
mu=10.0,
sigma=2.0,
)
problem.parameters.append(
name="Bilayer Heads SLD",
min=5.0e-07,
value=1.47e-06,
max=1.5e-06,
fit=False,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="Bilayer Roughness",
min=2.0,
value=6.014,
max=15.0,
fit=True,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="Bilayer Tails Thickness",
min=14.0,
value=17.82,
max=22.0,
fit=True,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="Bilayer Tails SLD",
min=-5.0e-07,
value=-4.61e-07,
max=0.0,
fit=False,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="Bilayer Tails Hydration",
min=10.0,
value=17.64,
max=50.0,
fit=True,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="Bilayer Heads Hydration",
min=10.0,
value=36.15,
max=50.0,
fit=True,
prior_type="gaussian",
mu=30.0,
sigma=3.0,
)
problem.parameters.append(
name="CW Hydration",
min=99.9,
value=100.0,
max=100.0,
fit=False,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(
name="Oxide Hydration",
min=0.0,
value=23.61,
max=60.0,
fit=True,
prior_type="uniform",
mu=0.0,
sigma=np.inf,
)
problem.parameters.append(name="Bilayer Heads SLD", min=5.0e-07, value=1.47e-06, max=1.5e-06, fit=False)
problem.parameters.append(name="Bilayer Roughness", min=2.0, value=6.014, max=15.0, fit=True)
problem.parameters.append(name="Bilayer Tails Thickness", min=14.0, value=17.82, max=22.0, fit=True)
problem.parameters.append(name="Bilayer Tails SLD", min=-5.0e-07, value=-4.61e-07, max=0.0, fit=False)
problem.parameters.append(name="Bilayer Tails Hydration", min=10.0, value=17.64, max=50.0, fit=True)
problem.parameters.append(name="Bilayer Heads Hydration", min=10.0, value=36.15, max=50.0, fit=True)
problem.parameters.append(name="CW Hydration", min=99.9, value=100.0, max=100.0, fit=False)
problem.parameters.append(name="Oxide Hydration", min=0.0, value=23.61, max=60.0, fit=True)

problem.parameters.set_fields(0, max=10)

Expand Down

0 comments on commit 21c5c1a

Please sign in to comment.