message: Guard the creation of the basis set mapping
  Sometimes the basis set exists, but doesn't contain a valid basis set.
diff: @@ -442,6 +442,7 @@ bool CjsonFormat::write(std::ostream& file, const Molecule& molecule)
  basis["shellTypes"] = shellTypes;
  // This bit is slightly tricky, map from our index to primitives per shell.
  + if (gaussian->gtoIndices().size() && gaussian->atomIndices().size()) {
  auto gtoIndices = gaussian->gtoIndices();
  auto gtoA = gaussian->gtoA();
  json primitivesPerShell;
  @@ -452,6 +453,7 @@ bool CjsonFormat::write(std::ostream& file, const Molecule& molecule)
  auto atomIndices = gaussian->atomIndices();
  json shellToAtomMap;
  + std::cout << "atomIndices " << atomIndices.size() << std::endl;
  for (size_t i = 0; i < atomIndices.size(); ++i)
  shellToAtomMap.push_back(atomIndices[i]);
  basis["shellToAtomMap"] = shellToAtomMap;
  @@ -466,7 +468,9 @@ bool CjsonFormat::write(std::ostream& file, const Molecule& molecule)
  basis["exponents"] = exponents;
  basis["coefficients"] = coefficients;
  + // Write out the basis set if a valid one exists.
  root["basisSet"] = basis;
  + }
  // Now get the MO matrix, potentially other things. Need to get a handle on
  // when we have just one (paired), or two (alpha and beta) to write.
  