1
/* $Revision: 7636 $ $Author: egonw $ $Date: 2007-01-04 18:46:10 +0100 (Thu, 04 Jan 2007) $
3
* Copyright (C) 2005-2007 Christian Hoppe <chhoppe@users.sf.net>
5
* Contact: cdk-devel@lists.sourceforge.net
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public License
9
* as published by the Free Software Foundation; either version 2.1
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU Lesser General Public License for more details.
17
* You should have received a copy of the GNU Lesser General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21
package org.openscience.cdk.protein;
23
import org.openscience.cdk.config.AtomTypeFactory;
24
import org.openscience.cdk.interfaces.*;
25
import org.openscience.cdk.io.IChemObjectReader;
26
import org.openscience.cdk.io.ReaderFactory;
27
import org.openscience.cdk.protein.data.PDBAtom;
28
import org.openscience.cdk.tools.GridGenerator;
29
import org.openscience.cdk.tools.LoggingTool;
30
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
32
import javax.vecmath.Point3d;
33
import java.io.BufferedWriter;
34
import java.io.FileReader;
35
import java.io.FileWriter;
36
import java.io.IOException;
37
import java.util.ArrayList;
38
import java.util.Collections;
39
import java.util.Hashtable;
40
import java.util.Vector;
43
* The detection of pocket and cavities in a bioPolymer is done similar to the program
44
* LIGSITE {@cdk.cite MH1997}.
46
* <p>TODO: Optimisation of the cubic grid placement
49
* @cdk.created 2005-09-30
50
* @cdk.module experimental
51
* @cdk.keyword protein
54
public class ProteinPocketFinder {
56
private final LoggingTool logger = new LoggingTool(ProteinPocketFinder.class);
59
int proteinInterior = -1;
60
int pocketSize = 100;// # datapoints needed to form a pocket
61
double rAtom = 1.5;// default atom radius
62
double rSolvent = 1.4;// default solvant radius
63
double latticeConstant = 0.5;
66
double linkageRadius = 1;
67
double atomCheckRadius = 0;// variable to reduce the atom radius search
69
IBioPolymer protein = null;
70
String vanDerWaalsFile="org/openscience/cdk/config/data/pdb_atomtypes.xml";
71
double[][][] grid = null;
72
GridGenerator gridGenerator = new GridGenerator();
73
Hashtable visited = new Hashtable();
74
Vector pockets = new Vector();
77
* @param biopolymerFile The file name containing the protein
78
* @param cubicGrid if true generate the grid
80
public ProteinPocketFinder(String biopolymerFile, boolean cubicGrid) {
81
readBioPolymer(biopolymerFile);
87
public ProteinPocketFinder(String biopolymerFile, double latticeConstant,
89
readBioPolymer(biopolymerFile);
90
this.latticeConstant = latticeConstant;
91
gridGenerator.setLatticeConstant(this.latticeConstant);
99
public ProteinPocketFinder(String biopolymerFile, double[][][] grid) {
101
gridGenerator.setGrid(grid);
102
readBioPolymer(biopolymerFile);
105
public ProteinPocketFinder(IBioPolymer protein, double[][][] grid) {
106
this.protein = protein;
108
gridGenerator.setGrid(grid);
112
* Creates from a PDB File a BioPolymer.
114
private void readBioPolymer(String biopolymerFile) {
117
FileReader fileReader = new FileReader(biopolymerFile);
118
IChemObjectReader reader = new ReaderFactory()
119
.createReader(fileReader);
120
IChemFile chemFile = (IChemFile) reader
121
.read((IChemObject) new org.openscience.cdk.ChemFile());
122
// Get molecule from ChemFile
123
IChemSequence chemSequence = chemFile.getChemSequence(0);
124
IChemModel chemModel = chemSequence.getChemModel(0);
125
IMoleculeSet setOfMolecules = chemModel.getMoleculeSet();
126
protein = (IBioPolymer) setOfMolecules.getMolecule(0);
127
} catch (Exception exc) {
128
logger.error("Could not read BioPolymer from file>"
129
+ biopolymerFile + " due to: " + exc.getMessage());
136
* Method determines the minimum and maximum values of a coordinate space
139
* @return double[] stores min,max,min,max,min,max
141
public double[] findGridBoundaries() {
142
IAtom[] atoms = AtomContainerManipulator.getAtomArray(protein);
143
double[] minMax = new double[6];
144
minMax[0] = atoms[0].getPoint3d().x;
145
minMax[1] = atoms[0].getPoint3d().x;
146
minMax[2] = atoms[0].getPoint3d().y;
147
minMax[3] = atoms[0].getPoint3d().y;
148
minMax[4] = atoms[0].getPoint3d().z;
149
minMax[5] = atoms[0].getPoint3d().z;
150
for (int i = 0; i < atoms.length; i++) {
151
if (atoms[i].getPoint3d().x > minMax[1]) {
152
minMax[1] = atoms[i].getPoint3d().x;
153
} else if (atoms[i].getPoint3d().y > minMax[3]) {
154
minMax[3] = atoms[i].getPoint3d().y;
155
} else if (atoms[i].getPoint3d().z > minMax[5]) {
156
minMax[5] = atoms[i].getPoint3d().z;
157
} else if (atoms[i].getPoint3d().x < minMax[0]) {
158
minMax[0] = atoms[i].getPoint3d().x;
159
} else if (atoms[i].getPoint3d().y < minMax[2]) {
160
minMax[2] = atoms[i].getPoint3d().y;
161
} else if (atoms[i].getPoint3d().z < minMax[4]) {
162
minMax[4] = atoms[i].getPoint3d().z;
170
* Method creates a cubic grid with the grid generator class.
172
public void createCubicGrid() {
173
// logger.debug(" CREATE CUBIC GRID");
174
gridGenerator.setDimension(findGridBoundaries(), true);
175
gridGenerator.generateGrid();
176
this.grid = gridGenerator.getGrid();
180
* Method assigns the atoms of a biopolymer to the grid. For every atom
181
* the corresponding grid point is identified and set to the value
182
* of the proteinInterior variable.
183
* The atom radius and solvent radius is accounted for with the variables:
184
* double rAtom, and dpuble rSolvent.
188
public void assignProteinToGrid() throws Exception {
189
// logger.debug.print(" ASSIGN PROTEIN TO GRID");
190
// 1. Step: Set all grid points to solvent accessible
191
this.grid = gridGenerator.initializeGrid(this.grid, 0);
192
// 2. Step Grid points inaccessible to solvent are assigend a value of -1
193
// set grid points around (r_atom+r_solv) to -1
194
IAtom[] atoms = AtomContainerManipulator.getAtomArray(protein);
195
Point3d gridPoint = null;
196
int checkGridPoints = 0;
197
double vdWRadius = 0;
198
int[] dim = gridGenerator.getDim();
199
//int proteinAtomCount = 0;//Debugging
200
int[] minMax = { 0, 0, 0, 0, 0, 0 };
202
for (int i = 0; i < atoms.length; i++) {
203
if (((PDBAtom) atoms[i]).getHetAtom()) {
206
gridPoint = gridGenerator.getGridPointFrom3dCoordinates(atoms[i]
208
this.grid[(int) gridPoint.x][(int) gridPoint.y][(int) gridPoint.z] = -1;
209
vdWRadius = atoms[i].getVanderwaalsRadius();
210
if (vdWRadius == 0) {
213
checkGridPoints = (int) (((vdWRadius + rSolvent) / gridGenerator
214
.getLatticeConstant()) - atomCheckRadius);
215
if (checkGridPoints < 0) {
218
minMax[0] = (int) gridPoint.x - checkGridPoints;
219
minMax[1] = (int) gridPoint.x + checkGridPoints;
220
minMax[2] = (int) gridPoint.y - checkGridPoints;
221
minMax[3] = (int) gridPoint.y + checkGridPoints;
222
minMax[4] = (int) gridPoint.z - checkGridPoints;
223
minMax[5] = (int) gridPoint.z + checkGridPoints;
224
minMax = checkBoundaries(minMax, dim);
225
for (int x = minMax[0]; x <= minMax[1]; x++) {
226
for (int y = minMax[2]; y <= minMax[3]; y++) {
227
for (int z = minMax[4]; z <= minMax[5]; z++) {
228
this.grid[x][y][z] = this.grid[x][y][z] - 1;
229
//proteinAtomCount++;//Debugging
236
// logger.debug("- checkGridPoints>" + checkGridPoints
237
// + " ProteinGridPoints>" + proteinAtomCount);
240
public void debuggCheckPSPEvent() {
241
logger.debug(" debugg_checkPSPEvent");
242
int[] dim = gridGenerator.getDim();
244
int[] pspEvents = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
246
for (int x = 0; x <= dim[0]; x++) {
247
for (int y = 0; y <= dim[1]; y++) {
248
for (int z = 0; z <= dim[2]; z++) {
250
if (this.grid[x][y][z] == 0) {
252
} else if (this.grid[x][y][z] == 1) {
254
} else if (this.grid[x][y][z] == 2) {
256
} else if (this.grid[x][y][z] == 3) {
258
} else if (this.grid[x][y][z] == 4) {
260
} else if (this.grid[x][y][z] == 5) {
262
} else if (this.grid[x][y][z] == 6) {
264
} else if (this.grid[x][y][z] == 7) {
266
} else if (this.grid[x][y][z] >= 7) {
270
if (this.grid[x][y][z] < 0) {
276
System.out.print(" minPSPocket:" + minPSPocket + " proteinGridPoints:"
279
for (int i = 0; i < pspEvents.length; i++) {
280
if (i >= minPSPocket) {
281
sum = sum + pspEvents[i];
283
logger.debug(" " + i + ":" + pspEvents[i]);
285
logger.debug(" pspAll>" + sum);
286
// logger.debug(" PSPAll:"+pspAll+" minPSP:"+minPSP+"
287
// #pspMin:"+pspMin+" psp7:"+psp7+" proteinGridPoints:"+proteinGrid
288
// +" solventGridPoints:"+solventGrid);
292
* Main method which calls the methods: assignProteinToGrid,
293
* GridScan, and FindPockets.
296
public void sitefinder() {
297
//logger.debug("SITEFINDER");
299
assignProteinToGrid();
300
} catch (Exception ex1) {
301
logger.error("Problems with assignProteinToGrid due to:"
304
// 3. Step scan allong x,y,z axis and the diagonals, if PSP event add +1
306
int[] dim = gridGenerator.getDim();
307
// logger.debug(" SITEFINDER-SCAN - dim:" + dim[0] + " grid:"
308
// + this.grid[0].length + " grid point sum:" + this.grid.length
309
// * this.grid[0].length * this.grid[0][0].length);
310
axisScanX(dim[2], dim[1], dim[0]);// x-Axis
311
axisScanY(dim[2], dim[0], dim[1]);// y-Axis
312
axisScanZ(dim[0], dim[1], dim[2]);// z-Axis
314
diagonalAxisScanXZY(dim[0], dim[2], dim[1]);// diagonal1-Axis
315
diagonalAxisScanYZX(dim[1], dim[2], dim[0]);// diagonal2-Axis
316
diagonalAxisScanYXZ(dim[1], dim[0], dim[2]);// diagonal3-Axis
317
diagonalAxisScanXYZ(dim[0], dim[1], dim[2]);// diagonal4-Axis
319
//debuggCheckPSPEvent();
327
* Method sorts the pockets due to its size. The biggest pocket is the first.
330
private void sortPockets() {
331
// logger.debug(" SORT POCKETS Start#:" + pockets.size());
332
Hashtable hashPockets = new Hashtable();
334
Vector sortPockets = new Vector(pockets.size());
335
for (int i = 0; i < pockets.size(); i++) {
336
pocket = (Vector) pockets.get(i);
337
if (hashPockets.containsKey(new Integer(pocket.size()))) {
338
Vector tmp = (Vector) hashPockets
339
.get(new Integer(pocket.size()));
340
tmp.add(new Integer(i));
341
hashPockets.put(new Integer(pocket.size()), tmp);
343
Vector value = new Vector();
344
value.add(new Integer(i));
345
hashPockets.put(new Integer(pocket.size()), value);
349
ArrayList keys = new ArrayList(hashPockets.keySet());
350
Collections.sort(keys);
351
for (int i = keys.size() - 1; i >= 0; i--) {
352
Vector value = (Vector) hashPockets.get(keys.get(i));
353
// logger.debug("key:" + i + " Value" + keys.get(i)
354
// + " #Pockets:" + value.size());
355
for (int j = 0; j < value.size(); j++) {
356
sortPockets.add(pockets
357
.get(((Integer) value.get(j)).intValue()));
360
// logger.debug(" SORT POCKETS End#:" + sortPockets.size());
361
pockets = sortPockets;
365
* Method which finds the pocket, with a simple nearest neighbour clustering. The points
366
* which should be clustered or form a pocket can be determined with:
367
* minPSPocket, minPSCluster, linkageRadius, and pocketSize.
369
private void findPockets() {
370
int[] dim = gridGenerator.getDim();
371
// logger.debug(" FIND POCKETS>dimx:" + dim[0] + " dimy:" + dim[1]
372
// + " dimz:" + dim[2] + " linkageRadius>" + linkageRadius
373
// + " latticeConstant>" + latticeConstant + " pocketSize:"
374
// + pocketSize + " minPSPocket:" + minPSPocket + " minPSCluster:"
376
//int pointsVisited = 0;//Debugging
377
//int significantPointsVisited = 0;//Debugging
378
for (int x = 0; x < dim[0]; x++) {
379
for (int y = 0; y < dim[1]; y++) {
380
for (int z = 0; z < dim[2]; z++) {
381
// logger.debug.print(" x:"+x+" y:"+y+" z:"+z);
382
Point3d start = new Point3d(x, y, z);
384
if (this.grid[x][y][z] >= minPSPocket
385
& !visited.containsKey(x + "." + y + "."+ z)) {
386
Vector subPocket = new Vector();
387
// logger.debug.print("new Point: "+grid[x][y][z]);
388
//significantPointsVisited++;
389
// logger.debug("visited:"+pointsVisited);
391
.clusterPSPPocket(start, subPocket, dim);
392
if (subPocket != null && subPocket.size() >= pocketSize) {
393
pockets.add((Vector) subPocket);
395
// logger.debug(" Points visited:"+pointsVisited+"
396
// subPocketSize:"+subPocket.size()+"
397
// pocketsSize:"+pockets.size()
398
// +" hashtable:"+visited.size());
406
// logger.debug(" ->>>> #pockets:" + pockets.size()
407
// + " significantPointsVisited:" + significantPointsVisited
408
// + " keys:" + visited.size() + " PointsVisited:"
410
// } catch (Exception ex1) {
412
// .println("Problem in System.out due to " + ex1.toString());
418
* Method performs the clustering, is called by findPockets().
420
public Vector clusterPSPPocket(Point3d root, Vector sub_Pocket, int[] dim) {
421
// logger.debug(" ****** New Root ******:"+root.x+" "+root.y+"
423
visited.put((int) root.x + "." + (int) root.y + "."
424
+ (int) root.z, new Integer(1));
425
int[] minMax = { 0, 0, 0, 0, 0, 0 };
426
minMax[0] = (int) (root.x - linkageRadius);
427
minMax[1] = (int) (root.x + linkageRadius);
428
minMax[2] = (int) (root.y - linkageRadius);
429
minMax[3] = (int) (root.y + linkageRadius);
430
minMax[4] = (int) (root.z - linkageRadius);
431
minMax[5] = (int) (root.z + linkageRadius);
432
minMax = checkBoundaries(minMax, dim);
433
// logger.debug("cluster:"+minMax[0]+" "+minMax[1]+" "+minMax[2]+"
434
// "+minMax[3]+" "+minMax[4]+" "+minMax[5]+" ");
435
for (int k = minMax[0]; k <= minMax[1]; k++) {
436
for (int m = minMax[2]; m <= minMax[3]; m++) {
437
for (int l = minMax[4]; l <= minMax[5]; l++) {
438
Point3d node = new Point3d(k, m, l);
439
// logger.debug(" clusterPSPPocket:"+root.x+"
440
// "+root.y+" "+root.z+" ->"+k+" "+m+" "+l+"
441
// #>"+this.grid[k][m][l]+" key:"+visited.containsKey(new
442
// String(k+"."+m+"."+l)));
443
if (this.grid[k][m][l] >= minPSCluster
444
&& !visited.containsKey(k + "." + m
446
// logger.debug(" ---->FOUND");
447
sub_Pocket.add(node);
448
this.clusterPSPPocket(node, sub_Pocket, dim);
453
sub_Pocket.add(root);
458
* Method checks boundaries.
460
* @param minMax with minMax values
461
* @param dim dimension
462
* @return new minMax values between 0 and dim
464
private int[] checkBoundaries(int[] minMax, int[] dim) {
468
if (minMax[1] > dim[0]) {
474
if (minMax[3] > dim[1]) {
480
if (minMax[5] > dim[2]) {
487
* Method which assigns upon a PSP event +1 to these grid points.
489
private void firePSPEvent(Vector line) {
490
for (int i = 0; i < line.size(); i++) {
491
this.grid[(int) ((Point3d) line.get(i)).x][(int) ((Point3d) line
492
.get(i)).y][(int) ((Point3d) line.get(i)).z] = this.grid[(int) ((Point3d) line
493
.get(i)).x][(int) ((Point3d) line.get(i)).y][(int) ((Point3d) line
500
* Method performs a scan; works only for cubic grids!
502
* @param dimK first dimension
503
* @param dimL second dimension
504
* @param dimM third dimension
506
public void diagonalAxisScanXZY(int dimK, int dimL, int dimM) {
507
// x min ->x max;left upper corner z+y max->min//1
508
//logger.debug(" diagonalAxisScanXZY");
512
//int gridPoints = 0;//Debugging
513
Vector line = new Vector();
516
for (int j = dimM; j >= 1; j--) {// z
517
line.removeAllElements();
519
for (int k = 0; k <= dimK; k++) {// min -> max; x
521
line.removeAllElements();
523
for (int l = dimL; l >= 0; l--) {// z
525
if (grid[k][m][l] < 0) {
527
line.removeAllElements();
529
} else if (pspEvent == 2) {
531
line.removeAllElements();
535
if (pspEvent == 1 | pspEvent == 2) {
536
line.add(new Point3d(k, m, l));
545
//logger.debug(" #gridPoints>" + gridPoints);
549
* Method performs a scan; works only for cubic grids!
551
* @param dimK first dimension
552
* @param dimL second dimension
553
* @param dimM third dimension
555
public void diagonalAxisScanYZX(int dimK, int dimL, int dimM) {
556
// y min -> y max; right lower corner zmax->zmin, xmax ->min//4
557
// logger.debug.print(" diagonalAxisScanYZX");
558
//int gridPoints = 0;//Debugging
562
Vector line = new Vector();
565
for (int j = dimM; j >= 1; j--) {// z
566
line.removeAllElements();
568
for (int k = 0; k <= dimK; k++) {// min -> max; y
570
line.removeAllElements();
572
for (int l = dimL; l >= 0; l--) {// z
574
if (grid[m][k][l] < 0) {
576
line.removeAllElements();
578
} else if (pspEvent == 2) {
580
line.removeAllElements();
584
if (pspEvent == 1 | pspEvent == 2) {
585
line.add(new Point3d(m, k, l));
594
// logger.debug(" #gridPoints>"+gridPoints);
598
* Method performs a scan; works only for cubic grids!
600
* @param dimK first dimension
601
* @param dimL second dimension
602
* @param dimM third dimension
604
public void diagonalAxisScanYXZ(int dimK, int dimL, int dimM) {
605
// y min -> y max; left lower corner z max->min, x min->max//2
606
// logger.debug.print(" diagonalAxisScanYXZ");
607
//int gridPoints = 0;//Debugging
613
Vector line = new Vector();
616
for (int j = dimL; j >= 1; j--) {// z
617
line.removeAllElements();
619
for (int k = 0; k <= dimK; k++) {// min -> max; y
620
line.removeAllElements();
623
for (int m = dimM; m >= 0; m--) {// z
625
if (grid[l][k][m] < 0) {
627
line.removeAllElements();
629
} else if (pspEvent == 2) {
631
line.removeAllElements();
635
if (pspEvent == 1 | pspEvent == 2) {
636
line.add(new Point3d(l, k, m));
645
// logger.debug(" #gridPoints>"+gridPoints);
649
* Method performs a scan; works only for cubic grids!
651
* @param dimK first dimension
652
* @param dimL second dimension
653
* @param dimM third dimension
655
public void diagonalAxisScanXYZ(int dimK, int dimL, int dimM) {
656
// x min -> xmax;left lower corner z max->min, y min->max//3
657
// logger.debug.print(" diagonalAxisScanXYZ");
658
//int gridPoints = 0;//Debugging
664
Vector line = new Vector();
667
for (int j = dimL; j >= 1; j--) {// z
668
line.removeAllElements();
670
for (int k = 0; k <= dimK; k++) {// min -> max;x
671
line.removeAllElements();
674
for (int m = dimM; m >= 0; m--) {// z
676
if (grid[k][l][m] < 0) {
678
line.removeAllElements();
680
} else if (pspEvent == 2) {
682
line.removeAllElements();
686
if (pspEvent == 1 | pspEvent == 2) {
687
line.add(new Point3d(k, l, m));
696
// logger.debug(" #gridPoints>"+gridPoints);
700
* Method performs a scan; works only for cubic grids!
702
* @param dimK first dimension
703
* @param dimL second dimension
704
* @param dimM third dimension
706
public void axisScanX(int dimK, int dimL, int dimM) {
708
// logger.debug.print(" diagonalAxisScanX");
709
//int gridPoints = 0;//Debugging
710
Vector line = new Vector();
712
for (int k = 0; k <= dimK; k++) {
713
line.removeAllElements();
715
for (int l = 0; l <= dimL; l++) {
716
line.removeAllElements();
718
for (int m = 0; m <= dimM; m++) {
720
if (grid[m][l][k] < 0) {
723
line.removeAllElements();
724
} else if (pspEvent == 2) {
726
line.removeAllElements();
730
if (pspEvent == 1 | pspEvent == 2) {
731
line.add(new Point3d(m, l, k));
738
// logger.debug(" #gridPoints>" + gridPoints);
742
* Method performs a scan; works only for cubic grids!
744
* @param dimK first dimension
745
* @param dimL second dimension
746
* @param dimM third dimension
748
public void axisScanY(int dimK, int dimL, int dimM) {
750
Vector line = new Vector();
752
for (int k = 0; k <= dimK; k++) {
753
line.removeAllElements();
755
for (int l = 0; l <= dimL; l++) {
756
line.removeAllElements();
758
for (int m = 0; m <= dimM; m++) {
759
if (grid[l][m][k] < 0) {
762
line.removeAllElements();
763
} else if (pspEvent == 2) {
764
// if (line.size()>2){
767
line.removeAllElements();
772
line.add(new Point3d(l, m, k));
782
* Method performs a scan; works only for cubic grids!
784
* @param dimK first dimension
785
* @param dimL second dimension
786
* @param dimM third dimension
788
public void axisScanZ(int dimK, int dimL, int dimM) {
790
Vector line = new Vector();
792
for (int k = 0; k <= dimK; k++) {
793
line.removeAllElements();
795
for (int l = 0; l <= dimL; l++) {
796
line.removeAllElements();
798
for (int m = 0; m <= dimM; m++) {
799
if (grid[k][l][m] < 0) {
802
line.removeAllElements();
803
} else if (pspEvent == 2) {
805
line.removeAllElements();
810
line.add(new Point3d(k, l, m));
821
* Method which assigns van der Waals radii to the biopolymer
822
* default org/openscience/cdk/config/data/pdb_atomtypes.xml
823
* stored in the variable String vanDerWaalsFile.
825
public void assignVdWRadiiToProtein() {
826
AtomTypeFactory atf = null;
827
IAtom[] atoms = AtomContainerManipulator.getAtomArray(protein);
829
atf = AtomTypeFactory.getInstance(
830
vanDerWaalsFile, atoms[0].getBuilder()
832
} catch (Exception ex1) {
833
System.out.println("Problem with AtomTypeFactory due to:"
836
for (int i = 0; i < atoms.length; i++) {
838
atf.configure(atoms[i]);
839
} catch (Exception ex2) {
840
logger.error("Problem with atf.configure due to:"
848
* Method writes the grid to pmesh format.
850
public void gridToPmesh(String outPutFileName) {
852
gridGenerator.writeGridInPmeshFormat(outPutFileName);
853
} catch (IOException e) {
859
* Method writes the PSP points (>=minPSPocket) to pmesh format.
861
public void pspGridToPmesh(String outPutFileName) {
863
gridGenerator.writeGridInPmeshFormat(outPutFileName, minPSPocket);
864
} catch (IOException e) {
870
* Method writes the protein grid points to pmesh format.
872
public void proteinGridToPmesh(String outPutFileName) {
874
gridGenerator.writeGridInPmeshFormat(outPutFileName, -1);
875
} catch (IOException e) {
881
* Method writes the pockets to pmesh format.
883
public void writePocketsToPMesh(String outPutFileName) {
886
for (int i = 0; i < pockets.size(); i++) {// go through every
888
BufferedWriter writer = new BufferedWriter(new FileWriter(
889
outPutFileName + "-" + i + ".pmesh"));
890
Vector pocket = (Vector) pockets.get(i);
891
writer.write(pocket.size() + "\n");
892
for (int j = 0; j < pocket.size(); j++) {// go through every
895
Point3d actualGridPoint = (Point3d) pocket.get(j);
896
Point3d coords = gridGenerator
897
.getCoordinatesFromGridPoint(actualGridPoint);
898
writer.write(coords.x + "\t" + coords.y + "\t" + coords.z
903
} catch (IOException e) {
910
* @return Returns the grid.
912
public double[][][] getGrid() {
918
* @param grid The grid to set.
920
public void setGrid(double[][][] grid) {
926
* @return Returns the latticeConstant.
928
public double getLatticeConstant() {
929
return latticeConstant;
934
* @param latticeConstant The latticeConstant to set.
936
public void setLatticeConstant(double latticeConstant) {
937
this.latticeConstant = latticeConstant;
942
* @return Returns the linkageRadius.
944
public double getLinkageRadius() {
945
return linkageRadius;
950
* @param linkageRadius The linkageRadius to set.
952
public void setLinkageRadius(double linkageRadius) {
953
this.linkageRadius = linkageRadius;
958
* @return Returns the minPSCluster.
960
public int getMinPSCluster() {
966
* @param minPSCluster The minPSCluster to set.
968
public void setMinPSCluster(int minPSCluster) {
969
this.minPSCluster = minPSCluster;
974
* @return Returns the minPSPocket.
976
public int getMinPSPocket() {
982
* @param minPSPocket The minPSPocket to set.
984
public void setMinPSPocket(int minPSPocket) {
985
this.minPSPocket = minPSPocket;
990
* @return Returns the pocketSize.
992
public int getPocketSize() {
998
* @param pocketSize The pocketSize to set.
1000
public void setPocketSize(int pocketSize) {
1001
this.pocketSize = pocketSize;
1006
* @return Returns the protein.
1008
public IBioPolymer getProtein() {
1014
* @param protein The protein to set.
1016
public void setProtein(IBioPolymer protein) {
1017
this.protein = protein;
1022
* @return Returns the proteinInterior.
1024
public int getProteinInterior() {
1025
return proteinInterior;
1030
* @param proteinInterior The proteinInterior to set.
1032
public void setProteinInterior(int proteinInterior) {
1033
this.proteinInterior = proteinInterior;
1038
* @return Returns the rAtom.
1040
public double getRAtom() {
1046
* @param atom The rAtom to set.
1048
public void setRAtom(double atom) {
1054
* @return Returns the rSolvent.
1056
public double getRSolvent() {
1062
* @param solvent The rSolvent to set.
1064
public void setRSolvent(double solvent) {
1070
* @return Returns the solvantValue.
1072
public int getSolvantValue() {
1073
return solvantValue;
1078
* @param solvantValue The solvantValue to set.
1080
public void setSolvantValue(int solvantValue) {
1081
this.solvantValue = solvantValue;
1086
* @return Returns the vanDerWaalsFile.
1088
public String getVanDerWaalsFile() {
1089
return vanDerWaalsFile;
1094
* @param vanDerWaalsFile The vanDerWaalsFile to set.
1096
public void setVanDerWaalsFile(String vanDerWaalsFile) {
1097
this.vanDerWaalsFile = vanDerWaalsFile;
1102
* @return Returns the pockets.
1104
public Vector getPockets() {
1110
* @param atomCheckRadius The atomCheckRadius to set.
1112
public void setAtomCheckRadius(double atomCheckRadius) {
1113
this.atomCheckRadius = atomCheckRadius;