1package denoptim.molecularmodeling.zmatrix;
3import denoptim.constants.DENOPTIMConstants;
298 if (o.getClass() != getClass())
304 if (this.
id != other.
id)
307 if (this.symbol ==
null ? other.
symbol !=
null : !
this.symbol.equals(other.
symbol))
310 if (this.type ==
null ? other.
type !=
null : !
this.type.equals(other.
type))
315 if (this.bondLength ==
null && other.
bondLength ==
null)
319 else if (this.bondLength ==
null || other.
bondLength ==
null)
327 if (Math.abs(
this.bondLength - other.
bondLength) >
332 if (this.angleValue ==
null && other.
angleValue ==
null)
336 else if (this.angleValue ==
null || other.
angleValue ==
null)
344 if (Math.abs(
this.angleValue - other.
angleValue) >
349 if (this.angle2Value ==
null && other.
angle2Value ==
null)
353 else if (this.angle2Value ==
null || other.
angle2Value ==
null)
361 if (Math.abs(
this.angle2Value - other.
angle2Value) >
367 if (this.chiralFlag ==
null ? other.
chiralFlag !=
null
372 int thisBondRefId = (this.bondRefAtom !=
null) ? this.bondRefAtom.
getId() : -1;
373 int otherBondRefId = (other.bondRefAtom !=
null) ? other.
bondRefAtom.
getId() : -1;
374 if (thisBondRefId != otherBondRefId)
377 int thisAngleRefId = (this.angleRefAtom !=
null) ? this.angleRefAtom.
getId() : -1;
378 int otherAngleRefId = (other.angleRefAtom !=
null) ? other.
angleRefAtom.
getId() : -1;
379 if (thisAngleRefId != otherAngleRefId)
382 int thisAngle2RefId = (this.angle2RefAtom !=
null) ? this.angle2RefAtom.
getId() : -1;
383 int otherAngle2RefId = (other.angle2RefAtom !=
null) ? other.
angle2RefAtom.
getId() : -1;
384 if (thisAngle2RefId != otherAngle2RefId)
396 result = 31 * result +
id;
397 result = 31 * result + (
symbol !=
null ?
symbol.hashCode() : 0);
398 result = 31 * result + (
type !=
null ?
type.hashCode() : 0);
General set of constants used in DENOPTIM.
static final double FLOATCOMPARISONTOLERANCE
Smallest difference for comparison of double and float numbers.
Representation of an atom in the ZMatrix.
ZMatrixAtom(int id, String symbol, String type, ZMatrixAtom bondRefAtom, ZMatrixAtom angleRefAtom, ZMatrixAtom angle2RefAtom, Double bondLength, Double angleValue, Double angle2Value, Integer chiralFlag)
Constructor for ZMatrixAtom.
String getSymbol()
Get the symbol of the atom.
Double getAngle2Value()
Get the angle2 value.
void setBondLength(Double bondLength)
Set the bond length.
void setId(int id)
Set the id of the atom.
Integer getChiralFlag()
Get the chiral flag.
boolean usesProperTorsion()
Check if the atom uses proper torsion.
void setChiralFlag(Integer chiralFlag)
Set the chiral flag.
ZMatrixAtom angle2RefAtom
int getId()
Get the id of the atom.
void setBondRefAtom(ZMatrixAtom bondRefAtom)
Package-private setter for bond reference atom (used for cloning).
ZMatrixAtom getBondRefAtom()
Get the bond reference atom.
ZMatrixAtom getAngle2RefAtom()
Get the angle2 reference atom.
void setType(String type)
Set the type of the atom.
void setAngleValue(Double angleValue)
Set the angle value.
void setAngle2Value(Double angle2Value)
Set the angle2 value.
String getType()
Get the type of the atom.
void setSymbol(String symbol)
Set the symbol of the atom.
void setAngle2RefAtom(ZMatrixAtom angle2RefAtom)
Package-private setter for angle2 reference atom (used for cloning).
boolean equals(Object o)
Get the string representation of the atom.
Double getBondLength()
Get the bond length.
void setAngleRefAtom(ZMatrixAtom angleRefAtom)
Package-private setter for angle reference atom (used for cloning).
Double getAngleValue()
Get the angle value.
ZMatrixAtom getAngleRefAtom()
Get the angle reference atom.