Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:13.1
avogadro
MopacAuxReaderFix.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File MopacAuxReaderFix.patch of Package avogadro
From 933ae95d4e759cd83387fc16596fe6bb8df69dd2 Mon Sep 17 00:00:00 2001 From: "David C. Lonie" <david.lonie@kitware.com> Date: Sun, 3 Feb 2013 11:17:05 -0500 Subject: [PATCH] Mark basis set as invalid if no atoms parsed from MOPAC .aux file. Change-Id: I6cfcf6cb65aa8f4ac4457e25ce7d36b2bcc46c12 --- libavogadro/src/extensions/surfaces/openqube/mopacaux.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libavogadro/src/extensions/surfaces/openqube/mopacaux.cpp b/libavogadro/src/extensions/surfaces/openqube/mopacaux.cpp index 275428a..a7f8f4d 100644 --- a/libavogadro/src/extensions/surfaces/openqube/mopacaux.cpp +++ b/libavogadro/src/extensions/surfaces/openqube/mopacaux.cpp @@ -122,6 +122,11 @@ void MopacAux::processLine() void MopacAux::load(SlaterSet* basis) { + if (m_atomPos.size() == 0) { + qWarning() << "No atoms found in .aux file. Bailing out."; + basis->setIsValid(false); + return; + } // Now load up our basis set basis->addAtoms(m_atomPos); basis->addSlaterIndices(m_atomIndex); @@ -140,10 +145,12 @@ void MopacAux::load(SlaterSet* basis) mol.addAtom(m_atomPos[i], m_atomNums[i]); } } - else + else { qWarning() << "Number of atomic numbers (" << m_atomNums.size() << ") does not equal the number of atomic positions (" << m_atomPos.size() << "). Not populating molecule."; + basis->setIsValid(false); + } } vector<int> MopacAux::readArrayI(unsigned int n) -- 1.7.10
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor