Logo Search packages:      
Sourcecode: cdk version File versions  Download package

void org::openscience::cdk::io::PDBWriter::write ( IChemObject  object ) throws CDKException [inline]

Writes the content of "object" to output

objectthe object of which the content is outputed
CDKExceptionis thrown if the output does not support the data in the object

Implements org::openscience::cdk::io::IChemObjectWriter.

Definition at line 125 of file PDBWriter.java.

References org::openscience::cdk::tools::manipulator::ChemModelManipulator::getAllAtomContainers(), org::openscience::cdk::interfaces::IChemObject::getBuilder(), org::openscience::cdk::interfaces::IChemSequence::getChemModel(), org::openscience::cdk::interfaces::IChemFile::getChemSequence(), org::openscience::cdk::interfaces::IChemModel::getCrystal(), and org::openscience::cdk::interfaces::IChemObjectBuilder::newMolecule().

        if (object instanceof IMolecule){
        } else if (object instanceof ICrystal){
        } else if (object instanceof IChemFile){
            IChemFile chemFile = (IChemFile)object;
            IChemSequence sequence = chemFile.getChemSequence(0);
            if (sequence != null) {
                  IChemModel model = sequence.getChemModel(0);
                if (model != null) {
                  ICrystal crystal = model.getCrystal();
                    if (crystal != null) {
                    } else {
                        Iterator containers = ChemModelManipulator.getAllAtomContainers(model).iterator();
                        while (containers.hasNext()) {
        } else {
            throw new CDKException("Only supported is writing of Molecule, Crystal and ChemFile objects.");

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index