Is there any psi4 python module that can directly convert between Cartesian and internal coordinate? I found in an output file, there is always a Cartesian coordinate. I would like to have something which just converts the coordinate, without doing the calculation.
What I would like to have is, from internal to Cartesian, i.e., the input is an internal coordinate (including the elements, neighborhood information as in “”, O “2” 1.40, “1” 100.0, and the values, 1.40, 100.0) as in the example below, e.g.,
input
H
O 1 0.90
O 2 1.40 1 100.0
H 3 0.90 2 100.0 1 115.0
output
X Y Z
------------ ----------------- ----------------- ----------------- -----------------
H 0.865344357633 0.737012462184 0.447995357691
O 0.102966517591 0.692385655726 -0.028227780300
O -0.102966517591 -0.692385655726 -0.028227780300
H -0.865344357633 -0.737012462184 0.447995357691
without running the electronic structure calculation.
The opposite, input Cartesian output internal (including list of atoms, which one was used to label internal value), is also interesting, but less important to me.
I got one more question. By the following python code
import psi4
psi4.set_memory(‘500 MB’)
h2o = psi4.geometry("""
O
H 1 0.96
H 1 0.96 2 104.5
“”")
output = h2o.print_out()
print(type(output))
print(output) #psi4.energy(‘scf/cc-pvdz’)
The output is
Memory set to 476.837 MiB by Python driver.
Molecular point group: c2v
Full point group: C2v
Geometry (in Angstrom), charge = 0, multiplicity = 1:
Center X Y Z Mass
------------ ----------------- ----------------- ----------------- -----------------
O 0.000000000000 0.000000000000 -0.065775570547 15.994914619570
H 0.000000000000 -0.759061990794 0.521953018286 1.007825032230
H 0.000000000000 0.759061990794 0.521953018286 1.007825032230
<class ‘NoneType’>
None
It seems I cannot get the output Cartesian coordinate into a python variable by output = h2o.print_out(), then subtract relevant information. How to further handle .print_out() results?
Traceback (most recent call last):
File “psi-matrix-test.py”, line 5, in
mat = psi4.Matrix(3, 3)
AttributeError: module ‘psi4’ has no attribute ‘Matrix’
I used Psi4 1.3.2 Git: Rev {HEAD} ecbda83 and Python 3.7.0