Skip to content

Commit

Permalink
Merge 9136c7a into e557bbb
Browse files Browse the repository at this point in the history
  • Loading branch information
pckroon committed Jun 9, 2023
2 parents e557bbb + 9136c7a commit 6691f2b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pysmiles/smiles_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def format_atom(molecule, node_key, default_element='*'):
name = name.lower()

if (stereo is None and isotope == '' and charge == 0 and default_h and
class_ == '' and name.lower() in 'b c n o p s se as *'.split()):
class_ == '' and name.lower() in 'b c n o p s *'.split()):
return name

if hcount:
Expand Down
10 changes: 10 additions & 0 deletions tests/test_write_smiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@
(2, 3, {'order': 1})],
False
),
(
[(0, {'element': 'Se', 'charge': 0, 'aromatic': False, 'hcount': 0})],
[],
False
),
(
[(0, {'element': 'As', 'charge': 0, 'aromatic': False, 'hcount': 0})],
[],
False
),
))
def test_write_smiles(node_data, edge_data, expl_h):
mol = make_mol(node_data, edge_data)
Expand Down

0 comments on commit 6691f2b

Please sign in to comment.