private void readBioPolymer ( String biopolymerFile ) { try { // Read PDB file FileReader fileReader = new FileReader ( biopolymerFile ) ; ISimpleChemObjectReader reader = new ReaderFactory ( ) . createReader ( fileReader ) ; IChemFile chemFile = ( IChemFile ) reader . read ( ( IChemObject ) new ChemFile ( ) ) ; // Get molecule from ChemFile IChemSequence chemSequence = chemFile . getChemSequence ( 0 ) ; IChemModel chemModel = chemSequence . getChemModel ( 0 ) ; IAtomContainerSet setOfMolecules = chemModel . getMoleculeSet ( ) ; protein = ( IBioPolymer ) setOfMolecules . getAtomContainer ( 0 ) ; } catch ( IOException | CDKException exc ) { logger . error ( "Could not read BioPolymer from file>" + biopolymerFile + " due to: " + exc . getMessage ( ) ) ; logger . debug ( exc ) ; } }
Creates from a PDB File a BioPolymer .