Skip to content

Commit a3386fc

Browse files
rwestKEHANG
authored andcommitted
Make SMILES parsing of [C] give triplet state (and test it).
Apparently the ground state is a triplet. Closes #946 (Although whether we react it correctly as a triplet, I cannot guarantee...)
1 parent 89e676d commit a3386fc

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

rmgpy/molecule/parser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@
5454
multiplicity 1
5555
1 Ar u0 p4
5656
""",
57+
'[C]': # We'd return the quintuplet without this
58+
"""
59+
multiplicity 3
60+
1 C u2 p1 c0
61+
""",
62+
5763
}
5864

5965
def __fromSMILES(mol, smilesstr, backend):

rmgpy/molecule/parserTest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,15 @@ def test_fromSMILES(self):
278278
self.compare(adjlist, smiles)
279279

280280

281+
# Test atomic C, which is triplet in ground state
282+
adjlist = '''
283+
multiplicity 3
284+
1 C u2 p1 c0
285+
'''
286+
smiles = '[C]'
287+
self.compare(adjlist, smiles)
288+
289+
281290
# Test O2
282291
adjlist = '''
283292
multiplicity 3

0 commit comments

Comments
 (0)