/****************************************************************************** This source file is part of the Avogadro project. This source code is released under the 3-Clause BSD License, (see "LICENSE"). ******************************************************************************/ #ifndef AVOGADRO_QUANTUMIO_MOPACAUX_H #define AVOGADRO_QUANTUMIO_MOPACAUX_H #include "avogadroquantumioexport.h" #include #include #include #include namespace Avogadro { namespace QuantumIO { class AVOGADROQUANTUMIO_EXPORT MopacAux : public Io::FileFormat { public: MopacAux(); ~MopacAux() override; void outputAll(); Operations supportedOperations() const override { return Read | File | Stream | String; } FileFormat* newInstance() const override { return new MopacAux; } std::string identifier() const override { return "Avogadro: MOPAC"; } std::string name() const override { return "MOPAC AUX"; } std::string description() const override { return "MOPAC AUX file format."; } std::string specificationUrl() const override { return "https://openmopac.net/Manual/auxiliary.html"; } std::vector fileExtensions() const override; std::vector mimeTypes() const override; [[nodiscard]] bool read(std::istream& in, Core::Molecule& molecule) override; [[nodiscard]] bool write(std::ostream&, const Core::Molecule&) override { // Empty, as we do not write out MOPAC AUX files. return false; } private: void processLine(std::istream& in); void load(Core::SlaterSet* basis); std::vector readArrayElements(std::istream& in, unsigned int n); std::vector readArrayI(std::istream& in, unsigned int n); std::vector readArrayD(std::istream& in, unsigned int n); std::vector readArraySym(std::istream& in, unsigned int n); std::vector readArrayVec(std::istream& in, unsigned int n); bool readOverlapMatrix(std::istream& in, unsigned int n); bool readEigenVectors(std::istream& in, unsigned int n); bool readDensityMatrix(std::istream& in, unsigned int n); bool readVibrationFrequencies(std::istream& in, unsigned int n); bool readVibrationIntensities(std::istream& in, unsigned int n); bool readNormalModes(std::istream& in, unsigned int n); int m_electrons; int m_charge = 0; int m_spin = 1; Vector3 m_dipoleMoment = Vector3::Zero(); std::vector m_partialCharges; double m_heatOfFormation; double m_area; double m_volume; std::vector m_energies; std::vector m_forces; std::vector m_shellTypes; std::vector m_shellNums; std::vector m_shelltoAtom; std::vector m_c; std::vector m_csp; std::vector m_orbitalEnergy; std::vector m_MOcoeffs; std::vector m_atomIndex; std::vector m_atomSym; std::vector m_atomNums; std::vector m_zeta; std::vector m_pqn; std::vector m_atomPos; std::vector> m_coordSets; std::vector m_frequencies; std::vector m_irIntensities; std::vector m_normalModes; Eigen::MatrixXd m_overlap; /// Overlap matrix Eigen::MatrixXd m_eigenVectors; Eigen::MatrixXd m_density; /// Total density matrix }; } // End namespace QuantumIO } // End namespace Avogadro #endif