コード例 #1
0
  /**
   * Creates a new DBMolecule that is an exact copy of the given instance including the same id.
   *
   * @param dBMolecule
   */
  public DBMolecule(DBMolecule dBMolecule) {

    super(dBMolecule);

    setAtomContainer(dBMolecule.getMolecule());
    fingerPrint = (BitSet) dBMolecule.getFingerPrint().clone();
    persistedFingerPrint = makePersistedFingerPrint(fingerPrint);
    smiles = dBMolecule.toSMILES();
    annotations = new ArrayList<Annotation>(dBMolecule.getAnnotations());
  }
コード例 #2
0
  public boolean hasValuesEqualTo(BaseObject object) {

    if (!super.hasValuesEqualTo(object)) {
      return false;
    }
    if (!(object instanceof DBMolecule)) {
      return false;
    }

    DBMolecule dBMolecule = (DBMolecule) object;

    try {
      return fingerPrint.equals(dBMolecule.getFingerPrint())
          && getInChIKey(Property.USE_CALCULATED)
              .equals(dBMolecule.getInChIKey(Property.USE_CALCULATED));
    } catch (BioclipseException e) {
      throw new RuntimeException(e);
    }
  }