# Error running psi4 on charged molecules

I am running a simple energy calculation on a conformer of 3-Sulfopropyl methacrylate, which is given my C=C(C)C(=O)OCCCS(=O)(=O)[O-].

This is my workflow:

1. Generate conformers using genetic algorithm in OpenBabel
obabel -:"C=C(C)C(=O)OCCCS(=O)(=O)[O-]" -O SPMA.pdb --gen3D -d
obabel SPMA.pdb -O SPMA_op.xyz --conformer --nconf 300 --score rmsd --writeconformers

1. Extract coordinates of conformer, and put them in psi4 input file given by:
memory 8 GB
molecule MA0 {
0 1
C          3.89733        0.15289       -1.35762
C          4.59280        1.05052       -0.63907
C          5.20105        2.27534       -1.24308
C          4.74095        0.79591        0.82319
O          5.01564        1.66100        1.64197
O          4.54800       -0.52000        1.09100
C          5.28200       -1.03600        2.21300
C          6.78400       -0.89700        2.00000
C          7.24307       -1.67225        0.77007
S          6.44265       -1.12891       -0.72122
O          6.80895        0.28345       -0.80582
O          7.02056       -1.98627       -1.75252
O          5.02989       -1.37699       -0.43672
H          3.77090        0.29082       -2.37251
H          3.48966       -0.67439       -0.89456
H          4.99668        2.29431       -2.29321
H          6.25936        2.26265       -1.08586
H          4.78246        3.14570       -0.78247
H          5.04197       -2.07085        2.34094
H          5.00988       -0.47515        3.08265
H          7.29461       -1.27505        2.86096
H          7.00956        0.13820        1.85038
H          7.02443       -2.70921        0.91770
H          8.29303       -1.50198        0.65390
H          7.75698        0.36077       -0.99601
H          7.95459       -1.75656       -1.87793
}

set {
scf_type          = df
freeze_core       = true

}
E, wfn = energy('HF-3c', return_wfn=True)

oeprop(wfn, 'DIPOLE', 'QUADRUPOLE', 'MULTIPOLE(4)', 'MO_EXTENTS', 'MULLIKEN_CHARGES', 'LOWDIN_CHARGES', 'WIBERG_LOWDIN_INDICES', 'MAYER_INDICES', 'NO_OCCUPATIONS', title='Methacrylic acid (MA0)')

print_variables()

1. Now I run psi4 on this file:

psi4 -n 2 -i SPMA_conf.in -o SPMA.out

When I run this, however, I get a wall of error messages.

Printing out the relevant lines from the Psithon --> Python processed input file:
H          7.00956        0.13820        1.85038
H          7.02443       -2.70921        0.91770
H          8.29303       -1.50198        0.65390
H          7.75698        0.36077       -0.99601
H          7.95459       -1.75656       -1.87793
--> ""","MA0")
core.IO.set_default_namespace("MA0")
core.set_global_option("SCF_TYPE", "df")
core.set_global_option("FREEZE_CORE", "true")
E, wfn = energy('HF-3c', return_wfn=True)
oeprop(wfn, 'DIPOLE', 'QUADRUPOLE', 'MULTIPOLE(4)', 'MO_EXTENTS', 'MULLIKEN_CHARGES', 'LOWDIN_CHARGES', 'WIBERG_LOWDIN_INDICES', 'MAYER_INDICES', 'NO_OCCUPATIONS', title='Methacrylic acid (MA0)')


This seems to be the relevant portion of the error message...

I have run the very same process on other conformers of other non-charged molecules, but I have not run into this problem. Is it because 3-Sulfopropyl methacrylate is charged?

A similar problem arises when I run another charged molecule, like C=C(C)C(=O)OCC[N+](C)(C)C.

How can I fix this problem? Any advice you have would be appreciated!

• Is there an error message beyond just the arrow pointing to that line? If it's not too long (e.g. hundreds or thousands of lines), you can include the whole error message or output. – Tyberius Jan 14 at 17:58
• @Tyberius, I figured it out actually. The 0 1 in the input file represent charge and multiplicity. the 0 represents charge, so once i change that to -1 for the first one, and +1 for the second one, it all works out. – megamence Jan 14 at 18:56
• Glad you got it resolved. I guess I should have looked at the input more carefully, it's pretty typical with electronic structure programs to specify charge and multiplicity in this way. In Gaussian, it will print an error message something like "multiplicity x is impossible with y electrons". – Tyberius Jan 14 at 19:01

Note also that freeze_core does nothing for self-consistent field calculations in Psi4.