duartegroup / autodE

automated reaction profile generation
https://duartegroup.github.io/autodE/
MIT License
173 stars 52 forks source link

autode deals with free radicals? #336

Closed liqiang4567 closed 6 months ago

liqiang4567 commented 6 months ago

Hi, I'm using autode to deal with free radicals: import autode as ade molecule = ade.Molecule('reorder_p.txt') print(molecule.charge) The following error occurs: ValueError: Initialised a molecule from an xyz file with an odd number of electrons but had an even charge and 2S + 1 = 1. Impossible Is autode currently incapable of handling free radicals reorder_p.txt

t-young31 commented 6 months ago

Hi @liqiang4567 – free radicals should be fine, but you will need to specify the spin multiplicity (2 for a radical with a single unpaired electron) when creating them from xyz files, i.e.

>>> import autode as ade
>>> molecule = ade.Molecule('reorder_p.xyz', mult=2)
>>> print(molecule.charge, molecule.mult)
0 2
liqiang4567 commented 6 months ago

Yes, for an xyz file, can autode automatically identify how the spin multiplicity is?

t-young31 commented 6 months ago

it can work out when a value is impossible, but not what the value is. you'd need to try a range of values and pick the most stable