const MmffBondStrechParameters* MmffParameters::empiricalBondStrechParameters(int atomicNumberA, int atomicNumberB) const { CHEMKIT_UNUSED(atomicNumberA); CHEMKIT_UNUSED(atomicNumberB); return 0; }
/// Write the contents of \p file to \p output. bool PolymerFileFormat::write(const PolymerFile *file, std::ostream &output) { CHEMKIT_UNUSED(file); CHEMKIT_UNUSED(output); setErrorString((boost::format("'%1' writing not supported.") % name()).str()); return false; }
// --- Input and Output ---------------------------------------------------- // /// Read the data from \p input into \p file. bool PolymerFileFormat::read(std::istream &input, PolymerFile *file) { CHEMKIT_UNUSED(input); CHEMKIT_UNUSED(file); setErrorString((boost::format("'%1' reading not supported.") % name()).str()); return false; }
bool XyzFileFormat::read(std::istream &input, chemkit::MoleculeFile *file) { // atom count line int atomCount = 0; input >> atomCount; input.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); // comment line (unused) std::string commentLine; std::getline(input, commentLine); CHEMKIT_UNUSED(commentLine); // create molecule boost::shared_ptr<chemkit::Molecule> molecule(new chemkit::Molecule); // read atoms and coordinates for(int i = 0; i < atomCount; i++){ std::string symbol; double x = 0; double y = 0; double z = 0; input >> symbol >> x >> y >> z; if(input.fail()){ input.clear(); } // add atom from symbol or atomic number chemkit::Atom *atom = 0; if(symbol.empty()){ continue; } else if(isdigit(symbol.at(0))){ int atomicNumber = boost::lexical_cast<int>(symbol); atom = molecule->addAtom(atomicNumber); } else{ atom = molecule->addAtom(symbol); } // set atom position if(atom){ atom->setPosition(x, y, z); } } // add molecule to file file->addMolecule(molecule); return true; }
bool MdlFileFormat::readPropertyBlock(QIODevice *iodev, chemkit::Molecule *molecule) { CHEMKIT_UNUSED(molecule); while(!iodev->atEnd()){ QString line = iodev->readLine(); if(line.startsWith("M END")){ return true; } } return false; }
bool MmffElectrostaticCalculation::setup(const MmffParameters *parameters) { CHEMKIT_UNUSED(parameters); const MmffAtom *a = atom(0); const MmffAtom *b = atom(1); chemkit::Real oneFourScaling; if(a->isOneFour(b)){ oneFourScaling = 0.75; } else{ oneFourScaling = 1.0; } setParameter(0, a->charge()); setParameter(1, b->charge()); setParameter(2, oneFourScaling); return true; }
// --- Descriptor ---------------------------------------------------------- // /// Calculates the value of the descriptor for \p molecule. Variant MolecularDescriptor::value(const Molecule *molecule) const { CHEMKIT_UNUSED(molecule); return Variant(); }