Are the atoms in the cartesian gaussian output in the same order as your input atoms? If so, then you could use the library to calculate the dihedral angle yourself since you know which atom is which and their cartesian coordinates.
On Wed, 27 Feb 2019 at 18:59, Kenneth Irving via OpenBabel-scripting < [email protected]> wrote: > > I have this simple molecule I'm studying: H2SCl > > The Gaussian 2009 (G09) input file is this: > > ---------- cut here ------------- > #ub2plyp/6-31g(d,p) freq OPT > > adducto H2S--Cl > > 0 2 > Cl > S, 1, r1 > H, 2, r2, 1, a1 > H, 2, r3, 1, a2, 3, d1 > Variables: > r1=1.9 > r2=1.0 > r3=1.0 > a1=120.0 > a2=120.0 > d1=120.0 > > ---------- cut here ------------- > > After running g09, I get these internal coordinate values in the output > > ---------- cut here ------------- > ! Name Definition Value Derivative Info. > > -------------------------------------------------------------------------------- > ! R1 R(1,2) 2.7341 -DE/DX = 0.0 > ! R2 R(2,3) 1.3401 -DE/DX = -0.0001 > ! R3 R(2,4) 1.3401 -DE/DX = -0.0001 > ! A1 A(1,2,3) 89.758 -DE/DX = 0.0 > ! A2 A(1,2,4) 89.758 -DE/DX = 0.0 > ! A3 A(3,2,4) 93.213 -DE/DX = 0.0 > ! D1 D(1,2,4,3) -89.744 -DE/DX = 0.0 > > -------------------------------------------------------------------------------- > ---------- cut here ------------- > > It's easy to see that G09 is not printing the same internal coordinates > I used in the input > > If I redefine the initial internal coordinates, putting sulphur as > the first atom: > > ---------- cut here ------------- > #ub2plyp/6-31g(d,p) freq OPT > > adducto H2S--Cl > > 0 2 > S > Cl, 1, r1 > H, 1, r2, 2, a1 > H, 1, r3, 2, a2, 3, d1 > Variables: > r1=2.9 > r2=1.0 > r3=1.0 > a1=120.0 > a2=120.0 > d1=120.0 > > ---------- cut here ------------- > > ...I get these final internal coordinates: > > ---------- cut here ------------- > ! Name Definition Value Derivative Info. > > -------------------------------------------------------------------------------- > ! R1 R(1,2) 2.7349 -DE/DX = 0.0 > ! R2 R(1,3) 1.3399 -DE/DX = 0.0 > ! R3 R(1,4) 1.3399 -DE/DX = 0.0 > ! A1 A(2,1,3) 89.7451 -DE/DX = 0.0 > ! A2 A(2,1,4) 89.7451 -DE/DX = 0.0 > ! A3 A(3,1,4) 93.2202 -DE/DX = 0.0 > ! D1 D(2,1,4,3) -89.7303 -DE/DX = 0.0 > > ---------- cut here ------------- > > Distances and bond angles are no problem. The problem I'm having is with > the dihedral angle. > > In both cases the numbering in the dihedral angle is different from the > one I used in the input file. > > In the first case the dihedral angle in the input is numbered: 4,2,1,3 but > in the output I get: 1,2,4,3 > > In the second case the dihedral angle in the input numbered: 4,1,2,3 but > in the output I get: 2,1,4,3 > > For a different calculation I need to take these internal coordinates > results from G09 output and recreate the geometry in internal coordinates > but with the original numbering. As I said, distances and bond angles are > no problem. The problem is getting the original dihedral angle from the > internal coordinates data provided in the output. > > I was wondering whether I could do this with openbabel? > > I haven't been able to find a way that works for all cases: depending on > the atomic numbers, G09 displays different numbering of dihedral angles. > Apparently it lists atoms from the highest to lowest atomic number. > > Maybe there's a way I can use the internal coordinates in the output to > convert to cartesian coordinates and from there calculate the internal > coordinates with the original numbering. > > Maybe there's a simple way to convert dihedral angles based on their > numbering, but I haven't been able to come up with a solution, nor have I > found any literature on this topic. > > If someone could provide me with some guidance or has any idea, I'd be > very grateful. Thanks in advance. > > Best regards > > Kenneth > > > > > _______________________________________________ > OpenBabel-scripting mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting >
_______________________________________________ OpenBabel-scripting mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
