Skip to content

maint: normalize_variants as part of pick_output #153

Description

@HaoZeke
static torch::optional<std::string> normalize_variant(std::string variant_string)
{
    if (variant_string == "no" || variant_string.empty())
    {
        return torch::nullopt;
    }
    else
    {
        return variant_string;
    }
}

There's a version of this in LAMMPS, and now in GROMACS, perhaps it could just be moved into pick_output? ie.. https://docs.metatensor.org/metatomic/latest/torch/reference/cxx/misc.html#_CPPv4N15metatomic_torch11pick_outputENSt6stringEN5torch4DictINSt6stringE11ModelOutputEEN5torch8optionalINSt6stringEEE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions