Skip to content

Partial, formal, and total charges are reported with inconsistent units #465

@jchodera

Description

@jchodera

The current version of the toolkit reports partial, formal, and total charges with inconsistent units:

>> from openforcefield.topology import Molecule
>>> molecule = Molecule.from_smiles('c1ccccc1')
>>> molecule.total_charge
0
>>> molecule.atoms[0].formal_charge
0
>>> molecule.atoms[0].partial_charge
Quantity(value=0.0, unit=elementary charge)
>>> molecule.partial_charges
Quantity(value=array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), unit=elementary charge)

Instead, we should presumably adopt a consistent output format (with or without units) for all charge-related quantities.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions