diff --git a/avogadro/quantumio/gaussianfchk.cpp b/avogadro/quantumio/gaussianfchk.cpp index a8b881f326..496c90cd72 100644 --- a/avogadro/quantumio/gaussianfchk.cpp +++ b/avogadro/quantumio/gaussianfchk.cpp @@ -68,6 +68,13 @@ bool GaussianFchk::read(std::istream& in, Core::Molecule& molecule) molecule.setVibrationRamanIntensities(m_RamanIntensities); } + // set the total charge + molecule.setData("totalCharge", m_charge); + // set the spin multiplicity + molecule.setData("totalSpinMultiplicity", m_spin); + // dipole moment + molecule.setData("dipoleMoment", m_dipoleMoment); + // Do simple bond perception. molecule.perceiveBondsSimple(); molecule.perceiveBondOrders(); @@ -108,6 +115,11 @@ void GaussianFchk::processLine(std::istream& in) m_charge = Core::lexicalCast(list[1]); } else if (key == "Multiplicity" && list.size() > 1) { m_spin = Core::lexicalCast(list[1]); + } else if (key == "Dipole Moment" && list.size() > 2) { + vector dipole = readArrayD(in, Core::lexicalCast(list[2])); + m_dipoleMoment = Vector3(dipole[0], dipole[1], dipole[2]); + // convert from au + m_dipoleMoment *= 2.541746; } else if (key == "Number of electrons" && list.size() > 1) { m_electrons = Core::lexicalCast(list[1]); } else if (key == "Number of alpha electrons" && list.size() > 1) { diff --git a/avogadro/quantumio/gaussianfchk.h b/avogadro/quantumio/gaussianfchk.h index f232c2ffbd..21512c05cc 100644 --- a/avogadro/quantumio/gaussianfchk.h +++ b/avogadro/quantumio/gaussianfchk.h @@ -90,6 +90,7 @@ class AVOGADROQUANTUMIO_EXPORT GaussianFchk : public Io::FileFormat std::vector m_betaMOcoeffs; MatrixX m_density; /// Total density matrix MatrixX m_spinDensity; /// Spin density matrix + Vector3 m_dipoleMoment; Core::ScfType m_scftype; Core::Array m_frequencies; diff --git a/avogadro/quantumio/orca.h b/avogadro/quantumio/orca.h index 020b33db89..128c84dfa6 100644 --- a/avogadro/quantumio/orca.h +++ b/avogadro/quantumio/orca.h @@ -62,6 +62,8 @@ class AVOGADROQUANTUMIO_EXPORT ORCAOutput : public Io::FileFormat std::vector m_atomNums; std::vector m_atomPos; + Eigen::Vector3d m_dipoleMoment; + std::vector> m_bondOrders; std::vector shellFunctions; @@ -84,6 +86,7 @@ class AVOGADROQUANTUMIO_EXPORT ORCAOutput : public Io::FileFormat IR, Raman, Electronic, + ECD, // electronic circular dichroism NMR, BondOrders, NotParsing, @@ -98,6 +101,8 @@ class AVOGADROQUANTUMIO_EXPORT ORCAOutput : public Io::FileFormat bool m_readBeta; int m_homo; + int m_charge; + int m_spin; int m_currentAtom; unsigned int m_numBasisFunctions; @@ -119,6 +124,10 @@ class AVOGADROQUANTUMIO_EXPORT ORCAOutput : public Io::FileFormat Core::Array m_IRintensities; Core::Array m_RamanIntensities; Core::Array> m_vibDisplacements; + + Core::Array m_electronicTransitions; // in eV + Core::Array m_electronicIntensities; + Core::Array m_electronicRotations; // for CD }; } // namespace QuantumIO