Dear all,
Today, I want to write some analysis about geometry structure. I meets some questions that I want to you can help me. I created a CH4 molecule like this:
geom="""
C -1.86708863 0.79113923 0.00000000
H -1.51043420 -0.21767077 0.00000000
H -1.51041579 1.29553742 0.87365150
H -1.51041579 1.29553742 -0.87365150
H -2.93708863 0.79115241 0.00000000
"""
mol = psi4.geometry(geom)
But when I used print(np.array(mol.geometry())), I found that the coordinates have been changed. It prints:
[[-1.30679644e-08 5.22718587e-08 0.00000000e+00]
[ 6.73979184e-01 -1.90637457e+00 0.00000000e+00]
[ 6.74013974e-01 9.53174493e-01 1.65096207e+00]
[ 6.74013974e-01 9.53174493e-01 -1.65096207e+00]
[-2.02200698e+00 2.49588623e-05 0.00000000e+00]]
Now I want to know how to deal with the geometry in Psi4, translation, and rotation?
Thanks a lot!
Best regards
I added backticks to your post, so the code appears as code. I also made the topic title more descriptive.
As for your question: use nocom to disable translation and use noreorient to disable rotation. The following outputs the geometry in Bohr correctly. (If you want Angstroms, mutliply by qcel.constants.bohr2angstroms.) Does this answer your question?
geom = """
nocom
noreorient
C -1.86708863 0.79113923 0.00000000
H -1.51043420 -0.21767077 0.00000000
H -1.51041579 1.29553742 0.87365150
H -1.51041579 1.29553742 -0.87365150
H -2.93708863 0.79115241 0.00000000
"""
mol = psi4.geometry(geom)
print(np.array(mol.geometry()))
Yes, it is my question.
But I also have the last question. Why do not you design “nocom” and “noreorient” as the methods of the geometry class. Just use follow ways to disable translation and rotation:
geom = “”"
C -1.86708863 0.79113923 0.00000000
H -1.51043420 -0.21767077 0.00000000
H -1.51041579 1.29553742 0.87365150
H -1.51041579 1.29553742 -0.87365150
H -2.93708863 0.79115241 0.00000000
“”"
mol = psi4.geometry(geom)
mol.nocom()
mol.noreorient()
Maybe I think it is more convenient. Just in my opinion.
Another question, where can I find the “qcel.constants.bohr2angstroms”?
Thanks for your reply.
Best regards,
Taiping
-
The problem is that the center of mass is changed and the molecule reoriented during initialization, before you have a chance to call nocom or noreorient.
-
qcel.constants.bohr2angstroms is in the 1.3 release of Psi4. This release is about a week old and is fully stable. You can get it here. If you don’t want to use Psi4 1.3, the conversion factor has a different name. I need to know what version you’re using to find the name of the conversion factor there.
Let me know if you need anything else!
Dear jmisiewicz,
Thanks you for your quick reply.
- If I don’t use nocom and noreorient, Psi4 will translate and rotate molecule. I guess that it likes that from “input orientation” to “standard orientation” in Gaussian. Is it right?
- Now I use version 1.2.1, but I don’t know if it is right. I install psi4 using “Psi4conda-latest-py36-Linux-x86_64.sh”, this script is downloaded on web “http://vergil.chemistry.gatech.edu/nu-psicode/install-v1.2.1.html”
Recent, I often use psi4 as my python module. It is very convenient. Thanks you for your dedication.
Thanks a lot.
Best regards
Taiping
Ok. Thanks for your kind help.
Best regards