Skip to content

Commit c305646

Browse files
committed
Auto calculate the surface when the class is created.
1 parent a75ec00 commit c305646

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

descriptor/qsarmolecular/src/main/java/org/openscience/cdk/geometry/surface/NumericalSurface.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public class NumericalSurface {
7575
*/
7676
public NumericalSurface(IAtomContainer atomContainer) {
7777
this.atoms = AtomContainerManipulator.getAtomArray(atomContainer);
78+
init();
7879
}
7980

8081
/**
@@ -93,15 +94,26 @@ public NumericalSurface(IAtomContainer atomContainer, double solventRadius, int
9394
this.solventRadius = solventRadius;
9495
this.atoms = AtomContainerManipulator.getAtomArray(atomContainer);
9596
this.tesslevel = tesslevel;
97+
init();
9698
}
9799

98100
/**
99101
* Evaluate the surface.
100102
*
101103
* This method generates the points on the accessible surface area of each atom
102-
* as well as calculating the surface area of each atom
104+
* as well as calculating the surface area of each atom.
105+
* @deprecated
103106
*/
107+
@Deprecated
104108
public void calculateSurface() {
109+
// NO-OP
110+
}
111+
112+
/**
113+
* Initialize the surface, generating the points on the accessible surface
114+
* area of each atom as well as calculating the surface area of each atom.
115+
*/
116+
private void init() {
105117

106118
// invariants
107119
for (IAtom atom : atoms) {

0 commit comments

Comments
 (0)