diff --git a/pysmiles/smiles_helper.py b/pysmiles/smiles_helper.py index 86b05e3..e855107 100644 --- a/pysmiles/smiles_helper.py +++ b/pysmiles/smiles_helper.py @@ -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: diff --git a/tests/test_write_smiles.py b/tests/test_write_smiles.py index 1b5fa97..d4b2790 100644 --- a/tests/test_write_smiles.py +++ b/tests/test_write_smiles.py @@ -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)