Skip to content

Commit

Permalink
used site.element if atom_type.tags["element"] does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
daico007 committed Nov 28, 2023
1 parent a038bc1 commit 918a1b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gmso/formats/top.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ def write_top(top, filename, top_vars=None):
site.atom_type.name,
str(site.molecule.number if site.molecule else 1),
tag,
site.atom_type.tags["element"],
site.atom_type.tags.get(
["element"], site.element.symbol
),
"1", # TODO: care about charge groups
site.charge.in_units(u.elementary_charge).value,
site.atom_type.mass.in_units(u.amu).value,
Expand Down

0 comments on commit 918a1b1

Please sign in to comment.