id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
114,100
cdk/cdk
tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94BasedParameterSetReader.java
MMFF94BasedParameterSetReader.setTorsion
private void setTorsion() throws Exception { List data = null; st.nextToken(); String scode = st.nextToken(); // String scode String sid1 = st.nextToken(); String sid2 = st.nextToken(); String sid3 = st.nextToken(); String sid4 = st.nextToken(); String val...
java
private void setTorsion() throws Exception { List data = null; st.nextToken(); String scode = st.nextToken(); // String scode String sid1 = st.nextToken(); String sid2 = st.nextToken(); String sid3 = st.nextToken(); String sid4 = st.nextToken(); String val...
[ "private", "void", "setTorsion", "(", ")", "throws", "Exception", "{", "List", "data", "=", "null", ";", "st", ".", "nextToken", "(", ")", ";", "String", "scode", "=", "st", ".", "nextToken", "(", ")", ";", "// String scode", "String", "sid1", "=", "st...
Sets the torsion attribute stored into the parameter set @throws Exception Description of the Exception
[ "Sets", "the", "torsion", "attribute", "stored", "into", "the", "parameter", "set" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94BasedParameterSetReader.java#L335-L381
114,101
cdk/cdk
tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94BasedParameterSetReader.java
MMFF94BasedParameterSetReader.setDefaultStrBnd
private void setDefaultStrBnd() throws Exception { LOG.debug("Sets the Default Stretch-Bend Parameters"); List data = new Vector(); stDFSB.nextToken(); String sIR = stDFSB.nextToken(); String sJR = stDFSB.nextToken(); String sKR = stDFSB.nextToken(); String skbaIJ...
java
private void setDefaultStrBnd() throws Exception { LOG.debug("Sets the Default Stretch-Bend Parameters"); List data = new Vector(); stDFSB.nextToken(); String sIR = stDFSB.nextToken(); String sJR = stDFSB.nextToken(); String sKR = stDFSB.nextToken(); String skbaIJ...
[ "private", "void", "setDefaultStrBnd", "(", ")", "throws", "Exception", "{", "LOG", ".", "debug", "(", "\"Sets the Default Stretch-Bend Parameters\"", ")", ";", "List", "data", "=", "new", "Vector", "(", ")", ";", "stDFSB", ".", "nextToken", "(", ")", ";", "...
Sets the Default Stretch-Bend Parameters into the parameter set @throws Exception Description of the Exception
[ "Sets", "the", "Default", "Stretch", "-", "Bend", "Parameters", "into", "the", "parameter", "set" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94BasedParameterSetReader.java#L417-L438
114,102
cdk/cdk
base/core/src/main/java/org/openscience/cdk/ringsearch/RingSearch.java
RingSearch.cyclic
public boolean cyclic(IBond bond) { // XXX: linear search - but okay for now int u = container.indexOf(bond.getBegin()); int v = container.indexOf(bond.getEnd()); if (u < 0 || v < 0) throw new NoSuchElementException("atoms of the bond are not found in the container"); return sear...
java
public boolean cyclic(IBond bond) { // XXX: linear search - but okay for now int u = container.indexOf(bond.getBegin()); int v = container.indexOf(bond.getEnd()); if (u < 0 || v < 0) throw new NoSuchElementException("atoms of the bond are not found in the container"); return sear...
[ "public", "boolean", "cyclic", "(", "IBond", "bond", ")", "{", "// XXX: linear search - but okay for now", "int", "u", "=", "container", ".", "indexOf", "(", "bond", ".", "getBegin", "(", ")", ")", ";", "int", "v", "=", "container", ".", "indexOf", "(", "b...
Determine whether the bond is cyclic. Note this currently requires a linear search to look-up the indices of each atoms. @param bond a bond of the container @return whether the vertex at the given index is in a cycle
[ "Determine", "whether", "the", "bond", "is", "cyclic", ".", "Note", "this", "currently", "requires", "a", "linear", "search", "to", "look", "-", "up", "the", "indices", "of", "each", "atoms", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/ringsearch/RingSearch.java#L236-L242
114,103
cdk/cdk
base/core/src/main/java/org/openscience/cdk/ringsearch/RingSearch.java
RingSearch.toFragment
private IAtomContainer toFragment(int[] vertices) { int n = vertices.length; Set<IAtom> atoms = new HashSet<IAtom>(n > 3 ? n + 1 + n / 3 : n); List<IBond> bonds = new ArrayList<IBond>(); // fill the atom set for (int v : vertices) { atoms.add(container.getAtom(v));...
java
private IAtomContainer toFragment(int[] vertices) { int n = vertices.length; Set<IAtom> atoms = new HashSet<IAtom>(n > 3 ? n + 1 + n / 3 : n); List<IBond> bonds = new ArrayList<IBond>(); // fill the atom set for (int v : vertices) { atoms.add(container.getAtom(v));...
[ "private", "IAtomContainer", "toFragment", "(", "int", "[", "]", "vertices", ")", "{", "int", "n", "=", "vertices", ".", "length", ";", "Set", "<", "IAtom", ">", "atoms", "=", "new", "HashSet", "<", "IAtom", ">", "(", "n", ">", "3", "?", "n", "+", ...
Utility method for creating a fragment from an array of vertices @param vertices array of vertices length=cycle weight, values 0 ... nAtoms @return atom container only containing the specified atoms (and bonds)
[ "Utility", "method", "for", "creating", "a", "fragment", "from", "an", "array", "of", "vertices" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/ringsearch/RingSearch.java#L428-L455
114,104
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/RotatableBondsCountDescriptor.java
RotatableBondsCountDescriptor.setParameters
@Override public void setParameters(Object[] params) throws CDKException { if (params.length != 2) { throw new CDKException("RotatableBondsCount expects two parameters"); } if (!(params[0] instanceof Boolean) || !(params[1] instanceof Boolean)) { throw new CDKExceptio...
java
@Override public void setParameters(Object[] params) throws CDKException { if (params.length != 2) { throw new CDKException("RotatableBondsCount expects two parameters"); } if (!(params[0] instanceof Boolean) || !(params[1] instanceof Boolean)) { throw new CDKExceptio...
[ "@", "Override", "public", "void", "setParameters", "(", "Object", "[", "]", "params", ")", "throws", "CDKException", "{", "if", "(", "params", ".", "length", "!=", "2", ")", "{", "throw", "new", "CDKException", "(", "\"RotatableBondsCount expects two parameters...
Sets the parameters attribute of the RotatableBondsCountDescriptor object @param params a boolean true means that terminal atoms must be included in the count @exception CDKException Description of the Exception
[ "Sets", "the", "parameters", "attribute", "of", "the", "RotatableBondsCountDescriptor", "object" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/RotatableBondsCountDescriptor.java#L102-L113
114,105
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/RotatableBondsCountDescriptor.java
RotatableBondsCountDescriptor.getParameters
@Override public Object[] getParameters() { // return the parameters as used for the descriptor calculation Object[] params = new Object[2]; params[0] = includeTerminals; params[1] = excludeAmides; return params; }
java
@Override public Object[] getParameters() { // return the parameters as used for the descriptor calculation Object[] params = new Object[2]; params[0] = includeTerminals; params[1] = excludeAmides; return params; }
[ "@", "Override", "public", "Object", "[", "]", "getParameters", "(", ")", "{", "// return the parameters as used for the descriptor calculation", "Object", "[", "]", "params", "=", "new", "Object", "[", "2", "]", ";", "params", "[", "0", "]", "=", "includeTermin...
Gets the parameters attribute of the RotatableBondsCountDescriptor object @return The parameters value
[ "Gets", "the", "parameters", "attribute", "of", "the", "RotatableBondsCountDescriptor", "object" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/RotatableBondsCountDescriptor.java#L120-L127
114,106
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/RotatableBondsCountDescriptor.java
RotatableBondsCountDescriptor.calculate
@Override public DescriptorValue calculate(IAtomContainer ac) { ac = clone(ac); // don't mod original int rotatableBondsCount = 0; int degree0; int degree1; IRingSet ringSet; try { ringSet = new SpanningTree(ac).getBasicRings(); } catch (NoSuchAtom...
java
@Override public DescriptorValue calculate(IAtomContainer ac) { ac = clone(ac); // don't mod original int rotatableBondsCount = 0; int degree0; int degree1; IRingSet ringSet; try { ringSet = new SpanningTree(ac).getBasicRings(); } catch (NoSuchAtom...
[ "@", "Override", "public", "DescriptorValue", "calculate", "(", "IAtomContainer", "ac", ")", "{", "ac", "=", "clone", "(", "ac", ")", ";", "// don't mod original", "int", "rotatableBondsCount", "=", "0", ";", "int", "degree0", ";", "int", "degree1", ";", "IR...
The method calculates the number of rotatable bonds of an atom container. If the boolean parameter is set to true, terminal bonds are included. @param ac AtomContainer @return number of rotatable bonds
[ "The", "method", "calculates", "the", "number", "of", "rotatable", "bonds", "of", "an", "atom", "container", ".", "If", "the", "boolean", "parameter", "is", "set", "to", "true", "terminal", "bonds", "are", "included", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/RotatableBondsCountDescriptor.java#L141-L189
114,107
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java
FixBondOrdersTool.assignRingGroups
private List<List<Integer>> assignRingGroups(List<Integer[]> rBondsArray) { List<List<Integer>> ringGroups; ringGroups = new ArrayList<List<Integer>>(); for (int i = 0; i < rBondsArray.size() - 1; i++) { //for each ring except the last in rBondsArray for (int j = 0; j < rBondsArray.g...
java
private List<List<Integer>> assignRingGroups(List<Integer[]> rBondsArray) { List<List<Integer>> ringGroups; ringGroups = new ArrayList<List<Integer>>(); for (int i = 0; i < rBondsArray.size() - 1; i++) { //for each ring except the last in rBondsArray for (int j = 0; j < rBondsArray.g...
[ "private", "List", "<", "List", "<", "Integer", ">", ">", "assignRingGroups", "(", "List", "<", "Integer", "[", "]", ">", "rBondsArray", ")", "{", "List", "<", "List", "<", "Integer", ">>", "ringGroups", ";", "ringGroups", "=", "new", "ArrayList", "<", ...
Assigns a set of rings to groups each sharing a bond. @param rBondsArray @return A List of Lists each containing the ring indices of a set of fused rings
[ "Assigns", "a", "set", "of", "rings", "to", "groups", "each", "sharing", "a", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java#L291-L330
114,108
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java
FixBondOrdersTool.getAtomNosForRingGroup
private List<Integer> getAtomNosForRingGroup(IAtomContainer molecule, List<Integer> ringGroup, IRingSet ringSet) { List<Integer> atc = new ArrayList<Integer>(); for (Integer i : ringGroup) { for (IAtom atom : ringSet.getAtomContainer(i).atoms()) { if (atc.size() > 0) { ...
java
private List<Integer> getAtomNosForRingGroup(IAtomContainer molecule, List<Integer> ringGroup, IRingSet ringSet) { List<Integer> atc = new ArrayList<Integer>(); for (Integer i : ringGroup) { for (IAtom atom : ringSet.getAtomContainer(i).atoms()) { if (atc.size() > 0) { ...
[ "private", "List", "<", "Integer", ">", "getAtomNosForRingGroup", "(", "IAtomContainer", "molecule", ",", "List", "<", "Integer", ">", "ringGroup", ",", "IRingSet", "ringSet", ")", "{", "List", "<", "Integer", ">", "atc", "=", "new", "ArrayList", "<", "Integ...
Gets the List of atom nos corresponding to a particular set of fused rings. @param {@link IAtomContainer} molecule @param ringGroup @param {@link IRingSet} ringSet @return List of atom numbers for each set
[ "Gets", "the", "List", "of", "atom", "nos", "corresponding", "to", "a", "particular", "set", "of", "fused", "rings", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java#L378-L392
114,109
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java
FixBondOrdersTool.getBondNosForRingGroup
private List<Integer> getBondNosForRingGroup(IAtomContainer molecule, List<Integer> ringGroup, IRingSet ringSet) { List<Integer> btc = new ArrayList<Integer>(); for (Integer i : ringGroup) { for (IBond bond : ringSet.getAtomContainer(i).bonds()) { if (btc.size() > 0) { ...
java
private List<Integer> getBondNosForRingGroup(IAtomContainer molecule, List<Integer> ringGroup, IRingSet ringSet) { List<Integer> btc = new ArrayList<Integer>(); for (Integer i : ringGroup) { for (IBond bond : ringSet.getAtomContainer(i).bonds()) { if (btc.size() > 0) { ...
[ "private", "List", "<", "Integer", ">", "getBondNosForRingGroup", "(", "IAtomContainer", "molecule", ",", "List", "<", "Integer", ">", "ringGroup", ",", "IRingSet", "ringSet", ")", "{", "List", "<", "Integer", ">", "btc", "=", "new", "ArrayList", "<", "Integ...
Gets the List of bond nos corresponding to a particular set of fused rings. @param {@link IAtomContainer} molecule @param ringGroup @param {@link IRingSet} ringSet @return List of bond numbers for each set
[ "Gets", "the", "List", "of", "bond", "nos", "corresponding", "to", "a", "particular", "set", "of", "fused", "rings", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java#L402-L416
114,110
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java
FixBondOrdersTool.getAtomNoPairsForRingGroup
private List<Integer[]> getAtomNoPairsForRingGroup(IAtomContainer molecule, List<Integer> bondsToCheck) { List<Integer[]> aptc = new ArrayList<Integer[]>(); for (Integer i : bondsToCheck) { Integer[] aps = new Integer[2]; aps[0] = molecule.indexOf(molecule.getBond(i).getBegin());...
java
private List<Integer[]> getAtomNoPairsForRingGroup(IAtomContainer molecule, List<Integer> bondsToCheck) { List<Integer[]> aptc = new ArrayList<Integer[]>(); for (Integer i : bondsToCheck) { Integer[] aps = new Integer[2]; aps[0] = molecule.indexOf(molecule.getBond(i).getBegin());...
[ "private", "List", "<", "Integer", "[", "]", ">", "getAtomNoPairsForRingGroup", "(", "IAtomContainer", "molecule", ",", "List", "<", "Integer", ">", "bondsToCheck", ")", "{", "List", "<", "Integer", "[", "]", ">", "aptc", "=", "new", "ArrayList", "<", "Int...
Gets List of atom number pairs for each bond in a list of bonds for the molecule. @param {@link IAtomContainer} molecule @param bondsToCheck @return List of atom pairs
[ "Gets", "List", "of", "atom", "number", "pairs", "for", "each", "bond", "in", "a", "list", "of", "bonds", "for", "the", "molecule", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java#L425-L434
114,111
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java
FixBondOrdersTool.getFreeValenciesForRingGroup
private List<Integer> getFreeValenciesForRingGroup(IAtomContainer molecule, List<Integer> atomsToCheck, Matrix M, IRingSet rs) { List<Integer> fvtc = new ArrayList<Integer>(); for (int i = 0; i < atomsToCheck.size(); i++) { int j = atomsToCheck.get(i); //Put in an im...
java
private List<Integer> getFreeValenciesForRingGroup(IAtomContainer molecule, List<Integer> atomsToCheck, Matrix M, IRingSet rs) { List<Integer> fvtc = new ArrayList<Integer>(); for (int i = 0; i < atomsToCheck.size(); i++) { int j = atomsToCheck.get(i); //Put in an im...
[ "private", "List", "<", "Integer", ">", "getFreeValenciesForRingGroup", "(", "IAtomContainer", "molecule", ",", "List", "<", "Integer", ">", "atomsToCheck", ",", "Matrix", "M", ",", "IRingSet", "rs", ")", "{", "List", "<", "Integer", ">", "fvtc", "=", "new",...
Function to set up an array of integers corresponding to indicate how many free valencies need fulfilling for each atom through ring bonds. @param {@link IAtomContainer} molecule @param atomsToCheck @param M @return The List of free valencies available for extra ring bonding
[ "Function", "to", "set", "up", "an", "array", "of", "integers", "corresponding", "to", "indicate", "how", "many", "free", "valencies", "need", "fulfilling", "for", "each", "atom", "through", "ring", "bonds", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smiles/FixBondOrdersTool.java#L444-L481
114,112
cdk/cdk
base/data/src/main/java/org/openscience/cdk/ChemSequence.java
ChemSequence.chemModels
@Override public Iterable<IChemModel> chemModels() { return new Iterable<IChemModel>() { @Override public Iterator<IChemModel> iterator() { return new ChemModelIterator(); } }; }
java
@Override public Iterable<IChemModel> chemModels() { return new Iterable<IChemModel>() { @Override public Iterator<IChemModel> iterator() { return new ChemModelIterator(); } }; }
[ "@", "Override", "public", "Iterable", "<", "IChemModel", ">", "chemModels", "(", ")", "{", "return", "new", "Iterable", "<", "IChemModel", ">", "(", ")", "{", "@", "Override", "public", "Iterator", "<", "IChemModel", ">", "iterator", "(", ")", "{", "ret...
Returns an Iterable to ChemModels in this container. @return The Iterable to ChemModels in this container @see #addChemModel
[ "Returns", "an", "Iterable", "to", "ChemModels", "in", "this", "container", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ChemSequence.java#L117-L126
114,113
cdk/cdk
base/data/src/main/java/org/openscience/cdk/ChemSequence.java
ChemSequence.growChemModelArray
protected void growChemModelArray() { ChemModel[] newchemModels = new ChemModel[chemModels.length + growArraySize]; System.arraycopy(chemModels, 0, newchemModels, 0, chemModels.length); chemModels = newchemModels; }
java
protected void growChemModelArray() { ChemModel[] newchemModels = new ChemModel[chemModels.length + growArraySize]; System.arraycopy(chemModels, 0, newchemModels, 0, chemModels.length); chemModels = newchemModels; }
[ "protected", "void", "growChemModelArray", "(", ")", "{", "ChemModel", "[", "]", "newchemModels", "=", "new", "ChemModel", "[", "chemModels", ".", "length", "+", "growArraySize", "]", ";", "System", ".", "arraycopy", "(", "chemModels", ",", "0", ",", "newche...
Grows the chemModel array by a given size. @see growArraySize
[ "Grows", "the", "chemModel", "array", "by", "a", "given", "size", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ChemSequence.java#L173-L177
114,114
cdk/cdk
tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java
GeometricCumulativeDoubleBondFactory.create
@Override public StereoEncoder create(IAtomContainer container, int[][] graph) { int n = container.getAtomCount(); BondMap map = new BondMap(n); List<StereoEncoder> encoders = new ArrayList<StereoEncoder>(1); // index double bonds by their atoms for (IBond bond : container...
java
@Override public StereoEncoder create(IAtomContainer container, int[][] graph) { int n = container.getAtomCount(); BondMap map = new BondMap(n); List<StereoEncoder> encoders = new ArrayList<StereoEncoder>(1); // index double bonds by their atoms for (IBond bond : container...
[ "@", "Override", "public", "StereoEncoder", "create", "(", "IAtomContainer", "container", ",", "int", "[", "]", "[", "]", "graph", ")", "{", "int", "n", "=", "container", ".", "getAtomCount", "(", ")", ";", "BondMap", "map", "=", "new", "BondMap", "(", ...
Create a stereo encoder for cumulative double bonds. @param container the container @param graph adjacency list representation of the container @return a stereo encoder
[ "Create", "a", "stereo", "encoder", "for", "cumulative", "double", "bonds", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java#L55-L133
114,115
cdk/cdk
tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java
GeometricCumulativeDoubleBondFactory.axial3DEncoder
private static StereoEncoder axial3DEncoder(IAtomContainer container, IAtom start, List<IBond> startBonds, IAtom end, List<IBond> endBonds) { Point3d[] coordinates = new Point3d[4]; PermutationParity perm = new CombinedPermutationParity(fill3DCoordinates(container, start, startBonds, ...
java
private static StereoEncoder axial3DEncoder(IAtomContainer container, IAtom start, List<IBond> startBonds, IAtom end, List<IBond> endBonds) { Point3d[] coordinates = new Point3d[4]; PermutationParity perm = new CombinedPermutationParity(fill3DCoordinates(container, start, startBonds, ...
[ "private", "static", "StereoEncoder", "axial3DEncoder", "(", "IAtomContainer", "container", ",", "IAtom", "start", ",", "List", "<", "IBond", ">", "startBonds", ",", "IAtom", "end", ",", "List", "<", "IBond", ">", "endBonds", ")", "{", "Point3d", "[", "]", ...
Create an encoder for axial 3D stereochemistry for the given start and end atoms. @param container the molecule @param start start of the cumulated system @param startBonds bonds connected to the start @param end end of the cumulated system @param endBonds bonds connected to the end @return an encoder
[ "Create", "an", "encoder", "for", "axial", "3D", "stereochemistry", "for", "the", "given", "start", "and", "end", "atoms", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java#L199-L213
114,116
cdk/cdk
tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java
GeometricCumulativeDoubleBondFactory.has2DCoordinates
private static boolean has2DCoordinates(List<IBond> bonds) { for (IBond bond : bonds) { if (bond.getBegin().getPoint2d() == null || bond.getEnd().getPoint2d() == null) return false; } return true; }
java
private static boolean has2DCoordinates(List<IBond> bonds) { for (IBond bond : bonds) { if (bond.getBegin().getPoint2d() == null || bond.getEnd().getPoint2d() == null) return false; } return true; }
[ "private", "static", "boolean", "has2DCoordinates", "(", "List", "<", "IBond", ">", "bonds", ")", "{", "for", "(", "IBond", "bond", ":", "bonds", ")", "{", "if", "(", "bond", ".", "getBegin", "(", ")", ".", "getPoint2d", "(", ")", "==", "null", "||",...
Check if all atoms in the bond list have 2D coordinates. There is some redundant checking but the list will typically be short. @param bonds the bonds to check @return whether all atoms have 2D coordinates
[ "Check", "if", "all", "atoms", "in", "the", "bond", "list", "have", "2D", "coordinates", ".", "There", "is", "some", "redundant", "checking", "but", "the", "list", "will", "typically", "be", "short", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java#L299-L304
114,117
cdk/cdk
tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java
GeometricCumulativeDoubleBondFactory.has3DCoordinates
private static boolean has3DCoordinates(List<IBond> bonds) { for (IBond bond : bonds) { if (bond.getBegin().getPoint3d() == null || bond.getEnd().getPoint3d() == null) return false; } return true; }
java
private static boolean has3DCoordinates(List<IBond> bonds) { for (IBond bond : bonds) { if (bond.getBegin().getPoint3d() == null || bond.getEnd().getPoint3d() == null) return false; } return true; }
[ "private", "static", "boolean", "has3DCoordinates", "(", "List", "<", "IBond", ">", "bonds", ")", "{", "for", "(", "IBond", "bond", ":", "bonds", ")", "{", "if", "(", "bond", ".", "getBegin", "(", ")", ".", "getPoint3d", "(", ")", "==", "null", "||",...
Check if all atoms in the bond list have 3D coordinates. There is some redundant checking but the list will typically be short. @param bonds the bonds to check @return whether all atoms have 2D coordinates
[ "Check", "if", "all", "atoms", "in", "the", "bond", "list", "have", "3D", "coordinates", ".", "There", "is", "some", "redundant", "checking", "but", "the", "list", "will", "typically", "be", "short", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java#L313-L318
114,118
cdk/cdk
tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java
GeometricCumulativeDoubleBondFactory.elevation
static int elevation(IBond bond) { IBond.Stereo stereo = bond.getStereo(); if (stereo == null) return 0; switch (stereo) { case UP: case DOWN_INVERTED: return +1; case DOWN: case UP_INVERTED: return -1; d...
java
static int elevation(IBond bond) { IBond.Stereo stereo = bond.getStereo(); if (stereo == null) return 0; switch (stereo) { case UP: case DOWN_INVERTED: return +1; case DOWN: case UP_INVERTED: return -1; d...
[ "static", "int", "elevation", "(", "IBond", "bond", ")", "{", "IBond", ".", "Stereo", "stereo", "=", "bond", ".", "getStereo", "(", ")", ";", "if", "(", "stereo", "==", "null", ")", "return", "0", ";", "switch", "(", "stereo", ")", "{", "case", "UP...
Access the elevation of a bond. @param bond the bond @return +1 above the plane, 0 in the plane (default) or -1 below the plane
[ "Access", "the", "elevation", "of", "a", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricCumulativeDoubleBondFactory.java#L341-L354
114,119
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/single/SingleMapping.java
SingleMapping.getOverLaps
protected List<Map<IAtom, IAtom>> getOverLaps(IAtomContainer source, IAtomContainer target, boolean removeHydrogen) throws CDKException { mappings = new ArrayList<Map<IAtom, IAtom>>(); connectedBondOrder = new TreeMap<Integer, Double>(); this.source = source; this.target = t...
java
protected List<Map<IAtom, IAtom>> getOverLaps(IAtomContainer source, IAtomContainer target, boolean removeHydrogen) throws CDKException { mappings = new ArrayList<Map<IAtom, IAtom>>(); connectedBondOrder = new TreeMap<Integer, Double>(); this.source = source; this.target = t...
[ "protected", "List", "<", "Map", "<", "IAtom", ",", "IAtom", ">", ">", "getOverLaps", "(", "IAtomContainer", "source", ",", "IAtomContainer", "target", ",", "boolean", "removeHydrogen", ")", "throws", "CDKException", "{", "mappings", "=", "new", "ArrayList", "...
Returns single mapping solutions. @param source @param target @param removeHydrogen @return Mappings @throws CDKException
[ "Returns", "single", "mapping", "solutions", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/single/SingleMapping.java#L75-L92
114,120
cdk/cdk
tool/fragment/src/main/java/org/openscience/cdk/fragment/MurckoFragmenter.java
MurckoFragmenter.generateFragments
@Override public void generateFragments(IAtomContainer atomContainer) throws CDKException { Set<Long> fragmentSet = new HashSet<Long>(); frameMap.clear(); ringMap.clear(); run(atomContainer, fragmentSet); }
java
@Override public void generateFragments(IAtomContainer atomContainer) throws CDKException { Set<Long> fragmentSet = new HashSet<Long>(); frameMap.clear(); ringMap.clear(); run(atomContainer, fragmentSet); }
[ "@", "Override", "public", "void", "generateFragments", "(", "IAtomContainer", "atomContainer", ")", "throws", "CDKException", "{", "Set", "<", "Long", ">", "fragmentSet", "=", "new", "HashSet", "<", "Long", ">", "(", ")", ";", "frameMap", ".", "clear", "(",...
Perform the fragmentation procedure. @param atomContainer The input molecule @throws CDKException
[ "Perform", "the", "fragmentation", "procedure", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/fragment/src/main/java/org/openscience/cdk/fragment/MurckoFragmenter.java#L148-L154
114,121
cdk/cdk
tool/fragment/src/main/java/org/openscience/cdk/fragment/MurckoFragmenter.java
MurckoFragmenter.getFragments
@Override public String[] getFragments() { List<String> allfrags = new ArrayList<String>(); allfrags.addAll(getSmilesFromAtomContainers(frameMap.values())); allfrags.addAll(getSmilesFromAtomContainers(ringMap.values())); return allfrags.toArray(new String[]{}); }
java
@Override public String[] getFragments() { List<String> allfrags = new ArrayList<String>(); allfrags.addAll(getSmilesFromAtomContainers(frameMap.values())); allfrags.addAll(getSmilesFromAtomContainers(ringMap.values())); return allfrags.toArray(new String[]{}); }
[ "@", "Override", "public", "String", "[", "]", "getFragments", "(", ")", "{", "List", "<", "String", ">", "allfrags", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "allfrags", ".", "addAll", "(", "getSmilesFromAtomContainers", "(", "frameMap"...
This returns the frameworks and ring systems from a Murcko fragmentation. To get frameworks, ring systems and side chains seperately, use the respective functions @return a String[] of the fragments. @see #getRingSystems() @see #getRingSystemsAsContainers() @see #getFrameworks() @see #getFrameworksAsContainers()
[ "This", "returns", "the", "frameworks", "and", "ring", "systems", "from", "a", "Murcko", "fragmentation", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/fragment/src/main/java/org/openscience/cdk/fragment/MurckoFragmenter.java#L453-L459
114,122
cdk/cdk
base/core/src/main/java/org/openscience/cdk/graph/EdgeShortCycles.java
EdgeShortCycles.paths
int[][] paths() { int[][] paths = new int[this.paths.size()][0]; for (int i = 0; i < this.paths.size(); i++) { paths[i] = this.paths.get(i); } return paths; }
java
int[][] paths() { int[][] paths = new int[this.paths.size()][0]; for (int i = 0; i < this.paths.size(); i++) { paths[i] = this.paths.get(i); } return paths; }
[ "int", "[", "]", "[", "]", "paths", "(", ")", "{", "int", "[", "]", "[", "]", "paths", "=", "new", "int", "[", "this", ".", "paths", ".", "size", "(", ")", "]", "[", "0", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this"...
The paths of the shortest cycles, that paths are closed walks such that the first and last vertex is the same. @return the paths
[ "The", "paths", "of", "the", "shortest", "cycles", "that", "paths", "are", "closed", "walks", "such", "that", "the", "first", "and", "last", "vertex", "is", "the", "same", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/EdgeShortCycles.java#L88-L94
114,123
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java
CDKRGraph.addNode
public void addNode(CDKRNode newNode) { getGraph().add(newNode); getGraphBitSet().set(getGraph().size() - 1); }
java
public void addNode(CDKRNode newNode) { getGraph().add(newNode); getGraphBitSet().set(getGraph().size() - 1); }
[ "public", "void", "addNode", "(", "CDKRNode", "newNode", ")", "{", "getGraph", "(", ")", ".", "add", "(", "newNode", ")", ";", "getGraphBitSet", "(", ")", ".", "set", "(", "getGraph", "(", ")", ".", "size", "(", ")", "-", "1", ")", ";", "}" ]
Adds a new node to the CDKRGraph. @param newNode The node to add to the graph
[ "Adds", "a", "new", "node", "to", "the", "CDKRGraph", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java#L205-L208
114,124
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java
CDKRGraph.parseRec
private void parseRec(BitSet traversed, BitSet extension, BitSet forbidden) throws CDKException { BitSet newTraversed = null; BitSet newExtension = null; BitSet newForbidden = null; BitSet potentialNode = null; checkTimeOut(); // if there is no more extension possible w...
java
private void parseRec(BitSet traversed, BitSet extension, BitSet forbidden) throws CDKException { BitSet newTraversed = null; BitSet newExtension = null; BitSet newForbidden = null; BitSet potentialNode = null; checkTimeOut(); // if there is no more extension possible w...
[ "private", "void", "parseRec", "(", "BitSet", "traversed", ",", "BitSet", "extension", ",", "BitSet", "forbidden", ")", "throws", "CDKException", "{", "BitSet", "newTraversed", "=", "null", ";", "BitSet", "newExtension", "=", "null", ";", "BitSet", "newForbidden...
Parsing of the CDKRGraph. This is the recursive method to perform a query. The method will recursively parse the CDKRGraph thru connected nodes and visiting the CDKRGraph using allowed adjacency relationship. @param traversed node already parsed @param extension possible extension node (allowed neighbors) @param ...
[ "Parsing", "of", "the", "CDKRGraph", ".", "This", "is", "the", "recursive", "method", "to", "perform", "a", "query", ".", "The", "method", "will", "recursively", "parse", "the", "CDKRGraph", "thru", "connected", "nodes", "and", "visiting", "the", "CDKRGraph", ...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java#L255-L320
114,125
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java
CDKRGraph.buildB
private BitSet buildB(BitSet sourceBitSet, BitSet targetBitSet) throws CDKException { this.setSourceBitSet(sourceBitSet); this.setTargetBitSet(targetBitSet); BitSet bistSet = new BitSet(); // only nodes that fulfill the initial constrains // are allowed in the initial extension...
java
private BitSet buildB(BitSet sourceBitSet, BitSet targetBitSet) throws CDKException { this.setSourceBitSet(sourceBitSet); this.setTargetBitSet(targetBitSet); BitSet bistSet = new BitSet(); // only nodes that fulfill the initial constrains // are allowed in the initial extension...
[ "private", "BitSet", "buildB", "(", "BitSet", "sourceBitSet", ",", "BitSet", "targetBitSet", ")", "throws", "CDKException", "{", "this", ".", "setSourceBitSet", "(", "sourceBitSet", ")", ";", "this", ".", "setTargetBitSet", "(", "targetBitSet", ")", ";", "BitSet...
Builds the initial extension set. This is the set of node that may be used as seed for the CDKRGraph parsing. This set depends on the constrains defined by the user. @param sourceBitSet constraint in the graph G1 @param targetBitSet constraint in the graph G2 @return
[ "Builds", "the", "initial", "extension", "set", ".", "This", "is", "the", "set", "of", "node", "that", "may", "be", "used", "as", "seed", "for", "the", "CDKRGraph", "parsing", ".", "This", "set", "depends", "on", "the", "constrains", "defined", "by", "th...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java#L426-L445
114,126
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java
CDKRGraph.projectG1
public BitSet projectG1(BitSet set) { BitSet projection = new BitSet(getFirstGraphSize()); CDKRNode xNode = null; for (int x = set.nextSetBit(0); x >= 0; x = set.nextSetBit(x + 1)) { xNode = getGraph().get(x); projection.set(xNode.getRMap().getId1()); } r...
java
public BitSet projectG1(BitSet set) { BitSet projection = new BitSet(getFirstGraphSize()); CDKRNode xNode = null; for (int x = set.nextSetBit(0); x >= 0; x = set.nextSetBit(x + 1)) { xNode = getGraph().get(x); projection.set(xNode.getRMap().getId1()); } r...
[ "public", "BitSet", "projectG1", "(", "BitSet", "set", ")", "{", "BitSet", "projection", "=", "new", "BitSet", "(", "getFirstGraphSize", "(", ")", ")", ";", "CDKRNode", "xNode", "=", "null", ";", "for", "(", "int", "x", "=", "set", ".", "nextSetBit", "...
Projects a CDKRGraph bitset on the source graph G1. @param set CDKRGraph BitSet to project @return The associate BitSet in G1
[ "Projects", "a", "CDKRGraph", "bitset", "on", "the", "source", "graph", "G1", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java#L535-L544
114,127
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java
CDKRGraph.projectG2
public BitSet projectG2(BitSet set) { BitSet projection = new BitSet(getSecondGraphSize()); CDKRNode xNode = null; for (int x = set.nextSetBit(0); x >= 0; x = set.nextSetBit(x + 1)) { xNode = getGraph().get(x); projection.set(xNode.getRMap().getId2()); } ...
java
public BitSet projectG2(BitSet set) { BitSet projection = new BitSet(getSecondGraphSize()); CDKRNode xNode = null; for (int x = set.nextSetBit(0); x >= 0; x = set.nextSetBit(x + 1)) { xNode = getGraph().get(x); projection.set(xNode.getRMap().getId2()); } ...
[ "public", "BitSet", "projectG2", "(", "BitSet", "set", ")", "{", "BitSet", "projection", "=", "new", "BitSet", "(", "getSecondGraphSize", "(", ")", ")", ";", "CDKRNode", "xNode", "=", "null", ";", "for", "(", "int", "x", "=", "set", ".", "nextSetBit", ...
Projects a CDKRGraph bitset on the source graph G2. @param set CDKRGraph BitSet to project @return The associate BitSet in G2
[ "Projects", "a", "CDKRGraph", "bitset", "on", "the", "source", "graph", "G2", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java#L551-L560
114,128
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java
CDKRGraph.isContainedIn
private boolean isContainedIn(BitSet sourceBitSet, BitSet targetBitSet) { boolean result = false; if (sourceBitSet.isEmpty()) { return true; } BitSet setA = (BitSet) sourceBitSet.clone(); setA.and(targetBitSet); if (setA.equals(sourceBitSet)) { ...
java
private boolean isContainedIn(BitSet sourceBitSet, BitSet targetBitSet) { boolean result = false; if (sourceBitSet.isEmpty()) { return true; } BitSet setA = (BitSet) sourceBitSet.clone(); setA.and(targetBitSet); if (setA.equals(sourceBitSet)) { ...
[ "private", "boolean", "isContainedIn", "(", "BitSet", "sourceBitSet", ",", "BitSet", "targetBitSet", ")", "{", "boolean", "result", "=", "false", ";", "if", "(", "sourceBitSet", ".", "isEmpty", "(", ")", ")", "{", "return", "true", ";", "}", "BitSet", "set...
Test if set sourceBitSet is contained in set targetBitSet. @param sourceBitSet a bitSet @param targetBitSet a bitSet @return true if sourceBitSet is contained in targetBitSet
[ "Test", "if", "set", "sourceBitSet", "is", "contained", "in", "set", "targetBitSet", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java#L568-L583
114,129
cdk/cdk
base/data/src/main/java/org/openscience/cdk/ChemObject.java
ChemObject.compare
public boolean compare(Object object) { if (!(object instanceof IChemObject)) { return false; } ChemObject chemObj = (ChemObject) object; return Objects.equal(identifier, chemObj.identifier); }
java
public boolean compare(Object object) { if (!(object instanceof IChemObject)) { return false; } ChemObject chemObj = (ChemObject) object; return Objects.equal(identifier, chemObj.identifier); }
[ "public", "boolean", "compare", "(", "Object", "object", ")", "{", "if", "(", "!", "(", "object", "instanceof", "IChemObject", ")", ")", "{", "return", "false", ";", "}", "ChemObject", "chemObj", "=", "(", "ChemObject", ")", "object", ";", "return", "Obj...
Compares a IChemObject with this IChemObject. @param object Object of type AtomType @return true if the atom types are equal
[ "Compares", "a", "IChemObject", "with", "this", "IChemObject", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ChemObject.java#L331-L337
114,130
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/validate/ValidationReport.java
ValidationReport.addReport
public void addReport(ValidationReport report) { errors.addAll(report.errors); warnings.addAll(report.warnings); oks.addAll(report.oks); cdkErrors.addAll(report.cdkErrors); }
java
public void addReport(ValidationReport report) { errors.addAll(report.errors); warnings.addAll(report.warnings); oks.addAll(report.oks); cdkErrors.addAll(report.cdkErrors); }
[ "public", "void", "addReport", "(", "ValidationReport", "report", ")", "{", "errors", ".", "addAll", "(", "report", ".", "errors", ")", ";", "warnings", ".", "addAll", "(", "report", ".", "warnings", ")", ";", "oks", ".", "addAll", "(", "report", ".", ...
Merges the tests with the tests in this ValidationReport.
[ "Merges", "the", "tests", "with", "the", "tests", "in", "this", "ValidationReport", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/validate/ValidationReport.java#L50-L55
114,131
cdk/cdk
tool/hash/src/main/java/org/openscience/cdk/hash/stereo/DoubleBond3DParity.java
DoubleBond3DParity.toVector
private static double[] toVector(Point3d src, Point3d dest) { return new double[]{dest.x - src.x, dest.y - src.y, dest.z - src.z}; }
java
private static double[] toVector(Point3d src, Point3d dest) { return new double[]{dest.x - src.x, dest.y - src.y, dest.z - src.z}; }
[ "private", "static", "double", "[", "]", "toVector", "(", "Point3d", "src", ",", "Point3d", "dest", ")", "{", "return", "new", "double", "[", "]", "{", "dest", ".", "x", "-", "src", ".", "x", ",", "dest", ".", "y", "-", "src", ".", "y", ",", "d...
Create a vector by specifying the source and destination coordinates. @param src start point of the vector @param dest end point of the vector @return a new vector
[ "Create", "a", "vector", "by", "specifying", "the", "source", "and", "destination", "coordinates", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/DoubleBond3DParity.java#L100-L102
114,132
cdk/cdk
tool/hash/src/main/java/org/openscience/cdk/hash/stereo/DoubleBond3DParity.java
DoubleBond3DParity.crossProduct
private static double[] crossProduct(double[] u, double[] v) { return new double[]{(u[1] * v[2]) - (v[1] * u[2]), (u[2] * v[0]) - (v[2] * u[0]), (u[0] * v[1]) - (v[0] * u[1])}; }
java
private static double[] crossProduct(double[] u, double[] v) { return new double[]{(u[1] * v[2]) - (v[1] * u[2]), (u[2] * v[0]) - (v[2] * u[0]), (u[0] * v[1]) - (v[0] * u[1])}; }
[ "private", "static", "double", "[", "]", "crossProduct", "(", "double", "[", "]", "u", ",", "double", "[", "]", "v", ")", "{", "return", "new", "double", "[", "]", "{", "(", "u", "[", "1", "]", "*", "v", "[", "2", "]", ")", "-", "(", "v", "...
Cross product of two 3D coordinates @param u either 3D coordinates @param v other 3D coordinates @return the cross-product
[ "Cross", "product", "of", "two", "3D", "coordinates" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/DoubleBond3DParity.java#L122-L124
114,133
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/tools/features/MoleculeFeaturesTool.java
MoleculeFeaturesTool.hasGraphRepresentation
public static boolean hasGraphRepresentation(IAtomContainer molecule) { for (IBond bond : molecule.bonds()) if (bond.getAtomCount() != 2) return false; return true; }
java
public static boolean hasGraphRepresentation(IAtomContainer molecule) { for (IBond bond : molecule.bonds()) if (bond.getAtomCount() != 2) return false; return true; }
[ "public", "static", "boolean", "hasGraphRepresentation", "(", "IAtomContainer", "molecule", ")", "{", "for", "(", "IBond", "bond", ":", "molecule", ".", "bonds", "(", ")", ")", "if", "(", "bond", ".", "getAtomCount", "(", ")", "!=", "2", ")", "return", "...
Checks whether all bonds have exactly two atoms.
[ "Checks", "whether", "all", "bonds", "have", "exactly", "two", "atoms", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/tools/features/MoleculeFeaturesTool.java#L63-L67
114,134
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java
CyclicCarbohydrateRecognition.recognise
List<IStereoElement> recognise(Set<Projection> projections) { if (!projections.contains(Projection.Haworth) && !projections.contains(Projection.Chair)) return Collections.emptyList(); List<IStereoElement> elements = new ArrayList<IStereoElement>(); RingSearch ringSearch = new Ring...
java
List<IStereoElement> recognise(Set<Projection> projections) { if (!projections.contains(Projection.Haworth) && !projections.contains(Projection.Chair)) return Collections.emptyList(); List<IStereoElement> elements = new ArrayList<IStereoElement>(); RingSearch ringSearch = new Ring...
[ "List", "<", "IStereoElement", ">", "recognise", "(", "Set", "<", "Projection", ">", "projections", ")", "{", "if", "(", "!", "projections", ".", "contains", "(", "Projection", ".", "Haworth", ")", "&&", "!", "projections", ".", "contains", "(", "Projectio...
Recognise the cyclic carbohydrate projections. @param projections the types of projections to recognise @return recognised stereocenters
[ "Recognise", "the", "cyclic", "carbohydrate", "projections", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java#L103-L146
114,135
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java
CyclicCarbohydrateRecognition.turns
static Turn[] turns(Point2d[] points) { final Turn[] turns = new Turn[points.length]; // cycle of size 6 is [1,2,3,4,5,6] not closed for (int i = 1; i <= points.length; i++) { Point2d prevXy = points[i - 1]; Point2d currXy = points[i % points.length]; Point2...
java
static Turn[] turns(Point2d[] points) { final Turn[] turns = new Turn[points.length]; // cycle of size 6 is [1,2,3,4,5,6] not closed for (int i = 1; i <= points.length; i++) { Point2d prevXy = points[i - 1]; Point2d currXy = points[i % points.length]; Point2...
[ "static", "Turn", "[", "]", "turns", "(", "Point2d", "[", "]", "points", ")", "{", "final", "Turn", "[", "]", "turns", "=", "new", "Turn", "[", "points", ".", "length", "]", ";", "// cycle of size 6 is [1,2,3,4,5,6] not closed", "for", "(", "int", "i", "...
Determine the turns in the polygon formed of the provided coordinates. @param points polygon points @return array of turns (left, right) or null if a parallel line was found
[ "Determine", "the", "turns", "in", "the", "polygon", "formed", "of", "the", "provided", "coordinates", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java#L154-L171
114,136
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java
CyclicCarbohydrateRecognition.newTetrahedralCenters
private List<ITetrahedralChirality> newTetrahedralCenters(int[] cycle, int[] above, int[] below, WoundProjection type) { List<ITetrahedralChirality> centers = new ArrayList<ITetrahedralChirality>(cycle.length); for (int i = 1; i <= cycle.length; i++) { final int prev = cycle[i - 1]; ...
java
private List<ITetrahedralChirality> newTetrahedralCenters(int[] cycle, int[] above, int[] below, WoundProjection type) { List<ITetrahedralChirality> centers = new ArrayList<ITetrahedralChirality>(cycle.length); for (int i = 1; i <= cycle.length; i++) { final int prev = cycle[i - 1]; ...
[ "private", "List", "<", "ITetrahedralChirality", ">", "newTetrahedralCenters", "(", "int", "[", "]", "cycle", ",", "int", "[", "]", "above", ",", "int", "[", "]", "below", ",", "WoundProjection", "type", ")", "{", "List", "<", "ITetrahedralChirality", ">", ...
Create the tetrahedral stereocenters for the provided cycle. @param cycle vertices in projected cycle @param above vertices above the cycle @param below vertices below the cycle @param type type of projection @return zero of more stereocenters
[ "Create", "the", "tetrahedral", "stereocenters", "for", "the", "provided", "cycle", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java#L249-L283
114,137
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java
CyclicCarbohydrateRecognition.coordinatesOfCycle
private static Point2d[] coordinatesOfCycle(int[] cycle, IAtomContainer container) { Point2d[] points = new Point2d[cycle.length]; for (int i = 0; i < cycle.length; i++) { points[i] = container.getAtom(cycle[i]).getPoint2d(); } return points; }
java
private static Point2d[] coordinatesOfCycle(int[] cycle, IAtomContainer container) { Point2d[] points = new Point2d[cycle.length]; for (int i = 0; i < cycle.length; i++) { points[i] = container.getAtom(cycle[i]).getPoint2d(); } return points; }
[ "private", "static", "Point2d", "[", "]", "coordinatesOfCycle", "(", "int", "[", "]", "cycle", ",", "IAtomContainer", "container", ")", "{", "Point2d", "[", "]", "points", "=", "new", "Point2d", "[", "cycle", ".", "length", "]", ";", "for", "(", "int", ...
Obtain the coordinates of atoms in a cycle. @param cycle vertices that form a cycles @param container structure representation @return coordinates of the cycle
[ "Obtain", "the", "coordinates", "of", "atoms", "in", "a", "cycle", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java#L292-L298
114,138
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java
CyclicCarbohydrateRecognition.filter
private static int[] filter(int[] org, int skip1, int skip2) { int n = 0; int[] dest = new int[org.length - 2]; for (int w : org) { if (w != skip1 && w != skip2) dest[n++] = w; } return dest; }
java
private static int[] filter(int[] org, int skip1, int skip2) { int n = 0; int[] dest = new int[org.length - 2]; for (int w : org) { if (w != skip1 && w != skip2) dest[n++] = w; } return dest; }
[ "private", "static", "int", "[", "]", "filter", "(", "int", "[", "]", "org", ",", "int", "skip1", ",", "int", "skip2", ")", "{", "int", "n", "=", "0", ";", "int", "[", "]", "dest", "=", "new", "int", "[", "org", ".", "length", "-", "2", "]", ...
Filter an array, excluding two provided values. These values must be present in the input. @param org input array @param skip1 skip this item @param skip2 skip this item also @return array without skip1 and skip2
[ "Filter", "an", "array", "excluding", "two", "provided", "values", ".", "These", "values", "must", "be", "present", "in", "the", "input", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java#L309-L316
114,139
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java
CyclicCarbohydrateRecognition.checkHaworthAlignment
private boolean checkHaworthAlignment(Point2d[] points) { for (int i = 0; i < points.length; i++) { Point2d curr = points[i]; Point2d next = points[(i+1) % points.length]; double deltaY = curr.y - next.y; if (Math.abs(deltaY) < C...
java
private boolean checkHaworthAlignment(Point2d[] points) { for (int i = 0; i < points.length; i++) { Point2d curr = points[i]; Point2d next = points[(i+1) % points.length]; double deltaY = curr.y - next.y; if (Math.abs(deltaY) < C...
[ "private", "boolean", "checkHaworthAlignment", "(", "Point2d", "[", "]", "points", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "points", ".", "length", ";", "i", "++", ")", "{", "Point2d", "curr", "=", "points", "[", "i", "]", ";", ...
Ensures at least one cyclic bond is horizontal. @param points the points of atoms in the ring @return whether the Haworth alignment is correct
[ "Ensures", "at", "least", "one", "cyclic", "bond", "is", "horizontal", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java#L365-L378
114,140
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java
CyclicCarbohydrateRecognition.horizontalOffset
private Point2d horizontalOffset(Point2d[] points, Turn[] turns, Projection projection) { // Haworth must currently be drawn vertically, I have seen them drawn // slanted but it's difficult to determine which way the projection // is relative if (projection != Projection.Chair) ...
java
private Point2d horizontalOffset(Point2d[] points, Turn[] turns, Projection projection) { // Haworth must currently be drawn vertically, I have seen them drawn // slanted but it's difficult to determine which way the projection // is relative if (projection != Projection.Chair) ...
[ "private", "Point2d", "horizontalOffset", "(", "Point2d", "[", "]", "points", ",", "Turn", "[", "]", "turns", ",", "Projection", "projection", ")", "{", "// Haworth must currently be drawn vertically, I have seen them drawn", "// slanted but it's difficult to determine which wa...
Determine the horizontal offset of the projection. This allows projections that are drawn at angle to be correctly interpreted. Currently only projections of chair conformations are considered. @param points points of the cycle @param turns the turns in the cycle (left/right) @param projection the type of pro...
[ "Determine", "the", "horizontal", "offset", "of", "the", "projection", ".", "This", "allows", "projections", "that", "are", "drawn", "at", "angle", "to", "be", "correctly", "interpreted", ".", "Currently", "only", "projections", "of", "chair", "conformations", "...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/CyclicCarbohydrateRecognition.java#L390-L420
114,141
cdk/cdk
tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java
Polarizability.getPolarizabilitiyFactorForAtom
public double getPolarizabilitiyFactorForAtom(IAtomContainer atomContainer, IAtom atom) { IAtomContainer acH = atomContainer.getBuilder().newInstance(IAtomContainer.class, atomContainer); addExplicitHydrogens(acH); return getKJPolarizabilityFactor(acH, atom); }
java
public double getPolarizabilitiyFactorForAtom(IAtomContainer atomContainer, IAtom atom) { IAtomContainer acH = atomContainer.getBuilder().newInstance(IAtomContainer.class, atomContainer); addExplicitHydrogens(acH); return getKJPolarizabilityFactor(acH, atom); }
[ "public", "double", "getPolarizabilitiyFactorForAtom", "(", "IAtomContainer", "atomContainer", ",", "IAtom", "atom", ")", "{", "IAtomContainer", "acH", "=", "atomContainer", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IAtomContainer", ".", "class", ",", ...
Gets the polarizabilitiyFactorForAtom. @param atomContainer AtomContainer @param atom atom for which the factor should become known @return The polarizabilitiyFactorForAtom value
[ "Gets", "the", "polarizabilitiyFactorForAtom", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java#L82-L86
114,142
cdk/cdk
tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java
Polarizability.calculateKJMeanMolecularPolarizability
public double calculateKJMeanMolecularPolarizability(IAtomContainer atomContainer) { double polarizabilitiy = 0; IAtomContainer acH = atomContainer.getBuilder().newInstance(IAtomContainer.class, atomContainer); addExplicitHydrogens(acH); for (int i = 0; i < acH.getAtomCount(); i++) { ...
java
public double calculateKJMeanMolecularPolarizability(IAtomContainer atomContainer) { double polarizabilitiy = 0; IAtomContainer acH = atomContainer.getBuilder().newInstance(IAtomContainer.class, atomContainer); addExplicitHydrogens(acH); for (int i = 0; i < acH.getAtomCount(); i++) { ...
[ "public", "double", "calculateKJMeanMolecularPolarizability", "(", "IAtomContainer", "atomContainer", ")", "{", "double", "polarizabilitiy", "=", "0", ";", "IAtomContainer", "acH", "=", "atomContainer", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IAtomConta...
calculates the mean molecular polarizability as described in paper of Kang and Jhorn. @param atomContainer AtomContainer @return polarizabilitiy
[ "calculates", "the", "mean", "molecular", "polarizability", "as", "described", "in", "paper", "of", "Kang", "and", "Jhorn", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java#L94-L102
114,143
cdk/cdk
tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java
Polarizability.calculateBondPolarizability
public double calculateBondPolarizability(IAtomContainer atomContainer, IBond bond) { double polarizabilitiy = 0; IAtomContainer acH = atomContainer.getBuilder().newInstance(IAtomContainer.class, atomContainer); addExplicitHydrogens(acH); if (bond.getAtomCount() == 2) { polar...
java
public double calculateBondPolarizability(IAtomContainer atomContainer, IBond bond) { double polarizabilitiy = 0; IAtomContainer acH = atomContainer.getBuilder().newInstance(IAtomContainer.class, atomContainer); addExplicitHydrogens(acH); if (bond.getAtomCount() == 2) { polar...
[ "public", "double", "calculateBondPolarizability", "(", "IAtomContainer", "atomContainer", ",", "IBond", "bond", ")", "{", "double", "polarizabilitiy", "=", "0", ";", "IAtomContainer", "acH", "=", "atomContainer", ".", "getBuilder", "(", ")", ".", "newInstance", "...
calculate bond polarizability. @param atomContainer AtomContainer @param bond Bond bond for which the polarizabilitiy should be calculated @return polarizabilitiy
[ "calculate", "bond", "polarizability", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java#L190-L199
114,144
cdk/cdk
tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java
Polarizability.getNumberOfHydrogen
private int getNumberOfHydrogen(IAtomContainer atomContainer, IAtom atom) { java.util.List<IBond> bonds = atomContainer.getConnectedBondsList(atom); IAtom connectedAtom; int hCounter = 0; for (IBond bond : bonds) { connectedAtom = bond.getOther(atom); if (connecte...
java
private int getNumberOfHydrogen(IAtomContainer atomContainer, IAtom atom) { java.util.List<IBond> bonds = atomContainer.getConnectedBondsList(atom); IAtom connectedAtom; int hCounter = 0; for (IBond bond : bonds) { connectedAtom = bond.getOther(atom); if (connecte...
[ "private", "int", "getNumberOfHydrogen", "(", "IAtomContainer", "atomContainer", ",", "IAtom", "atom", ")", "{", "java", ".", "util", ".", "List", "<", "IBond", ">", "bonds", "=", "atomContainer", ".", "getConnectedBondsList", "(", "atom", ")", ";", "IAtom", ...
Gets the numberOfHydrogen attribute of the Polarizability object. @param atomContainer Description of the Parameter @param atom Description of the Parameter @return The numberOfHydrogen value
[ "Gets", "the", "numberOfHydrogen", "attribute", "of", "the", "Polarizability", "object", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java#L298-L309
114,145
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardSgroupGenerator.java
StandardSgroupGenerator.checkAbbreviationHighlight
private static boolean checkAbbreviationHighlight(IAtomContainer container, Sgroup sgroup) { assert sgroup.getType() == SgroupType.CtabAbbreviation; Set<IAtom> sgroupAtoms = sgroup.getAtoms(); int atomHighlight = 0; int bondHighlight = 0; int numSgroupAtoms = sgroupAtoms.size();...
java
private static boolean checkAbbreviationHighlight(IAtomContainer container, Sgroup sgroup) { assert sgroup.getType() == SgroupType.CtabAbbreviation; Set<IAtom> sgroupAtoms = sgroup.getAtoms(); int atomHighlight = 0; int bondHighlight = 0; int numSgroupAtoms = sgroupAtoms.size();...
[ "private", "static", "boolean", "checkAbbreviationHighlight", "(", "IAtomContainer", "container", ",", "Sgroup", "sgroup", ")", "{", "assert", "sgroup", ".", "getType", "(", ")", "==", "SgroupType", ".", "CtabAbbreviation", ";", "Set", "<", "IAtom", ">", "sgroup...
Checks whether the given abbreviation Sgroup either has no highlight or is fully highlighted. If an abbreviation is partially highlighted we don't want to contract it as this would hide the part being highlighted. @param container molecule @param sgroup abbreviation Sgroup @return the abbreviation can be contracted
[ "Checks", "whether", "the", "given", "abbreviation", "Sgroup", "either", "has", "no", "highlight", "or", "is", "fully", "highlighted", ".", "If", "an", "abbreviation", "is", "partially", "highlighted", "we", "don", "t", "want", "to", "contract", "it", "as", ...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardSgroupGenerator.java#L152-L193
114,146
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardSgroupGenerator.java
StandardSgroupGenerator.hideMultipleParts
private static void hideMultipleParts(IAtomContainer container, Sgroup sgroup) { final Set<IBond> crossing = sgroup.getBonds(); final Set<IAtom> atoms = sgroup.getAtoms(); final Set<IAtom> parentAtoms = sgroup.getValue(SgroupKey.CtabParentAtomList); for (IBond bond : container.bonds())...
java
private static void hideMultipleParts(IAtomContainer container, Sgroup sgroup) { final Set<IBond> crossing = sgroup.getBonds(); final Set<IAtom> atoms = sgroup.getAtoms(); final Set<IAtom> parentAtoms = sgroup.getValue(SgroupKey.CtabParentAtomList); for (IBond bond : container.bonds())...
[ "private", "static", "void", "hideMultipleParts", "(", "IAtomContainer", "container", ",", "Sgroup", "sgroup", ")", "{", "final", "Set", "<", "IBond", ">", "crossing", "=", "sgroup", ".", "getBonds", "(", ")", ";", "final", "Set", "<", "IAtom", ">", "atoms...
Hide the repeated atoms and bonds of a multiple group. We hide al atoms that belong to the group unless they are defined in the parent atom list. Any bond to those atoms that is not a crossing bond or one connecting atoms in the parent list is hidden. @param container molecule @param sgroup multiple group display s...
[ "Hide", "the", "repeated", "atoms", "and", "bonds", "of", "a", "multiple", "group", ".", "We", "hide", "al", "atoms", "that", "belong", "to", "the", "group", "unless", "they", "are", "defined", "in", "the", "parent", "atom", "list", ".", "Any", "bond", ...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardSgroupGenerator.java#L204-L223
114,147
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardSgroupGenerator.java
StandardSgroupGenerator.generateSgroups
IRenderingElement generateSgroups(IAtomContainer container, AtomSymbol[] symbols) { ElementGroup result = new ElementGroup(); List<Sgroup> sgroups = container.getProperty(CDKConstants.CTAB_SGROUPS); if (sgroups == null || sgroups.isEmpty()) return result; Map<IAtom, AtomSy...
java
IRenderingElement generateSgroups(IAtomContainer container, AtomSymbol[] symbols) { ElementGroup result = new ElementGroup(); List<Sgroup> sgroups = container.getProperty(CDKConstants.CTAB_SGROUPS); if (sgroups == null || sgroups.isEmpty()) return result; Map<IAtom, AtomSy...
[ "IRenderingElement", "generateSgroups", "(", "IAtomContainer", "container", ",", "AtomSymbol", "[", "]", "symbols", ")", "{", "ElementGroup", "result", "=", "new", "ElementGroup", "(", ")", ";", "List", "<", "Sgroup", ">", "sgroups", "=", "container", ".", "ge...
Generate the Sgroup elements for the provided atom contains. @param container molecule @return Sgroup rendering elements
[ "Generate", "the", "Sgroup", "elements", "for", "the", "provided", "atom", "contains", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardSgroupGenerator.java#L282-L328
114,148
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardSgroupGenerator.java
StandardSgroupGenerator.generatePolymerSgroup
private IRenderingElement generatePolymerSgroup(Sgroup sgroup, Map<IAtom, AtomSymbol> symbolMap) { // draw the brackets List<SgroupBracket> brackets = sgroup.getValue(SgroupKey.CtabBracket); if (brackets != null) { SgroupType type = sgroup.getType(); String subscript = ...
java
private IRenderingElement generatePolymerSgroup(Sgroup sgroup, Map<IAtom, AtomSymbol> symbolMap) { // draw the brackets List<SgroupBracket> brackets = sgroup.getValue(SgroupKey.CtabBracket); if (brackets != null) { SgroupType type = sgroup.getType(); String subscript = ...
[ "private", "IRenderingElement", "generatePolymerSgroup", "(", "Sgroup", "sgroup", ",", "Map", "<", "IAtom", ",", "AtomSymbol", ">", "symbolMap", ")", "{", "// draw the brackets", "List", "<", "SgroupBracket", ">", "brackets", "=", "sgroup", ".", "getValue", "(", ...
Generates polymer Sgroup elements. @param sgroup the Sgroup @return the rendered elements (empty if no brackets defined)
[ "Generates", "polymer", "Sgroup", "elements", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardSgroupGenerator.java#L392-L453
114,149
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/Partition.java
Partition.unit
public static Partition unit(int size) { Partition unit = new Partition(); unit.cells.add(new TreeSet<Integer>()); for (int i = 0; i < size; i++) { unit.cells.get(0).add(i); } return unit; }
java
public static Partition unit(int size) { Partition unit = new Partition(); unit.cells.add(new TreeSet<Integer>()); for (int i = 0; i < size; i++) { unit.cells.get(0).add(i); } return unit; }
[ "public", "static", "Partition", "unit", "(", "int", "size", ")", "{", "Partition", "unit", "=", "new", "Partition", "(", ")", ";", "unit", ".", "cells", ".", "add", "(", "new", "TreeSet", "<", "Integer", ">", "(", ")", ")", ";", "for", "(", "int",...
Create a unit partition - in other words, the coarsest possible partition where all the elements are in one cell. @param size the number of elements @return a new Partition with one cell containing all the elements
[ "Create", "a", "unit", "partition", "-", "in", "other", "words", "the", "coarsest", "possible", "partition", "where", "all", "the", "elements", "are", "in", "one", "cell", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Partition.java#L87-L94
114,150
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/Partition.java
Partition.numberOfElements
public int numberOfElements() { int n = 0; for (SortedSet<Integer> cell : cells) { n += cell.size(); } return n; }
java
public int numberOfElements() { int n = 0; for (SortedSet<Integer> cell : cells) { n += cell.size(); } return n; }
[ "public", "int", "numberOfElements", "(", ")", "{", "int", "n", "=", "0", ";", "for", "(", "SortedSet", "<", "Integer", ">", "cell", ":", "cells", ")", "{", "n", "+=", "cell", ".", "size", "(", ")", ";", "}", "return", "n", ";", "}" ]
Calculate the size of the partition as the sum of the sizes of the cells. @return the number of elements in the partition
[ "Calculate", "the", "size", "of", "the", "partition", "as", "the", "sum", "of", "the", "sizes", "of", "the", "cells", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Partition.java#L133-L139
114,151
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/Partition.java
Partition.toPermutation
public Permutation toPermutation() { Permutation p = new Permutation(this.size()); for (int i = 0; i < this.size(); i++) { p.set(i, this.cells.get(i).first()); } return p; }
java
public Permutation toPermutation() { Permutation p = new Permutation(this.size()); for (int i = 0; i < this.size(); i++) { p.set(i, this.cells.get(i).first()); } return p; }
[ "public", "Permutation", "toPermutation", "(", ")", "{", "Permutation", "p", "=", "new", "Permutation", "(", "this", ".", "size", "(", ")", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "size", "(", ")", ";", "i", "++", ...
Converts the whole partition into a permutation. @return the partition as a permutation
[ "Converts", "the", "whole", "partition", "into", "a", "permutation", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Partition.java#L161-L167
114,152
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/Partition.java
Partition.splitBefore
public Partition splitBefore(int cellIndex, int splitElement) { Partition r = new Partition(); // copy the cells up to cellIndex for (int j = 0; j < cellIndex; j++) { r.addCell(this.copyBlock(j)); } // split the block at block index r.addSingletonCell(splitEl...
java
public Partition splitBefore(int cellIndex, int splitElement) { Partition r = new Partition(); // copy the cells up to cellIndex for (int j = 0; j < cellIndex; j++) { r.addCell(this.copyBlock(j)); } // split the block at block index r.addSingletonCell(splitEl...
[ "public", "Partition", "splitBefore", "(", "int", "cellIndex", ",", "int", "splitElement", ")", "{", "Partition", "r", "=", "new", "Partition", "(", ")", ";", "// copy the cells up to cellIndex", "for", "(", "int", "j", "=", "0", ";", "j", "<", "cellIndex", ...
Splits this partition by taking the cell at cellIndex and making two new cells - the first with the singleton splitElement and the second with the rest of the elements from that cell. @param cellIndex the index of the cell to split on @param splitElement the element to put in its own cell @return a new (finer) Partiti...
[ "Splits", "this", "partition", "by", "taking", "the", "cell", "at", "cellIndex", "and", "making", "two", "new", "cells", "-", "the", "first", "with", "the", "singleton", "splitElement", "and", "the", "second", "with", "the", "rest", "of", "the", "elements", ...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Partition.java#L222-L240
114,153
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/Partition.java
Partition.addSingletonCell
public void addSingletonCell(int element) { SortedSet<Integer> cell = new TreeSet<Integer>(); cell.add(element); this.cells.add(cell); }
java
public void addSingletonCell(int element) { SortedSet<Integer> cell = new TreeSet<Integer>(); cell.add(element); this.cells.add(cell); }
[ "public", "void", "addSingletonCell", "(", "int", "element", ")", "{", "SortedSet", "<", "Integer", ">", "cell", "=", "new", "TreeSet", "<", "Integer", ">", "(", ")", ";", "cell", ".", "add", "(", "element", ")", ";", "this", ".", "cells", ".", "add"...
Add a new singleton cell to the end of the partition containing only this element. @param element the element to add in its own cell
[ "Add", "a", "new", "singleton", "cell", "to", "the", "end", "of", "the", "partition", "containing", "only", "this", "element", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Partition.java#L315-L319
114,154
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/Partition.java
Partition.addCell
public void addCell(int... elements) { SortedSet<Integer> cell = new TreeSet<Integer>(); for (int element : elements) { cell.add(element); } this.cells.add(cell); }
java
public void addCell(int... elements) { SortedSet<Integer> cell = new TreeSet<Integer>(); for (int element : elements) { cell.add(element); } this.cells.add(cell); }
[ "public", "void", "addCell", "(", "int", "...", "elements", ")", "{", "SortedSet", "<", "Integer", ">", "cell", "=", "new", "TreeSet", "<", "Integer", ">", "(", ")", ";", "for", "(", "int", "element", ":", "elements", ")", "{", "cell", ".", "add", ...
Adds a new cell to the end of the partition containing these elements. @param elements the elements to add in a new cell
[ "Adds", "a", "new", "cell", "to", "the", "end", "of", "the", "partition", "containing", "these", "elements", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Partition.java#L335-L341
114,155
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/Partition.java
Partition.addToCell
public void addToCell(int index, int element) { if (cells.size() < index + 1) { addSingletonCell(element); } else { cells.get(index).add(element); } }
java
public void addToCell(int index, int element) { if (cells.size() < index + 1) { addSingletonCell(element); } else { cells.get(index).add(element); } }
[ "public", "void", "addToCell", "(", "int", "index", ",", "int", "element", ")", "{", "if", "(", "cells", ".", "size", "(", ")", "<", "index", "+", "1", ")", "{", "addSingletonCell", "(", "element", ")", ";", "}", "else", "{", "cells", ".", "get", ...
Add an element to a particular cell. @param index the index of the cell to add to @param element the element to add
[ "Add", "an", "element", "to", "a", "particular", "cell", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Partition.java#L358-L364
114,156
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/Partition.java
Partition.order
public void order() { Collections.sort(cells, new Comparator<SortedSet<Integer>>() { @Override public int compare(SortedSet<Integer> cellA, SortedSet<Integer> cellB) { return cellA.first().compareTo(cellB.first()); } }); }
java
public void order() { Collections.sort(cells, new Comparator<SortedSet<Integer>>() { @Override public int compare(SortedSet<Integer> cellA, SortedSet<Integer> cellB) { return cellA.first().compareTo(cellB.first()); } }); }
[ "public", "void", "order", "(", ")", "{", "Collections", ".", "sort", "(", "cells", ",", "new", "Comparator", "<", "SortedSet", "<", "Integer", ">", ">", "(", ")", "{", "@", "Override", "public", "int", "compare", "(", "SortedSet", "<", "Integer", ">",...
Sort the cells in increasing order.
[ "Sort", "the", "cells", "in", "increasing", "order", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Partition.java#L389-L398
114,157
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/Partition.java
Partition.inSameCell
public boolean inSameCell(int elementI, int elementJ) { for (int cellIndex = 0; cellIndex < size(); cellIndex++) { SortedSet<Integer> cell = getCell(cellIndex); if (cell.contains(elementI) && cell.contains(elementJ)) { return true; } } return f...
java
public boolean inSameCell(int elementI, int elementJ) { for (int cellIndex = 0; cellIndex < size(); cellIndex++) { SortedSet<Integer> cell = getCell(cellIndex); if (cell.contains(elementI) && cell.contains(elementJ)) { return true; } } return f...
[ "public", "boolean", "inSameCell", "(", "int", "elementI", ",", "int", "elementJ", ")", "{", "for", "(", "int", "cellIndex", "=", "0", ";", "cellIndex", "<", "size", "(", ")", ";", "cellIndex", "++", ")", "{", "SortedSet", "<", "Integer", ">", "cell", ...
Check that two elements are in the same cell of the partition. @param elementI an element in the partition @param elementJ an element in the partition @return true if both elements are in the same cell
[ "Check", "that", "two", "elements", "are", "in", "the", "same", "cell", "of", "the", "partition", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Partition.java#L407-L415
114,158
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java
Mappings.map
public <T> Iterable<T> map(final Function<int[], T> f) { return Iterables.transform(iterable, f); }
java
public <T> Iterable<T> map(final Function<int[], T> f) { return Iterables.transform(iterable, f); }
[ "public", "<", "T", ">", "Iterable", "<", "T", ">", "map", "(", "final", "Function", "<", "int", "[", "]", ",", "T", ">", "f", ")", "{", "return", "Iterables", ".", "transform", "(", "iterable", ",", "f", ")", ";", "}" ]
Map the mappings to another type. Each mapping is transformed using the provided function. <blockquote><pre>{@code final IAtomContainer query; final IAtomContainer target; Mappings mappings = Pattern.findSubstructure(query) .matchAll(target); // a string that indicates the mapping of atom elements and numbers Itera...
[ "Map", "the", "mappings", "to", "another", "type", ".", "Each", "mapping", "is", "transformed", "using", "the", "provided", "function", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java#L240-L242
114,159
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java
Mappings.limit
public Mappings limit(int limit) { return new Mappings(query, target, Iterables.limit(iterable, limit)); }
java
public Mappings limit(int limit) { return new Mappings(query, target, Iterables.limit(iterable, limit)); }
[ "public", "Mappings", "limit", "(", "int", "limit", ")", "{", "return", "new", "Mappings", "(", "query", ",", "target", ",", "Iterables", ".", "limit", "(", "iterable", ",", "limit", ")", ")", ";", "}" ]
Limit the number of mappings - only this number of mappings will be generate. @param limit the number of mappings @return fluent-api instance
[ "Limit", "the", "number", "of", "mappings", "-", "only", "this", "number", "of", "mappings", "will", "be", "generate", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java#L251-L253
114,160
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java
Mappings.uniqueAtoms
public Mappings uniqueAtoms() { // we need the unique predicate to be reset for each new iterator - // otherwise multiple iterations are always filtered (seen before) return new Mappings(query, target, new Iterable<int[]>() { @Override public Iterator<int[]> iterator() {...
java
public Mappings uniqueAtoms() { // we need the unique predicate to be reset for each new iterator - // otherwise multiple iterations are always filtered (seen before) return new Mappings(query, target, new Iterable<int[]>() { @Override public Iterator<int[]> iterator() {...
[ "public", "Mappings", "uniqueAtoms", "(", ")", "{", "// we need the unique predicate to be reset for each new iterator -", "// otherwise multiple iterations are always filtered (seen before)", "return", "new", "Mappings", "(", "query", ",", "target", ",", "new", "Iterable", "<", ...
Filter the mappings for those which cover a unique set of atoms in the target. The unique atom mappings are a subset of the unique bond matches. @return fluent-api instance @see #uniqueBonds()
[ "Filter", "the", "mappings", "for", "those", "which", "cover", "a", "unique", "set", "of", "atoms", "in", "the", "target", ".", "The", "unique", "atom", "mappings", "are", "a", "subset", "of", "the", "unique", "bond", "matches", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java#L278-L288
114,161
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java
Mappings.uniqueBonds
public Mappings uniqueBonds() { // we need the unique predicate to be reset for each new iterator - // otherwise multiple iterations are always filtered (seen before) final int[][] g = GraphUtil.toAdjList(query); return new Mappings(query, target, new Iterable<int[]>() { @Ov...
java
public Mappings uniqueBonds() { // we need the unique predicate to be reset for each new iterator - // otherwise multiple iterations are always filtered (seen before) final int[][] g = GraphUtil.toAdjList(query); return new Mappings(query, target, new Iterable<int[]>() { @Ov...
[ "public", "Mappings", "uniqueBonds", "(", ")", "{", "// we need the unique predicate to be reset for each new iterator -", "// otherwise multiple iterations are always filtered (seen before)", "final", "int", "[", "]", "[", "]", "g", "=", "GraphUtil", ".", "toAdjList", "(", "...
Filter the mappings for those which cover a unique set of bonds in the target. @return fluent-api instance @see #uniqueAtoms()
[ "Filter", "the", "mappings", "for", "those", "which", "cover", "a", "unique", "set", "of", "bonds", "in", "the", "target", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java#L297-L308
114,162
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java
Mappings.toArray
public int[][] toArray() { int[][] res = new int[14][]; int size = 0; for (int[] map : this) { if (size == res.length) res = Arrays.copyOf(res, size + (size >> 1)); res[size++] = map.clone(); } return Arrays.copyOf(res, size); }
java
public int[][] toArray() { int[][] res = new int[14][]; int size = 0; for (int[] map : this) { if (size == res.length) res = Arrays.copyOf(res, size + (size >> 1)); res[size++] = map.clone(); } return Arrays.copyOf(res, size); }
[ "public", "int", "[", "]", "[", "]", "toArray", "(", ")", "{", "int", "[", "]", "[", "]", "res", "=", "new", "int", "[", "14", "]", "[", "", "]", ";", "int", "size", "=", "0", ";", "for", "(", "int", "[", "]", "map", ":", "this", ")", "...
Mappings are lazily generated and best used in a loop. However if all mappings are required this method can provide a fixed size array of mappings. <blockquote><pre> IAtomContainer query = ...; IAtomContainer target = ...; Pattern pat = Pattern.findSubstructure(query); // lazily iterator for (int[] mapping : pat.m...
[ "Mappings", "are", "lazily", "generated", "and", "best", "used", "in", "a", "loop", ".", "However", "if", "all", "mappings", "are", "required", "this", "method", "can", "provide", "a", "fixed", "size", "array", "of", "mappings", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java#L355-L364
114,163
cdk/cdk
descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/DistanceMoment.java
DistanceMoment.calculate
public static float calculate(IAtomContainer query, IAtomContainer target) throws CDKException { float[] mom1 = generateMoments(query); float[] mom2 = generateMoments(target); float sum = 0; for (int i = 0; i < mom1.length; i++) { sum += Math.abs(mom1[i] - mom2[i]); }...
java
public static float calculate(IAtomContainer query, IAtomContainer target) throws CDKException { float[] mom1 = generateMoments(query); float[] mom2 = generateMoments(target); float sum = 0; for (int i = 0; i < mom1.length; i++) { sum += Math.abs(mom1[i] - mom2[i]); }...
[ "public", "static", "float", "calculate", "(", "IAtomContainer", "query", ",", "IAtomContainer", "target", ")", "throws", "CDKException", "{", "float", "[", "]", "mom1", "=", "generateMoments", "(", "query", ")", ";", "float", "[", "]", "mom2", "=", "generat...
Evaluate the 3D similarity between two molecules. The method does not remove hydrogens. If this is required, remove them from the molecules before passing them here. @param query The query molecule @param target The target molecule @return The similarity between the two molecules (ranging from 0 to 1) @throws CDKExc...
[ "Evaluate", "the", "3D", "similarity", "between", "two", "molecules", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/DistanceMoment.java#L212-L220
114,164
cdk/cdk
descriptor/qsar/src/main/java/org/openscience/cdk/qsar/AbstractAtomicDescriptor.java
AbstractAtomicDescriptor.isCachedAtomContainer
public boolean isCachedAtomContainer(IAtomContainer container) { if (cachedDescriptorValues == null) return false; return (cachedDescriptorValues.get(PREVIOUS_ATOMCONTAINER) == container); }
java
public boolean isCachedAtomContainer(IAtomContainer container) { if (cachedDescriptorValues == null) return false; return (cachedDescriptorValues.get(PREVIOUS_ATOMCONTAINER) == container); }
[ "public", "boolean", "isCachedAtomContainer", "(", "IAtomContainer", "container", ")", "{", "if", "(", "cachedDescriptorValues", "==", "null", ")", "return", "false", ";", "return", "(", "cachedDescriptorValues", ".", "get", "(", "PREVIOUS_ATOMCONTAINER", ")", "==",...
Returns true if the cached IDescriptorResult's are for the given IAtomContainer. @param container @return false, if the cache is for a different IAtomContainer
[ "Returns", "true", "if", "the", "cached", "IDescriptorResult", "s", "are", "for", "the", "given", "IAtomContainer", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsar/src/main/java/org/openscience/cdk/qsar/AbstractAtomicDescriptor.java#L49-L52
114,165
cdk/cdk
descriptor/qsar/src/main/java/org/openscience/cdk/qsar/AbstractAtomicDescriptor.java
AbstractAtomicDescriptor.getCachedDescriptorValue
public IDescriptorResult getCachedDescriptorValue(IAtom atom) { if (cachedDescriptorValues == null) return null; return (IDescriptorResult) cachedDescriptorValues.get(atom); }
java
public IDescriptorResult getCachedDescriptorValue(IAtom atom) { if (cachedDescriptorValues == null) return null; return (IDescriptorResult) cachedDescriptorValues.get(atom); }
[ "public", "IDescriptorResult", "getCachedDescriptorValue", "(", "IAtom", "atom", ")", "{", "if", "(", "cachedDescriptorValues", "==", "null", ")", "return", "null", ";", "return", "(", "IDescriptorResult", ")", "cachedDescriptorValues", ".", "get", "(", "atom", ")...
Returns the cached DescriptorValue for the given IAtom. @param atom the IAtom for which the DescriptorValue is requested @return null, if no DescriptorValue was cached for the given IAtom
[ "Returns", "the", "cached", "DescriptorValue", "for", "the", "given", "IAtom", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsar/src/main/java/org/openscience/cdk/qsar/AbstractAtomicDescriptor.java#L60-L63
114,166
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/helper/LabelContainer.java
LabelContainer.addLabel
synchronized public void addLabel(String label) { if (!labelMap.contains(label)) { labelMap.add(labelCounter++, label); } }
java
synchronized public void addLabel(String label) { if (!labelMap.contains(label)) { labelMap.add(labelCounter++, label); } }
[ "synchronized", "public", "void", "addLabel", "(", "String", "label", ")", "{", "if", "(", "!", "labelMap", ".", "contains", "(", "label", ")", ")", "{", "labelMap", ".", "add", "(", "labelCounter", "++", ",", "label", ")", ";", "}", "}" ]
Add label if its not present @param label
[ "Add", "label", "if", "its", "not", "present" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/helper/LabelContainer.java#L68-L72
114,167
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/HBondAcceptorCountDescriptor.java
HBondAcceptorCountDescriptor.calculate
@Override public DescriptorValue calculate(IAtomContainer atomContainer) { int hBondAcceptors = 0; IAtomContainer ac; try { ac = (IAtomContainer) atomContainer.clone(); } catch (CloneNotSupportedException e) { return getDummyDescriptorValue(e); } ...
java
@Override public DescriptorValue calculate(IAtomContainer atomContainer) { int hBondAcceptors = 0; IAtomContainer ac; try { ac = (IAtomContainer) atomContainer.clone(); } catch (CloneNotSupportedException e) { return getDummyDescriptorValue(e); } ...
[ "@", "Override", "public", "DescriptorValue", "calculate", "(", "IAtomContainer", "atomContainer", ")", "{", "int", "hBondAcceptors", "=", "0", ";", "IAtomContainer", "ac", ";", "try", "{", "ac", "=", "(", "IAtomContainer", ")", "atomContainer", ".", "clone", ...
Calculates the number of H bond acceptors. @param atomContainer AtomContainer @return number of H bond acceptors
[ "Calculates", "the", "number", "of", "H", "bond", "acceptors", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/HBondAcceptorCountDescriptor.java#L150-L210
114,168
cdk/cdk
descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/rules/CIPLigandRule.java
CIPLigandRule.order
private ILigand[] order(ILigand[] ligands) { ILigand[] newLigands = new ILigand[ligands.length]; System.arraycopy(ligands, 0, newLigands, 0, ligands.length); Arrays.sort(newLigands, numberRule); // this above list is from low to high precendence, so we need to revert the array I...
java
private ILigand[] order(ILigand[] ligands) { ILigand[] newLigands = new ILigand[ligands.length]; System.arraycopy(ligands, 0, newLigands, 0, ligands.length); Arrays.sort(newLigands, numberRule); // this above list is from low to high precendence, so we need to revert the array I...
[ "private", "ILigand", "[", "]", "order", "(", "ILigand", "[", "]", "ligands", ")", "{", "ILigand", "[", "]", "newLigands", "=", "new", "ILigand", "[", "ligands", ".", "length", "]", ";", "System", ".", "arraycopy", "(", "ligands", ",", "0", ",", "new...
Order the ligands from high to low precedence according to atomic and mass numbers.
[ "Order", "the", "ligands", "from", "high", "to", "low", "precedence", "according", "to", "atomic", "and", "mass", "numbers", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/rules/CIPLigandRule.java#L87-L98
114,169
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PartialTChargePEOEDescriptor.java
PartialTChargePEOEDescriptor.calculate
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer ac) { // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method Double originalCharge = atom.getCharge(); String originalAtomtypeName = atom.getAtomTypeName(); Intege...
java
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer ac) { // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method Double originalCharge = atom.getCharge(); String originalAtomtypeName = atom.getAtomTypeName(); Intege...
[ "@", "Override", "public", "DescriptorValue", "calculate", "(", "IAtom", "atom", ",", "IAtomContainer", "ac", ")", "{", "// FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method", "Double", "originalCharge", "=", "atom", ".", "ge...
The method returns partial total charges assigned to an heavy atom through PEOE method. It is needed to call the addExplicitHydrogensToSatisfyValency method from the class tools.HydrogenAdder. @param atom The IAtom for which the DescriptorValue is requested @param ac AtomContainer @return...
[ "The", "method", "returns", "partial", "total", "charges", "assigned", "to", "an", "heavy", "atom", "through", "PEOE", "method", ".", "It", "is", "needed", "to", "call", "the", "addExplicitHydrogensToSatisfyValency", "method", "from", "the", "class", "tools", "....
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PartialTChargePEOEDescriptor.java#L152-L213
114,170
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/index/CASNumber.java
CASNumber.isValid
public static boolean isValid(String casNumber) { boolean overall = true; /* * check format */ String format = "^(\\d+)-(\\d\\d)-(\\d)$"; Pattern pattern = Pattern.compile(format); Matcher matcher = pattern.matcher(casNumber); overall = overall && matche...
java
public static boolean isValid(String casNumber) { boolean overall = true; /* * check format */ String format = "^(\\d+)-(\\d\\d)-(\\d)$"; Pattern pattern = Pattern.compile(format); Matcher matcher = pattern.matcher(casNumber); overall = overall && matche...
[ "public", "static", "boolean", "isValid", "(", "String", "casNumber", ")", "{", "boolean", "overall", "=", "true", ";", "/*\n * check format\n */", "String", "format", "=", "\"^(\\\\d+)-(\\\\d\\\\d)-(\\\\d)$\"", ";", "Pattern", "pattern", "=", "Pattern",...
Checks whether the registry number is valid. @param casNumber the CAS number to validate @cdk.keyword CAS number @cdk.keyword validation @return true if a valid CAS number, false otherwise
[ "Checks", "whether", "the", "registry", "number", "is", "valid", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/index/CASNumber.java#L59-L87
114,171
cdk/cdk
base/core/src/main/java/org/openscience/cdk/CDK.java
CDK.getVersion
public static String getVersion() { if (version != null) return version; try (InputStream stream = CDK.class.getResourceAsStream(RESOURCE_LOCATION)) { if (stream == null) { // load from JAR (as packaged with maven) version = CDK.class.getPackage()....
java
public static String getVersion() { if (version != null) return version; try (InputStream stream = CDK.class.getResourceAsStream(RESOURCE_LOCATION)) { if (stream == null) { // load from JAR (as packaged with maven) version = CDK.class.getPackage()....
[ "public", "static", "String", "getVersion", "(", ")", "{", "if", "(", "version", "!=", "null", ")", "return", "version", ";", "try", "(", "InputStream", "stream", "=", "CDK", ".", "class", ".", "getResourceAsStream", "(", "RESOURCE_LOCATION", ")", ")", "{"...
Returns the version of this CDK library. @return The library version, or null if it could not be found
[ "Returns", "the", "version", "of", "this", "CDK", "library", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/CDK.java#L49-L67
114,172
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/aromaticity/Kekulization.java
Kekulization.available
private static BitSet available(int[][] graph, IAtom[] atoms, EdgeToBondMap bonds) { final BitSet available = new BitSet(); // for all atoms, select those that require a double-bond ATOMS: for (int i = 0; i < atoms.length; i++) { final IAtom atom = atoms[i]; // precon...
java
private static BitSet available(int[][] graph, IAtom[] atoms, EdgeToBondMap bonds) { final BitSet available = new BitSet(); // for all atoms, select those that require a double-bond ATOMS: for (int i = 0; i < atoms.length; i++) { final IAtom atom = atoms[i]; // precon...
[ "private", "static", "BitSet", "available", "(", "int", "[", "]", "[", "]", "graph", ",", "IAtom", "[", "]", "atoms", ",", "EdgeToBondMap", "bonds", ")", "{", "final", "BitSet", "available", "=", "new", "BitSet", "(", ")", ";", "// for all atoms, select th...
Determine the set of atoms that are available to have a double-bond. @param graph adjacent list representation @param atoms array of atoms @param bonds map of atom indices to bonds @return atoms that can require a double-bond
[ "Determine", "the", "set", "of", "atoms", "that", "are", "available", "to", "have", "a", "double", "-", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/aromaticity/Kekulization.java#L129-L170
114,173
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/aromaticity/Kekulization.java
Kekulization.available
private static boolean available(final int element, final int charge, final int valence) { // higher atomic number elements aren't likely to be found but // we have them for rare corner cases (tellurium). // Germanium, Silicon, Tin and Antimony are a bit bonkers... switch (Elements.ofNu...
java
private static boolean available(final int element, final int charge, final int valence) { // higher atomic number elements aren't likely to be found but // we have them for rare corner cases (tellurium). // Germanium, Silicon, Tin and Antimony are a bit bonkers... switch (Elements.ofNu...
[ "private", "static", "boolean", "available", "(", "final", "int", "element", ",", "final", "int", "charge", ",", "final", "int", "valence", ")", "{", "// higher atomic number elements aren't likely to be found but", "// we have them for rare corner cases (tellurium).", "// Ge...
Determine if the specified element with the provided charge and valance requires a pi bond? @param element atomic number >= 0 @param charge formal charge @param valence bonded electrons @return a double-bond is required
[ "Determine", "if", "the", "specified", "element", "with", "the", "provided", "charge", "and", "valance", "requires", "a", "pi", "bond?" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/aromaticity/Kekulization.java#L181-L216
114,174
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/reaction/ReactionChain.java
ReactionChain.addReaction
public void addReaction(IReaction reaction, int position) { hashMapChain.put(reaction, position); this.addReaction(reaction); }
java
public void addReaction(IReaction reaction, int position) { hashMapChain.put(reaction, position); this.addReaction(reaction); }
[ "public", "void", "addReaction", "(", "IReaction", "reaction", ",", "int", "position", ")", "{", "hashMapChain", ".", "put", "(", "reaction", ",", "position", ")", ";", "this", ".", "addReaction", "(", "reaction", ")", ";", "}" ]
Added a IReaction for this chain in position. @param reaction The IReaction @param position The position in this chain where the reaction is to be inserted
[ "Added", "a", "IReaction", "for", "this", "chain", "in", "position", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/reaction/ReactionChain.java#L59-L62
114,175
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/reaction/ReactionChain.java
ReactionChain.getReaction
@Override public IReaction getReaction(int position) { if (!hashMapChain.containsValue(position)) return null; Set<Entry<IReaction, Integer>> entries = hashMapChain.entrySet(); for (Iterator<Entry<IReaction, Integer>> it = entries.iterator(); it.hasNext();) { Entry<IReaction, I...
java
@Override public IReaction getReaction(int position) { if (!hashMapChain.containsValue(position)) return null; Set<Entry<IReaction, Integer>> entries = hashMapChain.entrySet(); for (Iterator<Entry<IReaction, Integer>> it = entries.iterator(); it.hasNext();) { Entry<IReaction, I...
[ "@", "Override", "public", "IReaction", "getReaction", "(", "int", "position", ")", "{", "if", "(", "!", "hashMapChain", ".", "containsValue", "(", "position", ")", ")", "return", "null", ";", "Set", "<", "Entry", "<", "IReaction", ",", "Integer", ">", "...
Get the reaction of this chain reaction object at the position. @param position The position of the IReaction in this chain to look for @return Reaction The IReaction to look at
[ "Get", "the", "reaction", "of", "this", "chain", "reaction", "object", "at", "the", "position", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/reaction/ReactionChain.java#L84-L96
114,176
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java
ReactionSchemeManipulator.getAllAtomContainers
public static IAtomContainerSet getAllAtomContainers(IReactionScheme scheme) { return getAllAtomContainers(scheme, scheme.getBuilder().newInstance(IAtomContainerSet.class)); }
java
public static IAtomContainerSet getAllAtomContainers(IReactionScheme scheme) { return getAllAtomContainers(scheme, scheme.getBuilder().newInstance(IAtomContainerSet.class)); }
[ "public", "static", "IAtomContainerSet", "getAllAtomContainers", "(", "IReactionScheme", "scheme", ")", "{", "return", "getAllAtomContainers", "(", "scheme", ",", "scheme", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IAtomContainerSet", ".", "class", ")",...
get all AtomContainers object from a set of Reactions. @param scheme The scheme of reaction to inspect @return The IAtomContainerSet
[ "get", "all", "AtomContainers", "object", "from", "a", "set", "of", "Reactions", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java#L87-L89
114,177
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java
ReactionSchemeManipulator.getAllIDs
public static List<String> getAllIDs(IReactionScheme scheme) { List<String> IDlist = new ArrayList<String>(); if (scheme.getID() != null) IDlist.add(scheme.getID()); for (IReaction reaction : scheme.reactions()) { IDlist.addAll(ReactionManipulator.getAllIDs(reaction)); } ...
java
public static List<String> getAllIDs(IReactionScheme scheme) { List<String> IDlist = new ArrayList<String>(); if (scheme.getID() != null) IDlist.add(scheme.getID()); for (IReaction reaction : scheme.reactions()) { IDlist.addAll(ReactionManipulator.getAllIDs(reaction)); } ...
[ "public", "static", "List", "<", "String", ">", "getAllIDs", "(", "IReactionScheme", "scheme", ")", "{", "List", "<", "String", ">", "IDlist", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "if", "(", "scheme", ".", "getID", "(", ")", "!...
Get all ID of this IReactionSet. @param scheme The IReactionScheme to analyze @return A List with all ID
[ "Get", "all", "ID", "of", "this", "IReactionSet", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java#L97-L107
114,178
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java
ReactionSchemeManipulator.getAllReactions
public static IReactionSet getAllReactions(IReactionScheme scheme) { IReactionSet reactionSet = scheme.getBuilder().newInstance(IReactionSet.class); // A ReactionScheme can contain other IRreactionSet objects if (scheme.getReactionSchemeCount() != 0) for (IReactionScheme schemeInt : scheme.reac...
java
public static IReactionSet getAllReactions(IReactionScheme scheme) { IReactionSet reactionSet = scheme.getBuilder().newInstance(IReactionSet.class); // A ReactionScheme can contain other IRreactionSet objects if (scheme.getReactionSchemeCount() != 0) for (IReactionScheme schemeInt : scheme.reac...
[ "public", "static", "IReactionSet", "getAllReactions", "(", "IReactionScheme", "scheme", ")", "{", "IReactionSet", "reactionSet", "=", "scheme", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IReactionSet", ".", "class", ")", ";", "// A ReactionScheme can co...
Get all IReaction's object from a given IReactionScheme. @param scheme The IReactionScheme to extract @return The IReactionSet
[ "Get", "all", "IReaction", "s", "object", "from", "a", "given", "IReactionScheme", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java#L115-L127
114,179
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java
ReactionSchemeManipulator.createReactionScheme
public static IReactionScheme createReactionScheme(IReactionSet reactionSet) { IReactionScheme reactionScheme = reactionSet.getBuilder().newInstance(IReactionScheme.class); // Looking for those reactants which doesn't have any precursor. They are the top. ArrayList<IReaction> listTopR = new Arr...
java
public static IReactionScheme createReactionScheme(IReactionSet reactionSet) { IReactionScheme reactionScheme = reactionSet.getBuilder().newInstance(IReactionScheme.class); // Looking for those reactants which doesn't have any precursor. They are the top. ArrayList<IReaction> listTopR = new Arr...
[ "public", "static", "IReactionScheme", "createReactionScheme", "(", "IReactionSet", "reactionSet", ")", "{", "IReactionScheme", "reactionScheme", "=", "reactionSet", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IReactionScheme", ".", "class", ")", ";", "//...
Create a IReactionScheme give a IReactionSet object. @param reactionSet The IReactionSet @return The IReactionScheme
[ "Create", "a", "IReactionScheme", "give", "a", "IReactionSet", "object", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java#L135-L151
114,180
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java
ReactionSchemeManipulator.extractTopReactions
public static IReactionSet extractTopReactions(IReactionScheme reactionScheme) { IReactionSet reactionSet = reactionScheme.getBuilder().newInstance(IReactionSet.class); IReactionSet allSet = getAllReactions(reactionScheme); for (IReaction reaction : allSet.reactions()) { IReactionSe...
java
public static IReactionSet extractTopReactions(IReactionScheme reactionScheme) { IReactionSet reactionSet = reactionScheme.getBuilder().newInstance(IReactionSet.class); IReactionSet allSet = getAllReactions(reactionScheme); for (IReaction reaction : allSet.reactions()) { IReactionSe...
[ "public", "static", "IReactionSet", "extractTopReactions", "(", "IReactionScheme", "reactionScheme", ")", "{", "IReactionSet", "reactionSet", "=", "reactionScheme", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IReactionSet", ".", "class", ")", ";", "IReact...
Extract a set of Reactions which are in top of a IReactionScheme. The top reactions are those which any of their reactants are participating in other reactions as a products. @param reactionScheme The IReactionScheme @return The set of top reactions
[ "Extract", "a", "set", "of", "Reactions", "which", "are", "in", "top", "of", "a", "IReactionScheme", ".", "The", "top", "reactions", "are", "those", "which", "any", "of", "their", "reactants", "are", "participating", "in", "other", "reactions", "as", "a", ...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java#L160-L176
114,181
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java
ReactionSchemeManipulator.setScheme
private static IReactionScheme setScheme(IReaction reaction, IReactionSet reactionSet) { IReactionScheme reactionScheme = reaction.getBuilder().newInstance(IReactionScheme.class); IReactionSet reactConSet = extractSubsequentReaction(reaction, reactionSet); if (reactConSet.getReactionCount() != ...
java
private static IReactionScheme setScheme(IReaction reaction, IReactionSet reactionSet) { IReactionScheme reactionScheme = reaction.getBuilder().newInstance(IReactionScheme.class); IReactionSet reactConSet = extractSubsequentReaction(reaction, reactionSet); if (reactConSet.getReactionCount() != ...
[ "private", "static", "IReactionScheme", "setScheme", "(", "IReaction", "reaction", ",", "IReactionSet", "reactionSet", ")", "{", "IReactionScheme", "reactionScheme", "=", "reaction", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IReactionScheme", ".", "clas...
Create a IReactionScheme given as a top a IReaction. If it doesn't exist any subsequent reaction return null; @param reaction The IReaction as a top @param reactionSet The IReactionSet to extract a IReactionScheme @return The IReactionScheme
[ "Create", "a", "IReactionScheme", "given", "as", "a", "top", "a", "IReaction", ".", "If", "it", "doesn", "t", "exist", "any", "subsequent", "reaction", "return", "null", ";" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java#L186-L200
114,182
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java
ReactionSchemeManipulator.extractPrecursorReaction
private static IReactionSet extractPrecursorReaction(IReaction reaction, IReactionSet reactionSet) { IReactionSet reactConSet = reaction.getBuilder().newInstance(IReactionSet.class); for (IAtomContainer reactant : reaction.getReactants().atomContainers()) { for (IReaction reactionInt : react...
java
private static IReactionSet extractPrecursorReaction(IReaction reaction, IReactionSet reactionSet) { IReactionSet reactConSet = reaction.getBuilder().newInstance(IReactionSet.class); for (IAtomContainer reactant : reaction.getReactants().atomContainers()) { for (IReaction reactionInt : react...
[ "private", "static", "IReactionSet", "extractPrecursorReaction", "(", "IReaction", "reaction", ",", "IReactionSet", "reactionSet", ")", "{", "IReactionSet", "reactConSet", "=", "reaction", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IReactionSet", ".", "c...
Extract reactions from a IReactionSet which at least one product is existing as reactant given a IReaction @param reaction The IReaction to analyze @param reactionSet The IReactionSet to inspect @return A IReactionSet containing the reactions
[ "Extract", "reactions", "from", "a", "IReactionSet", "which", "at", "least", "one", "product", "is", "existing", "as", "reactant", "given", "a", "IReaction" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java#L210-L222
114,183
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java
ReactionSchemeManipulator.getAtomContainerSet
public static ArrayList<IAtomContainerSet> getAtomContainerSet(IAtomContainer origenMol, IAtomContainer finalMol, IReactionScheme reactionScheme) { ArrayList<IAtomContainerSet> listPath = new ArrayList<IAtomContainerSet>(); IReactionSet reactionSet = getAllReactions(reactionScheme); ...
java
public static ArrayList<IAtomContainerSet> getAtomContainerSet(IAtomContainer origenMol, IAtomContainer finalMol, IReactionScheme reactionScheme) { ArrayList<IAtomContainerSet> listPath = new ArrayList<IAtomContainerSet>(); IReactionSet reactionSet = getAllReactions(reactionScheme); ...
[ "public", "static", "ArrayList", "<", "IAtomContainerSet", ">", "getAtomContainerSet", "(", "IAtomContainer", "origenMol", ",", "IAtomContainer", "finalMol", ",", "IReactionScheme", "reactionScheme", ")", "{", "ArrayList", "<", "IAtomContainerSet", ">", "listPath", "=",...
Extract the list of AtomContainers taking part in the IReactionScheme to originate a product given a reactant. @param origenMol The start IAtomContainer @param finalMol The end IAtomContainer @param reactionScheme The IReactionScheme containing the AtomContainers @return A ...
[ "Extract", "the", "list", "of", "AtomContainers", "taking", "part", "in", "the", "IReactionScheme", "to", "originate", "a", "product", "given", "a", "reactant", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java#L255-L298
114,184
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePatternSimilarity.java
IsotopePatternSimilarity.compare
public double compare(IsotopePattern isoto1, IsotopePattern isoto2) { IsotopePattern iso1 = IsotopePatternManipulator.sortAndNormalizedByIntensity(isoto1); IsotopePattern iso2 = IsotopePatternManipulator.sortAndNormalizedByIntensity(isoto2); /* charge to add */ if (isoto1.getCharge() =...
java
public double compare(IsotopePattern isoto1, IsotopePattern isoto2) { IsotopePattern iso1 = IsotopePatternManipulator.sortAndNormalizedByIntensity(isoto1); IsotopePattern iso2 = IsotopePatternManipulator.sortAndNormalizedByIntensity(isoto2); /* charge to add */ if (isoto1.getCharge() =...
[ "public", "double", "compare", "(", "IsotopePattern", "isoto1", ",", "IsotopePattern", "isoto2", ")", "{", "IsotopePattern", "iso1", "=", "IsotopePatternManipulator", ".", "sortAndNormalizedByIntensity", "(", "isoto1", ")", ";", "IsotopePattern", "iso2", "=", "Isotope...
Compare the IMolecularFormula with a isotope abundance pattern. @param isoto1 The Isotope pattern reference (predicted) @param isoto2 The Isotope pattern reference (detected) @return The hit score of similarity
[ "Compare", "the", "IMolecularFormula", "with", "a", "isotope", "abundance", "pattern", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePatternSimilarity.java#L52-L101
114,185
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePatternSimilarity.java
IsotopePatternSimilarity.getClosestDataDiff
private int getClosestDataDiff(IsotopeContainer isoContainer, IsotopePattern pattern) { double diff = 100; int posi = -1; for (int i = 0; i < pattern.getNumberOfIsotopes(); i++) { double tempDiff = Math.abs((isoContainer.getMass()) - pattern.getIsotopes().get(i).getMass()); ...
java
private int getClosestDataDiff(IsotopeContainer isoContainer, IsotopePattern pattern) { double diff = 100; int posi = -1; for (int i = 0; i < pattern.getNumberOfIsotopes(); i++) { double tempDiff = Math.abs((isoContainer.getMass()) - pattern.getIsotopes().get(i).getMass()); ...
[ "private", "int", "getClosestDataDiff", "(", "IsotopeContainer", "isoContainer", ",", "IsotopePattern", "pattern", ")", "{", "double", "diff", "=", "100", ";", "int", "posi", "=", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "pattern",...
Search and find the closest difference in an array in terms of mass and intensity. Always return the position in this List. @param diffValue The difference to look for @param normMass A List of normalized masses @return The position in the List
[ "Search", "and", "find", "the", "closest", "difference", "in", "an", "array", "in", "terms", "of", "mass", "and", "intensity", ".", "Always", "return", "the", "position", "in", "this", "List", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePatternSimilarity.java#L111-L123
114,186
cdk/cdk
descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/SubstructureFingerprinter.java
SubstructureFingerprinter.setSmarts
private void setSmarts(String[] smarts) { keys.clear(); for (String key : smarts) { QueryAtomContainer qmol = new QueryAtomContainer(null); SmartsPattern ptrn = null; ptrn = SmartsPattern.create(key); ptrn.setPrepare(false); // prepare is done once ...
java
private void setSmarts(String[] smarts) { keys.clear(); for (String key : smarts) { QueryAtomContainer qmol = new QueryAtomContainer(null); SmartsPattern ptrn = null; ptrn = SmartsPattern.create(key); ptrn.setPrepare(false); // prepare is done once ...
[ "private", "void", "setSmarts", "(", "String", "[", "]", "smarts", ")", "{", "keys", ".", "clear", "(", ")", ";", "for", "(", "String", "key", ":", "smarts", ")", "{", "QueryAtomContainer", "qmol", "=", "new", "QueryAtomContainer", "(", "null", ")", ";...
Set the SMARTS patterns. @param smarts the SMARTS
[ "Set", "the", "SMARTS", "patterns", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/SubstructureFingerprinter.java#L411-L420
114,187
cdk/cdk
base/data/src/main/java/org/openscience/cdk/Polymer.java
Polymer.addAtom
@Override public void addAtom(IAtom oAtom, IMonomer oMonomer) { if (!contains(oAtom)) { super.addAtom(oAtom); if (oMonomer != null) { // Not sure what's better here...throw nullpointer exception? oMonomer.addAtom(oAtom); if (!monomers.containsKey(oMo...
java
@Override public void addAtom(IAtom oAtom, IMonomer oMonomer) { if (!contains(oAtom)) { super.addAtom(oAtom); if (oMonomer != null) { // Not sure what's better here...throw nullpointer exception? oMonomer.addAtom(oAtom); if (!monomers.containsKey(oMo...
[ "@", "Override", "public", "void", "addAtom", "(", "IAtom", "oAtom", ",", "IMonomer", "oMonomer", ")", "{", "if", "(", "!", "contains", "(", "oAtom", ")", ")", "{", "super", ".", "addAtom", "(", "oAtom", ")", ";", "if", "(", "oMonomer", "!=", "null",...
Adds the atom oAtom to a specified Monomer. @param oAtom The atom to add @param oMonomer The monomer the atom belongs to
[ "Adds", "the", "atom", "oAtom", "to", "a", "specified", "Monomer", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Polymer.java#L79-L95
114,188
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/CorrectGeometricConfiguration.java
CorrectGeometricConfiguration.adjust
private void adjust(ExtendedCisTrans elem) { IBond middle = elem.getFocus(); IAtom[] ends = ExtendedCisTrans.findTerminalAtoms(container, middle); IBond[] bonds = elem.getCarriers().toArray(new IBond[2]); IAtom left = ends[0]; IAtom right = ends[1]; int p = parit...
java
private void adjust(ExtendedCisTrans elem) { IBond middle = elem.getFocus(); IAtom[] ends = ExtendedCisTrans.findTerminalAtoms(container, middle); IBond[] bonds = elem.getCarriers().toArray(new IBond[2]); IAtom left = ends[0]; IAtom right = ends[1]; int p = parit...
[ "private", "void", "adjust", "(", "ExtendedCisTrans", "elem", ")", "{", "IBond", "middle", "=", "elem", ".", "getFocus", "(", ")", ";", "IAtom", "[", "]", "ends", "=", "ExtendedCisTrans", ".", "findTerminalAtoms", "(", "container", ",", "middle", ")", ";",...
Adjust the configuration of the cumulated double bonds to be either Cis or Trans. @param elem the stereo element to adjust
[ "Adjust", "the", "configuration", "of", "the", "cumulated", "double", "bonds", "to", "be", "either", "Cis", "or", "Trans", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/CorrectGeometricConfiguration.java#L174-L212
114,189
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/CorrectGeometricConfiguration.java
CorrectGeometricConfiguration.getAtoms
private IAtom[] getAtoms(IAtom focus, IAtom substituent, IAtom otherFocus) { IAtom otherSubstituent = focus; for (int w : graph[atomToIndex.get(focus)]) { IAtom atom = container.getAtom(w); if (!atom.equals(substituent) && !atom.equals(otherFocus)) otherSubstituent = atom; ...
java
private IAtom[] getAtoms(IAtom focus, IAtom substituent, IAtom otherFocus) { IAtom otherSubstituent = focus; for (int w : graph[atomToIndex.get(focus)]) { IAtom atom = container.getAtom(w); if (!atom.equals(substituent) && !atom.equals(otherFocus)) otherSubstituent = atom; ...
[ "private", "IAtom", "[", "]", "getAtoms", "(", "IAtom", "focus", ",", "IAtom", "substituent", ",", "IAtom", "otherFocus", ")", "{", "IAtom", "otherSubstituent", "=", "focus", ";", "for", "(", "int", "w", ":", "graph", "[", "atomToIndex", ".", "get", "(",...
Create an array of three atoms for a side of the double bond. This is used to determine the 'winding' of one side of the double bond. @param focus a double bonded atom @param substituent the substituent we know the configuration of @param otherFocus the other focus (i.e. the atom focus is double bonded to) @ret...
[ "Create", "an", "array", "of", "three", "atoms", "for", "a", "side", "of", "the", "double", "bond", ".", "This", "is", "used", "to", "determine", "the", "winding", "of", "one", "side", "of", "the", "double", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/CorrectGeometricConfiguration.java#L226-L233
114,190
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/CorrectGeometricConfiguration.java
CorrectGeometricConfiguration.parity
private static int parity(Point2d a, Point2d b, Point2d c) { double det = (a.x - c.x) * (b.y - c.y) - (a.y - c.y) * (b.x - c.x); return (int) Math.signum(det); }
java
private static int parity(Point2d a, Point2d b, Point2d c) { double det = (a.x - c.x) * (b.y - c.y) - (a.y - c.y) * (b.x - c.x); return (int) Math.signum(det); }
[ "private", "static", "int", "parity", "(", "Point2d", "a", ",", "Point2d", "b", ",", "Point2d", "c", ")", "{", "double", "det", "=", "(", "a", ".", "x", "-", "c", ".", "x", ")", "*", "(", "b", ".", "y", "-", "c", ".", "y", ")", "-", "(", ...
Determine the parity of the triangle formed by the 3 coordinates a, b and c. @param a point 1 @param b point 2 @param c point 3 @return the parity of the triangle formed by 3 points
[ "Determine", "the", "parity", "of", "the", "triangle", "formed", "by", "the", "3", "coordinates", "a", "b", "and", "c", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/CorrectGeometricConfiguration.java#L273-L276
114,191
cdk/cdk
descriptor/signature/src/main/java/org/openscience/cdk/signature/MoleculeSignature.java
MoleculeSignature.calculateOrbits
public List<Orbit> calculateOrbits() { List<Orbit> orbits = new ArrayList<Orbit>(); List<SymmetryClass> symmetryClasses = super.getSymmetryClasses(); for (SymmetryClass symmetryClass : symmetryClasses) { Orbit orbit = new Orbit(symmetryClass.getSignatureString(), -1); for...
java
public List<Orbit> calculateOrbits() { List<Orbit> orbits = new ArrayList<Orbit>(); List<SymmetryClass> symmetryClasses = super.getSymmetryClasses(); for (SymmetryClass symmetryClass : symmetryClasses) { Orbit orbit = new Orbit(symmetryClass.getSignatureString(), -1); for...
[ "public", "List", "<", "Orbit", ">", "calculateOrbits", "(", ")", "{", "List", "<", "Orbit", ">", "orbits", "=", "new", "ArrayList", "<", "Orbit", ">", "(", ")", ";", "List", "<", "SymmetryClass", ">", "symmetryClasses", "=", "super", ".", "getSymmetryCl...
Calculates the orbits of the atoms of the molecule. @return a list of orbits
[ "Calculates", "the", "orbits", "of", "the", "atoms", "of", "the", "molecule", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/signature/src/main/java/org/openscience/cdk/signature/MoleculeSignature.java#L158-L169
114,192
cdk/cdk
descriptor/signature/src/main/java/org/openscience/cdk/signature/MoleculeSignature.java
MoleculeSignature.toCanonicalSignatureString
public String toCanonicalSignatureString(int height) { String canonicalSignature = null; for (int i = 0; i < getVertexCount(); i++) { String signatureForI = signatureStringForVertex(i, height); if (canonicalSignature == null || canonicalSignature.compareTo(signatureForI) < 0) { ...
java
public String toCanonicalSignatureString(int height) { String canonicalSignature = null; for (int i = 0; i < getVertexCount(); i++) { String signatureForI = signatureStringForVertex(i, height); if (canonicalSignature == null || canonicalSignature.compareTo(signatureForI) < 0) { ...
[ "public", "String", "toCanonicalSignatureString", "(", "int", "height", ")", "{", "String", "canonicalSignature", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getVertexCount", "(", ")", ";", "i", "++", ")", "{", "String", "signatur...
Make a canonical signature string of a given height. @param height the maximum height to make signatures @return the canonical signature string
[ "Make", "a", "canonical", "signature", "string", "of", "a", "given", "height", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/signature/src/main/java/org/openscience/cdk/signature/MoleculeSignature.java#L192-L201
114,193
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/Association.java
Association.getAtoms
public IAtom[] getAtoms() { IAtom[] returnAtoms = new Atom[atomCount]; System.arraycopy(this.atoms, 0, returnAtoms, 0, returnAtoms.length); return returnAtoms; }
java
public IAtom[] getAtoms() { IAtom[] returnAtoms = new Atom[atomCount]; System.arraycopy(this.atoms, 0, returnAtoms, 0, returnAtoms.length); return returnAtoms; }
[ "public", "IAtom", "[", "]", "getAtoms", "(", ")", "{", "IAtom", "[", "]", "returnAtoms", "=", "new", "Atom", "[", "atomCount", "]", ";", "System", ".", "arraycopy", "(", "this", ".", "atoms", ",", "0", ",", "returnAtoms", ",", "0", ",", "returnAtoms...
Returns the array of atoms making up this Association. @return An array of atoms participating in this Association @see #setAtoms
[ "Returns", "the", "array", "of", "atoms", "making", "up", "this", "Association", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/Association.java#L84-L88
114,194
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/Association.java
Association.contains
public boolean contains(IAtom atom) { for (int i = 0; i < atomCount; i++) { if (atoms[i].equals(atom)) { return true; } } return false; }
java
public boolean contains(IAtom atom) { for (int i = 0; i < atomCount; i++) { if (atoms[i].equals(atom)) { return true; } } return false; }
[ "public", "boolean", "contains", "(", "IAtom", "atom", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "atomCount", ";", "i", "++", ")", "{", "if", "(", "atoms", "[", "i", "]", ".", "equals", "(", "atom", ")", ")", "{", "return", "...
Returns true if the given atom participates in this Association. @param atom The atom to be tested if it participates in this Association @return true if the atom participates in this Association
[ "Returns", "true", "if", "the", "given", "atom", "participates", "in", "this", "Association", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/Association.java#L140-L147
114,195
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/elements/TextGroupElement.java
TextGroupElement.addChild
public void addChild(String text, Position position) { this.children.add(new Child(text, position)); }
java
public void addChild(String text, Position position) { this.children.add(new Child(text, position)); }
[ "public", "void", "addChild", "(", "String", "text", ",", "Position", "position", ")", "{", "this", ".", "children", ".", "add", "(", "new", "Child", "(", "text", ",", "position", ")", ")", ";", "}" ]
Add a child text element. @param text the child text to add @param position the position of the child relative to this parent
[ "Add", "a", "child", "text", "element", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/elements/TextGroupElement.java#L117-L119
114,196
cdk/cdk
descriptor/qsarbond/src/main/java/org/openscience/cdk/qsar/descriptors/bond/BondPartialSigmaChargeDescriptor.java
BondPartialSigmaChargeDescriptor.getParameters
@Override public Object[] getParameters() { // return the parameters as used for the descriptor calculation Object[] params = new Object[1]; params[0] = (Integer) maxIterations; return params; }
java
@Override public Object[] getParameters() { // return the parameters as used for the descriptor calculation Object[] params = new Object[1]; params[0] = (Integer) maxIterations; return params; }
[ "@", "Override", "public", "Object", "[", "]", "getParameters", "(", ")", "{", "// return the parameters as used for the descriptor calculation", "Object", "[", "]", "params", "=", "new", "Object", "[", "1", "]", ";", "params", "[", "0", "]", "=", "(", "Intege...
Gets the parameters attribute of the BondPartialSigmaChargeDescriptor object. @return The parameters value @see #setParameters
[ "Gets", "the", "parameters", "attribute", "of", "the", "BondPartialSigmaChargeDescriptor", "object", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarbond/src/main/java/org/openscience/cdk/qsar/descriptors/bond/BondPartialSigmaChargeDescriptor.java#L106-L112
114,197
cdk/cdk
descriptor/qsarbond/src/main/java/org/openscience/cdk/qsar/descriptors/bond/BondPartialSigmaChargeDescriptor.java
BondPartialSigmaChargeDescriptor.calculate
@Override public DescriptorValue calculate(IBond bond, IAtomContainer ac) { // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method Double originalCharge1 = bond.getBegin().getCharge(); Double originalCharge2 = bond.getEnd().getCharge(); ...
java
@Override public DescriptorValue calculate(IBond bond, IAtomContainer ac) { // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method Double originalCharge1 = bond.getBegin().getCharge(); Double originalCharge2 = bond.getEnd().getCharge(); ...
[ "@", "Override", "public", "DescriptorValue", "calculate", "(", "IBond", "bond", ",", "IAtomContainer", "ac", ")", "{", "// FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method", "Double", "originalCharge1", "=", "bond", ".", "g...
The method calculates the bond-sigma Partial charge of a given bond It is needed to call the addExplicitHydrogensToSatisfyValency method from the class tools.HydrogenAdder. @param ac AtomContainer @return return the sigma electronegativity
[ "The", "method", "calculates", "the", "bond", "-", "sigma", "Partial", "charge", "of", "a", "given", "bond", "It", "is", "needed", "to", "call", "the", "addExplicitHydrogensToSatisfyValency", "method", "from", "the", "class", "tools", ".", "HydrogenAdder", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarbond/src/main/java/org/openscience/cdk/qsar/descriptors/bond/BondPartialSigmaChargeDescriptor.java#L131-L154
114,198
cdk/cdk
descriptor/qsarbond/src/main/java/org/openscience/cdk/qsar/descriptors/bond/BondPartialSigmaChargeDescriptor.java
BondPartialSigmaChargeDescriptor.getParameterType
@Override public Object getParameterType(String name) { if ("maxIterations".equals(name)) return Integer.MAX_VALUE; return null; }
java
@Override public Object getParameterType(String name) { if ("maxIterations".equals(name)) return Integer.MAX_VALUE; return null; }
[ "@", "Override", "public", "Object", "getParameterType", "(", "String", "name", ")", "{", "if", "(", "\"maxIterations\"", ".", "equals", "(", "name", ")", ")", "return", "Integer", ".", "MAX_VALUE", ";", "return", "null", ";", "}" ]
Gets the parameterType attribute of the BondPartialSigmaChargeDescriptor object. @param name Description of the Parameter @return An Object of class equal to that of the parameter being requested
[ "Gets", "the", "parameterType", "attribute", "of", "the", "BondPartialSigmaChargeDescriptor", "object", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarbond/src/main/java/org/openscience/cdk/qsar/descriptors/bond/BondPartialSigmaChargeDescriptor.java#L174-L178
114,199
cdk/cdk
base/core/src/main/java/org/openscience/cdk/atomtype/CDKAtomTypeMatcher.java
CDKAtomTypeMatcher.heavyBonds
private List<IBond> heavyBonds(final List<IBond> bonds) { final List<IBond> heavy = new ArrayList<IBond>(bonds.size()); for (final IBond bond : bonds) { if (!(bond.getBegin().getSymbol().equals("H") && bond.getEnd().getSymbol().equals("H"))) { heavy.add(bond); } ...
java
private List<IBond> heavyBonds(final List<IBond> bonds) { final List<IBond> heavy = new ArrayList<IBond>(bonds.size()); for (final IBond bond : bonds) { if (!(bond.getBegin().getSymbol().equals("H") && bond.getEnd().getSymbol().equals("H"))) { heavy.add(bond); } ...
[ "private", "List", "<", "IBond", ">", "heavyBonds", "(", "final", "List", "<", "IBond", ">", "bonds", ")", "{", "final", "List", "<", "IBond", ">", "heavy", "=", "new", "ArrayList", "<", "IBond", ">", "(", "bonds", ".", "size", "(", ")", ")", ";", ...
Filter a bond list keeping only bonds between heavy atoms. @param bonds a list of bond @return the bond list only with heavy bonds
[ "Filter", "a", "bond", "list", "keeping", "only", "bonds", "between", "heavy", "atoms", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/atomtype/CDKAtomTypeMatcher.java#L1063-L1071