Tabnine Logo
org.openscience.cdk
Code IndexAdd Tabnine to your IDE (free)

How to use org.openscience.cdk

Best Java code snippets using org.openscience.cdk (Showing top 20 results out of 882)

origin: org.openscience.cdk/cdk-data

@Override
public Object clone() throws CloneNotSupportedException {
  ChemSequence clone = (ChemSequence) super.clone();
  // clone the chemModels
  clone.chemModelCount = getChemModelCount();
  clone.chemModels = new ChemModel[clone.chemModelCount];
  for (int f = 0; f < clone.chemModelCount; f++) {
    clone.chemModels[f] = (ChemModel) ((ChemModel) chemModels[f]).clone();
  }
  return clone;
}
origin: org.openscience.cdk/cdk-legacy

@Override
public void startDocument() {
  chemFile = new ChemFile();
  chemSequence = new ChemSequence();
  chemModel = new ChemModel();
  setOfMolecules = new AtomContainerSet();
}
origin: org.openscience.cdk/cdk-core

/**
 * Access a set of candidates for a given key. Candidates match the
 * interface an number of parameters for the constructors. A key may
 * match when it's parameters are subclasses.
 *
 * @param key the key to find possible candidates for
 * @return set of constructors which 'could' match the given key
 */
public Set<ConstructorKey> getCandidates(ConstructorKey key) {
  return getCandidates(key.intf(), key.n());
}
origin: cdk/cdk

  /**
   * {@inheritDoc}
   */
  @Override
  public IAtomContainer newAtomContainer() {
    if (CDK_LEGACY_AC)
      return new AtomContainer();
    else
      return new AtomContainer2();
  }
}
origin: cdk/cdk

  @Override
  public IChemObject newTestObject() {
    return new Mapping(new Atom(), new Atom());
  }
});
origin: cdk/cdk

@Override
public IAtom getAtom(int idx) {
  switch (idx) {
    case 0:
      return getBegin();
    case 1:
      return getEnd();
    default:
      return mol.getAtomRef(super.getAtom(idx));
  }
}
origin: org.openscience.cdk/cdk-core

/**
 *{@inheritDoc}
 */
@Override
public T create(Object[] objects) throws InvocationTargetException, IllegalAccessException,
    InstantiationException {
  T instance = parent.create(objects);
  modifier.modify(instance);
  return instance;
}
origin: org.openscience.cdk/cdk-data

/**
 * {@inheritDoc}
 */
@Override
public int indexOf(IAtom atom) {
  final AtomRef aref = getAtomRefUnsafe(atom);
  return aref == null ? -1 : aref.getIndex();
}
origin: org.openscience.cdk/cdk-data

/**
 * {@inheritDoc}
 */
@Override
public IBond getBond(IAtom beg, IAtom end) {
  final AtomRef begref = getAtomRefUnsafe(beg);
  return begref != null ? begref.getBond(end) : null;
}
origin: org.openscience.cdk/cdk-data

/**
 * {@inheritDoc}
 */
@Override
public int indexOf(IBond bond) {
  final BondRef bref = getBondRefUnsafe(bond);
  return bref == null ? -1 : bref.getIndex();
}
origin: org.openscience.cdk/cdk-data

/**
 * Add an Atom and makes it the C-terminus atom.
 *
 * @param atom  The Atom that is the C-terminus
 *
 * @see    #getCTerminus
 */
@Override
public void addCTerminus(IAtom atom) {
  super.addAtom(atom);
  setCTerminus(atom);
}
origin: org.openscience.cdk/cdk-data

/**
 * {@inheritDoc}
 */
@Override
public int getConnectedBondsCount(IAtom atom) {
  return getAtomRef(atom).getBondCount();
}
origin: org.openscience.cdk/cdk-core

/**
 * Creates a constructor key for use in accessing constructors. The key
 * combines the interface and types in a single instance which we can then
 * use in a map.
 *
 * @param intf  the interface to build the key for
 * @param types the classes that the the constructor requires
 * @return a constructor key which can be used to lookup a constructor
 */
public static ConstructorKey key(Class<?> intf, Class<?>... types) {
  return new ClassBasedKey(intf, convert(types));
}
origin: org.openscience.cdk/cdk-data

  /**
   * {@inheritDoc}
   */
  @Override
  public IAtomContainer newAtomContainer() {
    if (CDK_LEGACY_AC)
      return new AtomContainer();
    else
      return new AtomContainer2();
  }
}
origin: cdk/cdk

@Override
public Object clone() throws CloneNotSupportedException {
  ChemSequence clone = (ChemSequence) super.clone();
  // clone the chemModels
  clone.chemModelCount = getChemModelCount();
  clone.chemModels = new ChemModel[clone.chemModelCount];
  for (int f = 0; f < clone.chemModelCount; f++) {
    clone.chemModels[f] = (ChemModel) ((ChemModel) chemModels[f]).clone();
  }
  return clone;
}
origin: org.openscience.cdk/cdk-data

@Override
public IAtom getAtom(int idx) {
  switch (idx) {
    case 0:
      return getBegin();
    case 1:
      return getEnd();
    default:
      return mol.getAtomRef(super.getAtom(idx));
  }
}
origin: cdk/cdk

/**
 *{@inheritDoc}
 */
@Override
public T create(Object[] objects) throws InvocationTargetException, IllegalAccessException,
    InstantiationException {
  T instance = parent.create(objects);
  modifier.modify(instance);
  return instance;
}
origin: cdk/cdk

/**
 * {@inheritDoc}
 */
@Override
public int indexOf(IAtom atom) {
  final AtomRef aref = getAtomRefUnsafe(atom);
  return aref == null ? -1 : aref.getIndex();
}
origin: cdk/cdk

/**
 * {@inheritDoc}
 */
@Override
public IBond getBond(IAtom beg, IAtom end) {
  final AtomRef begref = getAtomRefUnsafe(beg);
  return begref != null ? begref.getBond(end) : null;
}
origin: cdk/cdk

/**
 * {@inheritDoc}
 */
@Override
public int getConnectedBondsCount(IAtom atom) {
  return getAtomRef(atom).getBondCount();
}
org.openscience.cdk

Most used classes

  • IAtomContainer
  • IAtom
  • IBond
    Implements the concept of a covalent bond between two or more atoms. A bond is considered to be a nu
  • IChemObjectBuilder
    A helper class to instantiate a ICDKObject instance for a specific implementation.
  • ILoggingTool
    Useful for logging messages. Often used as a class static variable instantiated like (see LoggingToo
  • IAtomContainerSet,
  • AtomContainerManipulator,
  • DefaultChemObjectBuilder,
  • AtomContainer,
  • SilentChemObjectBuilder,
  • SmilesParser,
  • IIsotope,
  • IAtomType,
  • IChemModel,
  • IReaction,
  • IRingSet,
  • Atom,
  • IBond$Order,
  • ChemFile
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now