public void writePocketsToPMesh ( String outPutFileName ) { try { for ( int i = 0 ; i < pockets . size ( ) ; i ++ ) { // go through every // pocket BufferedWriter writer = new BufferedWriter ( new FileWriter ( outPutFileName + "-" + i + ".pmesh" ) ) ; List < Point3d > pocket = pockets . get ( i ) ; writer . write ( pocket . size ( ) + "\n" ) ; for ( int j = 0 ; j < pocket . size ( ) ; j ++ ) { // go through every // grid point of the // actual pocket Point3d actualGridPoint = ( Point3d ) pocket . get ( j ) ; Point3d coords = gridGenerator . getCoordinatesFromGridPoint ( actualGridPoint ) ; writer . write ( coords . x + "\t" + coords . y + "\t" + coords . z + "\n" ) ; } writer . close ( ) ; } } catch ( IOException e ) { logger . debug ( e ) ; } }
Method writes the pockets to pmesh format .