Export molecule file with charges

How can I export my molecule with charges into a common format (e.g, MOL2, XYZ+). I’m adding mol.to_string("xyz+”) but it is not working.

Hi.

Could you provide the psi4 version and a minimal example of what you are trying to do?
(please use text formatting for input files or upload a .txt)

sbembenek,

Sorry, there was a bug where coordinates < ~1 bohr were rounded down to 0. This was fixed in PR 1938 so if you pull down a fresh install it should be working again. Hope this helps!

Version=Psi4 1.3.2

I’m wondering if it is possible to write out the coordinates and the Mulliken charges in a standard format like PDBQT of (preferable) MOL2.

I attempted to this as:

mol.to_string("xyz+”) in the header file ->

memory 10240 mb

molecule mol {
0 1
O 0.00000000 0.00000000 0.00000000
H 0.93442991 -0.47889533 0.00000000
H -0.76298349 -0.72135719 0.00000000

}

set scf_type df
set basis 6-31G(d)
set reference rks

mol.update_geometry()
mol.symmetrize(1e-3)

e, wfn = optimize(‘b3lyp’, return_wfn=True)
oeprop(wfn, “MULLIKEN_CHARGES”)
mol.to_string(“xyz+”)
mol.print_out()
print_variables()

I’m sure I am implement this wrong in general. Also, I think the xyz+ will not print all the partial charges, but rather just a single forma charge.

Thanks for the help!

Scott