Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gufe/components/explicitmoleculecomponent.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, rdkit: RDKitMol, name: str = ""):

if not any(atom.GetAtomicNum() == 1 for atom in rdkit.GetAtoms()):
warnings.warn(
"Molecule doesn't have any hydrogen atoms present. "
f"Molecule, {name}, doesn't have any hydrogen atoms present. "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f"Molecule, {name}, doesn't have any hydrogen atoms present. "
f"Molecule (name='{name}') doesn't have any hydrogen atoms present. "

It's valid for the name to be an empty string, so this should make the message less confusing in that case.

"If this is unexpected, consider loading the molecule with `removeHs=False`"
)

Expand Down