Lipophilicity value object
lipophilicity.RdBuild a lipophilicity value object for create_compound()'s
lipophilicity argument (or the writable Compound$lipophilicity
field). Produces one default Lipophilicity alternative with parameter
"Lipophilicity".
Arguments
- value
Numeric scalar. Lipophilicity value.
- unit
Character. Unit for the lipophilicity parameter, validated against dimension
"Log Units". Defaults to"Log Units".- name
Character.
Nameof the created alternative. Defaults to"User defined".- default
Logical. Whether this alternative is the group's default when it appears in a list of alternatives passed to the matching
create_compound()argument orCompoundfield. Defaults toFALSE. Ignored for a single (non-list) value object, which is always the default. When a list has no element markeddefault = TRUE, the first element is the default (unchanged behaviour); marking two or more elementsdefault = TRUEin the same list is an error.
Value
A lipophilicity_spec object to pass to create_compound().
See also
Other value-object helpers:
age(),
error(),
fraction_unbound(),
gestational_age(),
height(),
intestinal_permeability(),
permeability(),
solubility(),
time(),
values(),
weight()
Examples
lipophilicity(2.5)
#> $value
#> [1] 2.5
#>
#> $unit
#> [1] "Log Units"
#>
#> $name
#> [1] "User defined"
#>
#> $default
#> [1] FALSE
#>
#> attr(,"class")
#> [1] "lipophilicity_spec" "osp_value_spec"
create_compound(name = "Drug X", lipophilicity = lipophilicity(2.5))
#>
#> ── Compound: Drug X ────────────────────────────────────────────────────────────
#>
#> ── Basic Properties ──
#>
#> ── Physicochemical Properties ──
#>
#> • Lipophilicity:
#> • 2.5 Log Units [Unknown]
# Several alternatives, the second marked as the default
create_compound(
name = "Drug X",
lipophilicity = list(
lipophilicity(2.5, name = "Measured"),
lipophilicity(3.1, name = "Predicted", default = TRUE)
)
)
#>
#> ── Compound: Drug X ────────────────────────────────────────────────────────────
#>
#> ── Basic Properties ──
#>
#> ── Physicochemical Properties ──
#>
#> • Lipophilicity:
#> • Measured: 2.5 Log Units [Unknown]
#> • Predicted (Default): 3.1 Log Units [Unknown]