choderalab / espaloma_charge

Standalone charge assignment from Espaloma framework.
MIT License
38 stars 5 forks source link

option to return electronegativity and hardness from charge functions #26

Closed Dunni3 closed 1 year ago

Dunni3 commented 1 year ago

I've added a boolean keyword argument to the charge and charge_multiple functions which, if set to True, will return the electronegativity and hardness values in addition to partial charges.

I wanted to access this information but didn't see any obvious way to do it so I took a stab at adding such a feature. Happy to make some changes to this PR if you would prefer it be done differently.

jchodera commented 1 year ago

This seems like a useful feature if it doesn't break anything downstream!

Dunni3 commented 1 year ago

It shouldn't break anything downstream. The keyword argument that I've added defaults to False, which produces identical behavior as these functions before the addition of the keyword argument.

Dunni3 commented 1 year ago

How can you read the graph object? I haven't found a part of your user-facing API that exposes the graph object itself.