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
113,900
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IPAtomicHOSEDescriptor.java
IPAtomicHOSEDescriptor.calculate
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer container) { double value; // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method String originalAtomtypeName = atom.getAtomTypeName(); Integer originalNeighborCou...
java
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer container) { double value; // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method String originalAtomtypeName = atom.getAtomTypeName(); Integer originalNeighborCou...
[ "@", "Override", "public", "DescriptorValue", "calculate", "(", "IAtom", "atom", ",", "IAtomContainer", "container", ")", "{", "double", "value", ";", "// FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method", "String", "originalA...
This method calculates the ionization potential of an atom. @param atom The IAtom to ionize. @param container Parameter is the IAtomContainer. @return The ionization potential. Not possible the ionization.
[ "This", "method", "calculates", "the", "ionization", "potential", "of", "an", "atom", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IPAtomicHOSEDescriptor.java#L126-L160
113,901
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IPAtomicHOSEDescriptor.java
IPAtomicHOSEDescriptor.familyHalogen
private boolean familyHalogen(IAtom atom) { String symbol = atom.getSymbol(); return symbol.equals("F") || symbol.equals("Cl") || symbol.equals("Br") || symbol.equals("I"); }
java
private boolean familyHalogen(IAtom atom) { String symbol = atom.getSymbol(); return symbol.equals("F") || symbol.equals("Cl") || symbol.equals("Br") || symbol.equals("I"); }
[ "private", "boolean", "familyHalogen", "(", "IAtom", "atom", ")", "{", "String", "symbol", "=", "atom", ".", "getSymbol", "(", ")", ";", "return", "symbol", ".", "equals", "(", "\"F\"", ")", "||", "symbol", ".", "equals", "(", "\"Cl\"", ")", "||", "sym...
Looking if the Atom belongs to the halogen family. @param atom The IAtom @return True, if it belongs
[ "Looking", "if", "the", "Atom", "belongs", "to", "the", "halogen", "family", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IPAtomicHOSEDescriptor.java#L168-L171
113,902
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IPAtomicHOSEDescriptor.java
IPAtomicHOSEDescriptor.extractInfo
private static List<String> extractInfo(String str) { int beg = 0; int end = 0; int len = str.length(); List<String> parts = new ArrayList<>(); while (end < len && !Character.isSpaceChar(str.charAt(end))) end++; parts.add(str.substring(beg,end)); while...
java
private static List<String> extractInfo(String str) { int beg = 0; int end = 0; int len = str.length(); List<String> parts = new ArrayList<>(); while (end < len && !Character.isSpaceChar(str.charAt(end))) end++; parts.add(str.substring(beg,end)); while...
[ "private", "static", "List", "<", "String", ">", "extractInfo", "(", "String", "str", ")", "{", "int", "beg", "=", "0", ";", "int", "end", "=", "0", ";", "int", "len", "=", "str", ".", "length", "(", ")", ";", "List", "<", "String", ">", "parts",...
Extract the information from a line which contains HOSE_ID & energy. @param str String with the information @return List with String = HOSECode and String = energy
[ "Extract", "the", "information", "from", "a", "line", "which", "contains", "HOSE_ID", "&", "energy", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IPAtomicHOSEDescriptor.java#L329-L344
113,903
cdk/cdk
base/silent/src/main/java/org/openscience/cdk/silent/FragmentAtom.java
FragmentAtom.getExactMass
@Override public Double getExactMass() { double totalMass = 0.0; for (IAtom atom : fragment.atoms()) { totalMass += atom.getExactMass(); } return totalMass; }
java
@Override public Double getExactMass() { double totalMass = 0.0; for (IAtom atom : fragment.atoms()) { totalMass += atom.getExactMass(); } return totalMass; }
[ "@", "Override", "public", "Double", "getExactMass", "(", ")", "{", "double", "totalMass", "=", "0.0", ";", "for", "(", "IAtom", "atom", ":", "fragment", ".", "atoms", "(", ")", ")", "{", "totalMass", "+=", "atom", ".", "getExactMass", "(", ")", ";", ...
The exact mass of an FragmentAtom is defined as the sum of exact masses of the IAtom's in the fragment.
[ "The", "exact", "mass", "of", "an", "FragmentAtom", "is", "defined", "as", "the", "sum", "of", "exact", "masses", "of", "the", "IAtom", "s", "in", "the", "fragment", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/FragmentAtom.java#L79-L86
113,904
cdk/cdk
base/data/src/main/java/org/openscience/cdk/Element.java
Element.getSymbol
@Override public String getSymbol() { if (atomicNumber == null) return null; if (atomicNumber == 0) return "R"; return Elements.ofNumber(atomicNumber).symbol(); }
java
@Override public String getSymbol() { if (atomicNumber == null) return null; if (atomicNumber == 0) return "R"; return Elements.ofNumber(atomicNumber).symbol(); }
[ "@", "Override", "public", "String", "getSymbol", "(", ")", "{", "if", "(", "atomicNumber", "==", "null", ")", "return", "null", ";", "if", "(", "atomicNumber", "==", "0", ")", "return", "\"R\"", ";", "return", "Elements", ".", "ofNumber", "(", "atomicNu...
Returns the element symbol of this element. @return The element symbol of this element. Null if unset. @see #setSymbol
[ "Returns", "the", "element", "symbol", "of", "this", "element", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Element.java#L150-L157
113,905
cdk/cdk
base/data/src/main/java/org/openscience/cdk/Element.java
Element.compare
@Override public boolean compare(Object object) { if (!(object instanceof Element)) { return false; } if (!super.compare(object)) { return false; } Element elem = (Element) object; return Objects.equal(atomicNumber, elem.atomicNumber); }
java
@Override public boolean compare(Object object) { if (!(object instanceof Element)) { return false; } if (!super.compare(object)) { return false; } Element elem = (Element) object; return Objects.equal(atomicNumber, elem.atomicNumber); }
[ "@", "Override", "public", "boolean", "compare", "(", "Object", "object", ")", "{", "if", "(", "!", "(", "object", "instanceof", "Element", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "super", ".", "compare", "(", "object", ")", ")", ...
Compares an Element with this Element. @param object Object of type AtomType @return true if the atom types are equal
[ "Compares", "an", "Element", "with", "this", "Element", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Element.java#L207-L217
113,906
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/mcsplus/GenerateCompatibilityGraph.java
GenerateCompatibilityGraph.compatibilityGraphNodes
protected int compatibilityGraphNodes() throws IOException { compGraphNodes.clear(); List<IAtom> basicAtomVecA = null; List<IAtom> basicAtomVecB = null; IAtomContainer reactant = source; IAtomContainer product = target; basicAtomVecA = reduceAtomSet(reactant); b...
java
protected int compatibilityGraphNodes() throws IOException { compGraphNodes.clear(); List<IAtom> basicAtomVecA = null; List<IAtom> basicAtomVecB = null; IAtomContainer reactant = source; IAtomContainer product = target; basicAtomVecA = reduceAtomSet(reactant); b...
[ "protected", "int", "compatibilityGraphNodes", "(", ")", "throws", "IOException", "{", "compGraphNodes", ".", "clear", "(", ")", ";", "List", "<", "IAtom", ">", "basicAtomVecA", "=", "null", ";", "List", "<", "IAtom", ">", "basicAtomVecB", "=", "null", ";", ...
Generate Compatibility Graph Nodes @return @throws IOException
[ "Generate", "Compatibility", "Graph", "Nodes" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/mcsplus/GenerateCompatibilityGraph.java#L172-L202
113,907
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/mcsplus/GenerateCompatibilityGraph.java
GenerateCompatibilityGraph.compatibilityGraph
protected int compatibilityGraph() throws IOException { int compGraphNodesListSize = compGraphNodes.size(); cEdges = new ArrayList<Integer>(); //Initialize the cEdges List dEdges = new ArrayList<Integer>(); //Initialize the dEdges List for (int a = 0; a < compGraphNodesListSize; a += 3...
java
protected int compatibilityGraph() throws IOException { int compGraphNodesListSize = compGraphNodes.size(); cEdges = new ArrayList<Integer>(); //Initialize the cEdges List dEdges = new ArrayList<Integer>(); //Initialize the dEdges List for (int a = 0; a < compGraphNodesListSize; a += 3...
[ "protected", "int", "compatibilityGraph", "(", ")", "throws", "IOException", "{", "int", "compGraphNodesListSize", "=", "compGraphNodes", ".", "size", "(", ")", ";", "cEdges", "=", "new", "ArrayList", "<", "Integer", ">", "(", ")", ";", "//Initialize the cEdges ...
Generate Compatibility Graph Nodes Bond Insensitive @return @throws IOException
[ "Generate", "Compatibility", "Graph", "Nodes", "Bond", "Insensitive" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/mcsplus/GenerateCompatibilityGraph.java#L210-L241
113,908
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/mcsplus/GenerateCompatibilityGraph.java
GenerateCompatibilityGraph.compatibilityGraphNodesIfCEdgeIsZero
protected Integer compatibilityGraphNodesIfCEdgeIsZero() throws IOException { int countNodes = 1; List<String> map = new ArrayList<String>(); compGraphNodesCZero = new ArrayList<Integer>(); //Initialize the compGraphNodesCZero List LabelContainer labelContainer = LabelContainer.getInsta...
java
protected Integer compatibilityGraphNodesIfCEdgeIsZero() throws IOException { int countNodes = 1; List<String> map = new ArrayList<String>(); compGraphNodesCZero = new ArrayList<Integer>(); //Initialize the compGraphNodesCZero List LabelContainer labelContainer = LabelContainer.getInsta...
[ "protected", "Integer", "compatibilityGraphNodesIfCEdgeIsZero", "(", ")", "throws", "IOException", "{", "int", "countNodes", "=", "1", ";", "List", "<", "String", ">", "map", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "compGraphNodesCZero", "=...
compGraphNodesCZero is used to build up of the edges of the compatibility graph @return @throws IOException
[ "compGraphNodesCZero", "is", "used", "to", "build", "up", "of", "the", "edges", "of", "the", "compatibility", "graph" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/mcsplus/GenerateCompatibilityGraph.java#L259-L288
113,909
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/mcsplus/GenerateCompatibilityGraph.java
GenerateCompatibilityGraph.compatibilityGraphCEdgeZero
protected int compatibilityGraphCEdgeZero() throws IOException { int compGraphNodesCZeroListSize = compGraphNodesCZero.size(); cEdges = new ArrayList<Integer>(); //Initialize the cEdges List dEdges = new ArrayList<Integer>(); //Initialize the dEdges List for (int a = 0; a < compGraphNo...
java
protected int compatibilityGraphCEdgeZero() throws IOException { int compGraphNodesCZeroListSize = compGraphNodesCZero.size(); cEdges = new ArrayList<Integer>(); //Initialize the cEdges List dEdges = new ArrayList<Integer>(); //Initialize the dEdges List for (int a = 0; a < compGraphNo...
[ "protected", "int", "compatibilityGraphCEdgeZero", "(", ")", "throws", "IOException", "{", "int", "compGraphNodesCZeroListSize", "=", "compGraphNodesCZero", ".", "size", "(", ")", ";", "cEdges", "=", "new", "ArrayList", "<", "Integer", ">", "(", ")", ";", "//Ini...
compatibilityGraphCEdgeZero is used to build up of the edges of the compatibility graph BIS @return @throws IOException
[ "compatibilityGraphCEdgeZero", "is", "used", "to", "build", "up", "of", "the", "edges", "of", "the", "compatibility", "graph", "BIS" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/mcsplus/GenerateCompatibilityGraph.java#L297-L331
113,910
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java
ChiIndexUtils.evalSimpleIndex
public static double evalSimpleIndex(IAtomContainer atomContainer, List<List<Integer>> fragLists) { double sum = 0; for (List<Integer> fragList : fragLists) { double prod = 1.0; for (Integer atomSerial : fragList) { IAtom atom = atomContainer.getAtom(atomSerial); ...
java
public static double evalSimpleIndex(IAtomContainer atomContainer, List<List<Integer>> fragLists) { double sum = 0; for (List<Integer> fragList : fragLists) { double prod = 1.0; for (Integer atomSerial : fragList) { IAtom atom = atomContainer.getAtom(atomSerial); ...
[ "public", "static", "double", "evalSimpleIndex", "(", "IAtomContainer", "atomContainer", ",", "List", "<", "List", "<", "Integer", ">", ">", "fragLists", ")", "{", "double", "sum", "=", "0", ";", "for", "(", "List", "<", "Integer", ">", "fragList", ":", ...
Evaluates the simple chi index for a set of fragments. @param atomContainer The target <code>AtomContainer</code> @param fragLists A list of fragments @return The simple chi index
[ "Evaluates", "the", "simple", "chi", "index", "for", "a", "set", "of", "fragments", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java#L107-L119
113,911
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java
ChiIndexUtils.evalValenceIndex
public static double evalValenceIndex(IAtomContainer atomContainer, List<List<Integer>> fragList) throws CDKException { try { IsotopeFactory ifac = Isotopes.getInstance(); ifac.configureAtoms(atomContainer); } catch (IOException e) { throw new CDKException("IO problem...
java
public static double evalValenceIndex(IAtomContainer atomContainer, List<List<Integer>> fragList) throws CDKException { try { IsotopeFactory ifac = Isotopes.getInstance(); ifac.configureAtoms(atomContainer); } catch (IOException e) { throw new CDKException("IO problem...
[ "public", "static", "double", "evalValenceIndex", "(", "IAtomContainer", "atomContainer", ",", "List", "<", "List", "<", "Integer", ">", ">", "fragList", ")", "throws", "CDKException", "{", "try", "{", "IsotopeFactory", "ifac", "=", "Isotopes", ".", "getInstance...
Evaluates the valence corrected chi index for a set of fragments. This method takes into account the S and P atom types described in Kier & Hall (1986), page 20 for which empirical delta V values are used. @param atomContainer The target <code>AtomContainer</code> @param fragList A list of fragments @return The ...
[ "Evaluates", "the", "valence", "corrected", "chi", "index", "for", "a", "set", "of", "fragments", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java#L132-L177
113,912
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java
ChiIndexUtils.deltavSulphur
protected static double deltavSulphur(IAtom atom, IAtomContainer atomContainer) { if (!atom.getSymbol().equals("S")) return -1; // check whether it's a S in S-S List<IAtom> connected = atomContainer.getConnectedAtomsList(atom); for (IAtom connectedAtom : connected) { if (con...
java
protected static double deltavSulphur(IAtom atom, IAtomContainer atomContainer) { if (!atom.getSymbol().equals("S")) return -1; // check whether it's a S in S-S List<IAtom> connected = atomContainer.getConnectedAtomsList(atom); for (IAtom connectedAtom : connected) { if (con...
[ "protected", "static", "double", "deltavSulphur", "(", "IAtom", "atom", ",", "IAtomContainer", "atomContainer", ")", "{", "if", "(", "!", "atom", ".", "getSymbol", "(", ")", ".", "equals", "(", "\"S\"", ")", ")", "return", "-", "1", ";", "// check whether ...
Evaluates the empirical delt V for some S environments. The method checks to see whether a S atom is in a -S-S-, -SO-, -SO2- group and returns the empirical values noted in Kier & Hall (1986), page 20. @param atom The S atom in question @param atomContainer The molecule containing the S @return The empirical...
[ "Evaluates", "the", "empirical", "delt", "V", "for", "some", "S", "environments", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java#L196-L216
113,913
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java
ChiIndexUtils.deltavPhosphorous
private static double deltavPhosphorous(IAtom atom, IAtomContainer atomContainer) { if (!atom.getSymbol().equals("P")) return -1; List<IAtom> connected = atomContainer.getConnectedAtomsList(atom); int conditions = 0; if (connected.size() == 4) conditions++; for (IAtom connecte...
java
private static double deltavPhosphorous(IAtom atom, IAtomContainer atomContainer) { if (!atom.getSymbol().equals("P")) return -1; List<IAtom> connected = atomContainer.getConnectedAtomsList(atom); int conditions = 0; if (connected.size() == 4) conditions++; for (IAtom connecte...
[ "private", "static", "double", "deltavPhosphorous", "(", "IAtom", "atom", ",", "IAtomContainer", "atomContainer", ")", "{", "if", "(", "!", "atom", ".", "getSymbol", "(", ")", ".", "equals", "(", "\"P\"", ")", ")", "return", "-", "1", ";", "List", "<", ...
Checks whether the P atom is in a PO environment. This environment is noted in Kier & Hall (1986), page 20 @param atom The P atom in question @param atomContainer The molecule containing the P atom @return The empirical delta V if present in the above environment, -1 otherwise
[ "Checks", "whether", "the", "P", "atom", "is", "in", "a", "PO", "environment", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java#L228-L243
113,914
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java
ChiIndexUtils.getUniqueBondSubgraphs
private static List<List<Integer>> getUniqueBondSubgraphs(List<List<RMap>> subgraphs, IAtomContainer ac) { List<List<Integer>> bondList = new ArrayList<List<Integer>>(); for (List<RMap> subgraph : subgraphs) { List<RMap> current = subgraph; List<Integer> ids = new ArrayList<Integ...
java
private static List<List<Integer>> getUniqueBondSubgraphs(List<List<RMap>> subgraphs, IAtomContainer ac) { List<List<Integer>> bondList = new ArrayList<List<Integer>>(); for (List<RMap> subgraph : subgraphs) { List<RMap> current = subgraph; List<Integer> ids = new ArrayList<Integ...
[ "private", "static", "List", "<", "List", "<", "Integer", ">", ">", "getUniqueBondSubgraphs", "(", "List", "<", "List", "<", "RMap", ">", ">", "subgraphs", ",", "IAtomContainer", "ac", ")", "{", "List", "<", "List", "<", "Integer", ">>", "bondList", "=",...
Converts a set of bond mappings to a unique set of atom paths. This method accepts a <code>List</code> of bond mappings. It first reduces the set to a unique set of bond maps and then for each bond map converts it to a series of atoms making up the bonds. @param subgraphs A <code>List</code> of bon mappings @param ac...
[ "Converts", "a", "set", "of", "bond", "mappings", "to", "a", "unique", "set", "of", "atom", "paths", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtils.java#L256-L287
113,915
cdk/cdk
base/data/src/main/java/org/openscience/cdk/ChemFile.java
ChemFile.chemSequences
@Override public Iterable<IChemSequence> chemSequences() { return new Iterable<IChemSequence>() { @Override public Iterator<IChemSequence> iterator() { return new ChemSequenceIterator(); } }; }
java
@Override public Iterable<IChemSequence> chemSequences() { return new Iterable<IChemSequence>() { @Override public Iterator<IChemSequence> iterator() { return new ChemSequenceIterator(); } }; }
[ "@", "Override", "public", "Iterable", "<", "IChemSequence", ">", "chemSequences", "(", ")", "{", "return", "new", "Iterable", "<", "IChemSequence", ">", "(", ")", "{", "@", "Override", "public", "Iterator", "<", "IChemSequence", ">", "iterator", "(", ")", ...
Returns the Iterable to ChemSequences of this container. @return The Iterable to ChemSequences of this container @see #addChemSequence
[ "Returns", "the", "Iterable", "to", "ChemSequences", "of", "this", "container", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ChemFile.java#L115-L124
113,916
cdk/cdk
base/data/src/main/java/org/openscience/cdk/ChemFile.java
ChemFile.growChemSequenceArray
protected void growChemSequenceArray() { growArraySize = chemSequences.length; IChemSequence[] newchemSequences = new ChemSequence[chemSequences.length + growArraySize]; System.arraycopy(chemSequences, 0, newchemSequences, 0, chemSequences.length); chemSequences = newchemSequences; }
java
protected void growChemSequenceArray() { growArraySize = chemSequences.length; IChemSequence[] newchemSequences = new ChemSequence[chemSequences.length + growArraySize]; System.arraycopy(chemSequences, 0, newchemSequences, 0, chemSequences.length); chemSequences = newchemSequences; }
[ "protected", "void", "growChemSequenceArray", "(", ")", "{", "growArraySize", "=", "chemSequences", ".", "length", ";", "IChemSequence", "[", "]", "newchemSequences", "=", "new", "ChemSequence", "[", "chemSequences", ".", "length", "+", "growArraySize", "]", ";", ...
Grows the ChemSequence array by a given size. @see #growArraySize
[ "Grows", "the", "ChemSequence", "array", "by", "a", "given", "size", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ChemFile.java#L168-L173
113,917
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/ElementComparator.java
ElementComparator.compare
@Override public int compare(String o1, String o2) { if (C_ELEMENT_SYMBOL.equals(o1)) { if (C_ELEMENT_SYMBOL.equals(o2)) { return 0; } else { return -1; } } else if (H_ELEMENT_SYMBOL.equals(o1)) { if (C_ELEMENT_SYMBOL.eq...
java
@Override public int compare(String o1, String o2) { if (C_ELEMENT_SYMBOL.equals(o1)) { if (C_ELEMENT_SYMBOL.equals(o2)) { return 0; } else { return -1; } } else if (H_ELEMENT_SYMBOL.equals(o1)) { if (C_ELEMENT_SYMBOL.eq...
[ "@", "Override", "public", "int", "compare", "(", "String", "o1", ",", "String", "o2", ")", "{", "if", "(", "C_ELEMENT_SYMBOL", ".", "equals", "(", "o1", ")", ")", "{", "if", "(", "C_ELEMENT_SYMBOL", ".", "equals", "(", "o2", ")", ")", "{", "return",...
Returns a negative if o1 comes before o2 in a molecular formula, returns zero if they are identical, and positive if o1 comes after o2 in the formula.
[ "Returns", "a", "negative", "if", "o1", "comes", "before", "o2", "in", "a", "molecular", "formula", "returns", "zero", "if", "they", "are", "identical", "and", "positive", "if", "o1", "comes", "after", "o2", "in", "the", "formula", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/ElementComparator.java#L48-L71
113,918
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/TextOutline.java
TextOutline.transformedBounds
private Rectangle2D transformedBounds(Shape shape) { Rectangle2D rectangle2D = shape.getBounds2D(); Point2D minPoint = new Point2D.Double(rectangle2D.getMinX(), rectangle2D.getMinY()); Point2D maxPoint = new Point2D.Double(rectangle2D.getMaxX(), rectangle2D.getMaxY()); transform.transfo...
java
private Rectangle2D transformedBounds(Shape shape) { Rectangle2D rectangle2D = shape.getBounds2D(); Point2D minPoint = new Point2D.Double(rectangle2D.getMinX(), rectangle2D.getMinY()); Point2D maxPoint = new Point2D.Double(rectangle2D.getMaxX(), rectangle2D.getMaxY()); transform.transfo...
[ "private", "Rectangle2D", "transformedBounds", "(", "Shape", "shape", ")", "{", "Rectangle2D", "rectangle2D", "=", "shape", ".", "getBounds2D", "(", ")", ";", "Point2D", "minPoint", "=", "new", "Point2D", ".", "Double", "(", "rectangle2D", ".", "getMinX", "(",...
Access the bounds of a shape that have been transformed. @param shape any shape @return the bounds of the shape transformed
[ "Access", "the", "bounds", "of", "a", "shape", "that", "have", "been", "transformed", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/TextOutline.java#L141-L156
113,919
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/TextOutline.java
TextOutline.getCenter
Point2D getCenter() { final Rectangle2D bounds = getBounds(); return new Point2D.Double(bounds.getCenterX(), bounds.getCenterY()); }
java
Point2D getCenter() { final Rectangle2D bounds = getBounds(); return new Point2D.Double(bounds.getCenterX(), bounds.getCenterY()); }
[ "Point2D", "getCenter", "(", ")", "{", "final", "Rectangle2D", "bounds", "=", "getBounds", "(", ")", ";", "return", "new", "Point2D", ".", "Double", "(", "bounds", ".", "getCenterX", "(", ")", ",", "bounds", ".", "getCenterY", "(", ")", ")", ";", "}" ]
Access the transformed center of the whole outline. @return center of outline
[ "Access", "the", "transformed", "center", "of", "the", "whole", "outline", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/TextOutline.java#L163-L166
113,920
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/TextOutline.java
TextOutline.getGlyphCenter
private Point2D getGlyphCenter(final int index) { if (text.length() == 1) return getCenter(); final Shape glyph = glyphs.getGlyphOutline(index); final Rectangle2D glyphBounds = transformedBounds(glyph); return new Point2D.Double(glyphBounds.getCenterX(), glyphBounds.getCenterY()); ...
java
private Point2D getGlyphCenter(final int index) { if (text.length() == 1) return getCenter(); final Shape glyph = glyphs.getGlyphOutline(index); final Rectangle2D glyphBounds = transformedBounds(glyph); return new Point2D.Double(glyphBounds.getCenterX(), glyphBounds.getCenterY()); ...
[ "private", "Point2D", "getGlyphCenter", "(", "final", "int", "index", ")", "{", "if", "(", "text", ".", "length", "(", ")", "==", "1", ")", "return", "getCenter", "(", ")", ";", "final", "Shape", "glyph", "=", "glyphs", ".", "getGlyphOutline", "(", "in...
Determines the transformed centre of a specified glyph. @param index glyph index @return center point
[ "Determines", "the", "transformed", "centre", "of", "a", "specified", "glyph", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/TextOutline.java#L192-L200
113,921
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/TextOutline.java
TextOutline.transform
TextOutline transform(AffineTransform nextTransform) { final AffineTransform combinedTransform = new AffineTransform(); combinedTransform.concatenate(nextTransform); combinedTransform.concatenate(transform); return new TextOutline(text, glyphs, outline, combinedTransform); }
java
TextOutline transform(AffineTransform nextTransform) { final AffineTransform combinedTransform = new AffineTransform(); combinedTransform.concatenate(nextTransform); combinedTransform.concatenate(transform); return new TextOutline(text, glyphs, outline, combinedTransform); }
[ "TextOutline", "transform", "(", "AffineTransform", "nextTransform", ")", "{", "final", "AffineTransform", "combinedTransform", "=", "new", "AffineTransform", "(", ")", ";", "combinedTransform", ".", "concatenate", "(", "nextTransform", ")", ";", "combinedTransform", ...
Add a transformation to the outline. @param nextTransform new transformation @return new text outline
[ "Add", "a", "transformation", "to", "the", "outline", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/TextOutline.java#L208-L213
113,922
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java
QueryChemObject.addListener
@Override public void addListener(IChemObjectListener col) { List<IChemObjectListener> listeners = lazyChemObjectListeners(); if (!listeners.contains(col)) { listeners.add(col); } // Should we throw an exception if col is already in here or // just silently ignor...
java
@Override public void addListener(IChemObjectListener col) { List<IChemObjectListener> listeners = lazyChemObjectListeners(); if (!listeners.contains(col)) { listeners.add(col); } // Should we throw an exception if col is already in here or // just silently ignor...
[ "@", "Override", "public", "void", "addListener", "(", "IChemObjectListener", "col", ")", "{", "List", "<", "IChemObjectListener", ">", "listeners", "=", "lazyChemObjectListeners", "(", ")", ";", "if", "(", "!", "listeners", ".", "contains", "(", "col", ")", ...
Use this to add yourself to this IChemObject as a listener. In order to do so, you must implement the ChemObjectListener Interface. @param col the ChemObjectListener @see #removeListener
[ "Use", "this", "to", "add", "yourself", "to", "this", "IChemObject", "as", "a", "listener", ".", "In", "order", "to", "do", "so", "you", "must", "implement", "the", "ChemObjectListener", "Interface", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java#L94-L103
113,923
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java
QueryChemObject.removeListener
@Override public void removeListener(IChemObjectListener col) { if (chemObjectListeners == null) { return; } List<IChemObjectListener> listeners = lazyChemObjectListeners(); if (listeners.contains(col)) { listeners.remove(col); } }
java
@Override public void removeListener(IChemObjectListener col) { if (chemObjectListeners == null) { return; } List<IChemObjectListener> listeners = lazyChemObjectListeners(); if (listeners.contains(col)) { listeners.remove(col); } }
[ "@", "Override", "public", "void", "removeListener", "(", "IChemObjectListener", "col", ")", "{", "if", "(", "chemObjectListeners", "==", "null", ")", "{", "return", ";", "}", "List", "<", "IChemObjectListener", ">", "listeners", "=", "lazyChemObjectListeners", ...
Use this to remove a ChemObjectListener from the ListenerList of this IChemObject. It will then not be notified of change in this object anymore. @param col The ChemObjectListener to be removed @see #addListener
[ "Use", "this", "to", "remove", "a", "ChemObjectListener", "from", "the", "ListenerList", "of", "this", "IChemObject", ".", "It", "will", "then", "not", "be", "notified", "of", "change", "in", "this", "object", "anymore", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java#L125-L135
113,924
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java
QueryChemObject.notifyChanged
@Override public void notifyChanged() { if (getNotification() && getListenerCount() > 0) { List<IChemObjectListener> listeners = lazyChemObjectListeners(); for (Object listener : listeners) { ((IChemObjectListener) listener).stateChanged(new QueryChemObjectChangeEvent...
java
@Override public void notifyChanged() { if (getNotification() && getListenerCount() > 0) { List<IChemObjectListener> listeners = lazyChemObjectListeners(); for (Object listener : listeners) { ((IChemObjectListener) listener).stateChanged(new QueryChemObjectChangeEvent...
[ "@", "Override", "public", "void", "notifyChanged", "(", ")", "{", "if", "(", "getNotification", "(", ")", "&&", "getListenerCount", "(", ")", ">", "0", ")", "{", "List", "<", "IChemObjectListener", ">", "listeners", "=", "lazyChemObjectListeners", "(", ")",...
This should be triggered by an method that changes the content of an object to that the registered listeners can react to it.
[ "This", "should", "be", "triggered", "by", "an", "method", "that", "changes", "the", "content", "of", "an", "object", "to", "that", "the", "registered", "listeners", "can", "react", "to", "it", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java#L141-L149
113,925
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java
QueryChemObject.lazyProperties
private Map<Object, Object> lazyProperties() { if (properties == null) { properties = new HashMap<Object, Object>(); } return properties; }
java
private Map<Object, Object> lazyProperties() { if (properties == null) { properties = new HashMap<Object, Object>(); } return properties; }
[ "private", "Map", "<", "Object", ",", "Object", ">", "lazyProperties", "(", ")", "{", "if", "(", "properties", "==", "null", ")", "{", "properties", "=", "new", "HashMap", "<", "Object", ",", "Object", ">", "(", ")", ";", "}", "return", "properties", ...
Lazy creation of properties hash. @return Returns in instance of the properties
[ "Lazy", "creation", "of", "properties", "hash", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java#L175-L180
113,926
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java
QueryChemObject.setProperty
@Override public void setProperty(Object description, Object property) { lazyProperties().put(description, property); notifyChanged(); }
java
@Override public void setProperty(Object description, Object property) { lazyProperties().put(description, property); notifyChanged(); }
[ "@", "Override", "public", "void", "setProperty", "(", "Object", "description", ",", "Object", "property", ")", "{", "lazyProperties", "(", ")", ".", "put", "(", "description", ",", "property", ")", ";", "notifyChanged", "(", ")", ";", "}" ]
Sets a property for a IChemObject. @param description An object description of the property (most likely a unique string) @param property An object with the property itself @see #getProperty @see #removeProperty
[ "Sets", "a", "property", "for", "a", "IChemObject", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java#L191-L195
113,927
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java
QueryChemObject.getProperty
@Override public <T> T getProperty(Object description) { // can't check the type @SuppressWarnings("unchecked") T value = (T) lazyProperties().get(description); return value; }
java
@Override public <T> T getProperty(Object description) { // can't check the type @SuppressWarnings("unchecked") T value = (T) lazyProperties().get(description); return value; }
[ "@", "Override", "public", "<", "T", ">", "T", "getProperty", "(", "Object", "description", ")", "{", "// can't check the type", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "T", "value", "=", "(", "T", ")", "lazyProperties", "(", ")", ".", "get", "...
Returns a property for the IChemObject. @param description An object description of the property (most likely a unique string) @return The object containing the property. Returns null if propert is not set. @see #setProperty @see #removeProperty
[ "Returns", "a", "property", "for", "the", "IChemObject", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryChemObject.java#L223-L229
113,928
cdk/cdk
storage/io/src/main/java/org/openscience/cdk/io/WriterFactory.java
WriterFactory.findChemFormats
public IChemFormat[] findChemFormats(int features) { if (formats == null) loadFormats(); Iterator<IChemFormat> iter = formats.iterator(); List<IChemFormat> matches = new ArrayList<IChemFormat>(); while (iter.hasNext()) { IChemFormat format = (IChemFormat) iter.next(); ...
java
public IChemFormat[] findChemFormats(int features) { if (formats == null) loadFormats(); Iterator<IChemFormat> iter = formats.iterator(); List<IChemFormat> matches = new ArrayList<IChemFormat>(); while (iter.hasNext()) { IChemFormat format = (IChemFormat) iter.next(); ...
[ "public", "IChemFormat", "[", "]", "findChemFormats", "(", "int", "features", ")", "{", "if", "(", "formats", "==", "null", ")", "loadFormats", "(", ")", ";", "Iterator", "<", "IChemFormat", ">", "iter", "=", "formats", ".", "iterator", "(", ")", ";", ...
Finds IChemFormats that provide a container for serialization for the given features. The syntax of the integer is explained in the DataFeatures class. @param features the data features for which a IChemFormat is searched @return an array of IChemFormat's that can contain the given features @see org.open...
[ "Finds", "IChemFormats", "that", "provide", "a", "container", "for", "serialization", "for", "the", "given", "features", ".", "The", "syntax", "of", "the", "integer", "is", "explained", "in", "the", "DataFeatures", "class", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/WriterFactory.java#L82-L93
113,929
cdk/cdk
storage/io/src/main/java/org/openscience/cdk/io/WriterFactory.java
WriterFactory.createWriter
public IChemObjectWriter createWriter(IChemFormat format) { if (format != null) { String writerClassName = format.getWriterClassName(); if (writerClassName != null) { try { if (registeredReaders.containsKey(writerClassName)) { C...
java
public IChemObjectWriter createWriter(IChemFormat format) { if (format != null) { String writerClassName = format.getWriterClassName(); if (writerClassName != null) { try { if (registeredReaders.containsKey(writerClassName)) { C...
[ "public", "IChemObjectWriter", "createWriter", "(", "IChemFormat", "format", ")", "{", "if", "(", "format", "!=", "null", ")", "{", "String", "writerClassName", "=", "format", ".", "getWriterClassName", "(", ")", ";", "if", "(", "writerClassName", "!=", "null"...
Creates a new IChemObjectWriter based on the given IChemFormat.
[ "Creates", "a", "new", "IChemObjectWriter", "based", "on", "the", "given", "IChemFormat", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/WriterFactory.java#L140-L166
113,930
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/EffectiveAtomPolarizabilityDescriptor.java
EffectiveAtomPolarizabilityDescriptor.calculate
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer ac) { double polarizability; try { // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method String originalAtomtypeName = atom.getAtomTypeName(); ...
java
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer ac) { double polarizability; try { // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method String originalAtomtypeName = atom.getAtomTypeName(); ...
[ "@", "Override", "public", "DescriptorValue", "calculate", "(", "IAtom", "atom", ",", "IAtomContainer", "ac", ")", "{", "double", "polarizability", ";", "try", "{", "// FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method", "Str...
The method calculates the Effective Atom Polarizability of a given atom 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", "calculates", "the", "Effective", "Atom", "Polarizability", "of", "a", "given", "atom", "It", "is", "needed", "to", "call", "the", "addExplicitHydrogensToSatisfyValency", "method", "from", "the", "class", "tools", ".", "HydrogenAdder", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/EffectiveAtomPolarizabilityDescriptor.java#L112-L141
113,931
cdk/cdk
base/core/src/main/java/org/openscience/cdk/config/OWLBasedAtomTypeConfigurator.java
OWLBasedAtomTypeConfigurator.readAtomTypes
@Override public List<IAtomType> readAtomTypes(IChemObjectBuilder builder) throws IOException { List<IAtomType> atomTypes; if (ins == null) throw new IOException("There was a problem getting an input stream"); OWLAtomTypeReader reader = new OWLAtomTypeReader(new InputStreamReader(ins)); ...
java
@Override public List<IAtomType> readAtomTypes(IChemObjectBuilder builder) throws IOException { List<IAtomType> atomTypes; if (ins == null) throw new IOException("There was a problem getting an input stream"); OWLAtomTypeReader reader = new OWLAtomTypeReader(new InputStreamReader(ins)); ...
[ "@", "Override", "public", "List", "<", "IAtomType", ">", "readAtomTypes", "(", "IChemObjectBuilder", "builder", ")", "throws", "IOException", "{", "List", "<", "IAtomType", ">", "atomTypes", ";", "if", "(", "ins", "==", "null", ")", "throw", "new", "IOExcep...
Reads the atom types from the OWL based atom type list. @param builder IChemObjectBuilder used to construct the IAtomType's. @throws IOException when a problem occurred with reading from the InputStream @return A List with read IAtomType's.
[ "Reads", "the", "atom", "types", "from", "the", "OWL", "based", "atom", "type", "list", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/OWLBasedAtomTypeConfigurator.java#L58-L70
113,932
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.isIsomorph
public static boolean isIsomorph(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { if (sourceGraph instanceof IQueryAtomContainer) { throw new CDKException("The first IAtomContainer must not be an IQueryAtomContainer"); } ...
java
public static boolean isIsomorph(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { if (sourceGraph instanceof IQueryAtomContainer) { throw new CDKException("The first IAtomContainer must not be an IQueryAtomContainer"); } ...
[ "public", "static", "boolean", "isIsomorph", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "if", "(", "sourceGraph", "instanceof", "IQueryAtomContainer", ")", "{", "t...
Tests if sourceGraph and targetGraph are isomorph. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return true if the 2 molecule are isomorph @throws org.openscience.cdk.exception.CDKException if ...
[ "Tests", "if", "sourceGraph", "and", "targetGraph", "are", "isomorph", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L156-L181
113,933
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getIsomorphMap
public static List<CDKRMap> getIsomorphMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { if (sourceGraph instanceof IQueryAtomContainer) { throw new CDKException("The first IAtomContainer must not be an IQueryAtomContainer"); ...
java
public static List<CDKRMap> getIsomorphMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { if (sourceGraph instanceof IQueryAtomContainer) { throw new CDKException("The first IAtomContainer must not be an IQueryAtomContainer"); ...
[ "public", "static", "List", "<", "CDKRMap", ">", "getIsomorphMap", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "if", "(", "sourceGraph", "instanceof", "IQueryAtomCo...
Returns the first isomorph mapping found or null. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return the first isomorph mapping found projected of sourceGraph. This is atom List of CDKRMap obj...
[ "Returns", "the", "first", "isomorph", "mapping", "found", "or", "null", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L192-L208
113,934
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getIsomorphAtomsMap
public static List<CDKRMap> getIsomorphAtomsMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { if (sourceGraph instanceof IQueryAtomContainer) { throw new CDKException("The first IAtomContainer must not be an IQueryAtomContainer");...
java
public static List<CDKRMap> getIsomorphAtomsMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { if (sourceGraph instanceof IQueryAtomContainer) { throw new CDKException("The first IAtomContainer must not be an IQueryAtomContainer");...
[ "public", "static", "List", "<", "CDKRMap", ">", "getIsomorphAtomsMap", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "if", "(", "sourceGraph", "instanceof", "IQueryA...
Returns the first isomorph 'atom mapping' found for targetGraph in sourceGraph. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return the first isomorph atom mapping found projected on sourceGrap...
[ "Returns", "the", "first", "isomorph", "atom", "mapping", "found", "for", "targetGraph", "in", "sourceGraph", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L221-L236
113,935
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getIsomorphMaps
public static List<List<CDKRMap>> getIsomorphMaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { return search(sourceGraph, targetGraph, getBitSet(sourceGraph), getBitSet(targetGraph), true, true, shouldMatchBonds); }
java
public static List<List<CDKRMap>> getIsomorphMaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { return search(sourceGraph, targetGraph, getBitSet(sourceGraph), getBitSet(targetGraph), true, true, shouldMatchBonds); }
[ "public", "static", "List", "<", "List", "<", "CDKRMap", ">", ">", "getIsomorphMaps", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "return", "search", "(", "sour...
Returns all the isomorph 'mappings' found between two atom containers. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return the list of all the 'mappings' @throws CDKException
[ "Returns", "all", "the", "isomorph", "mappings", "found", "between", "two", "atom", "containers", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L248-L252
113,936
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getSubgraphMaps
public static List<List<CDKRMap>> getSubgraphMaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { return search(sourceGraph, targetGraph, new BitSet(), getBitSet(targetGraph), true, true, shouldMatchBonds); }
java
public static List<List<CDKRMap>> getSubgraphMaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { return search(sourceGraph, targetGraph, new BitSet(), getBitSet(targetGraph), true, true, shouldMatchBonds); }
[ "public", "static", "List", "<", "List", "<", "CDKRMap", ">", ">", "getSubgraphMaps", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "return", "search", "(", "sour...
Returns all the subgraph 'bondA1 mappings' found for targetGraph in sourceGraph. This is an ArrayList of ArrayLists of CDKRMap objects. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return the l...
[ "Returns", "all", "the", "subgraph", "bondA1", "mappings", "found", "for", "targetGraph", "in", "sourceGraph", ".", "This", "is", "an", "ArrayList", "of", "ArrayLists", "of", "CDKRMap", "objects", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L266-L269
113,937
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getSubgraphMap
public static List<CDKRMap> getSubgraphMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { List<CDKRMap> result = null; List<List<CDKRMap>> rMapsList = search(sourceGraph, targetGraph, new BitSet(), getBitSet(targetGraph), false, ...
java
public static List<CDKRMap> getSubgraphMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { List<CDKRMap> result = null; List<List<CDKRMap>> rMapsList = search(sourceGraph, targetGraph, new BitSet(), getBitSet(targetGraph), false, ...
[ "public", "static", "List", "<", "CDKRMap", ">", "getSubgraphMap", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "List", "<", "CDKRMap", ">", "result", "=", "null...
Returns the first subgraph 'bondA1 mapping' found for targetGraph in sourceGraph. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return the first subgraph bondA1 mapping found projected on source...
[ "Returns", "the", "first", "subgraph", "bondA1", "mapping", "found", "for", "targetGraph", "in", "sourceGraph", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L280-L291
113,938
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getSubgraphAtomsMaps
public static List<List<CDKRMap>> getSubgraphAtomsMaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { List<CDKRMap> list = checkSingleAtomCases(sourceGraph, targetGraph); if (list == null) { return makeAtomsMapsOfBondsMaps(...
java
public static List<List<CDKRMap>> getSubgraphAtomsMaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { List<CDKRMap> list = checkSingleAtomCases(sourceGraph, targetGraph); if (list == null) { return makeAtomsMapsOfBondsMaps(...
[ "public", "static", "List", "<", "List", "<", "CDKRMap", ">", ">", "getSubgraphAtomsMaps", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "List", "<", "CDKRMap", "...
Returns all subgraph 'atom mappings' found for targetGraph in sourceGraph. This is an ArrayList of ArrayLists of CDKRMap objects. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return all subgrap...
[ "Returns", "all", "subgraph", "atom", "mappings", "found", "for", "targetGraph", "in", "sourceGraph", ".", "This", "is", "an", "ArrayList", "of", "ArrayLists", "of", "CDKRMap", "objects", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L304-L315
113,939
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getSubgraphAtomsMap
public static List<CDKRMap> getSubgraphAtomsMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { List<CDKRMap> list = checkSingleAtomCases(sourceGraph, targetGraph); if (list == null) { return makeAtomsMapOfBondsMap(CDKMCS.ge...
java
public static List<CDKRMap> getSubgraphAtomsMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { List<CDKRMap> list = checkSingleAtomCases(sourceGraph, targetGraph); if (list == null) { return makeAtomsMapOfBondsMap(CDKMCS.ge...
[ "public", "static", "List", "<", "CDKRMap", ">", "getSubgraphAtomsMap", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "List", "<", "CDKRMap", ">", "list", "=", "c...
Returns the first subgraph 'atom mapping' found for targetGraph in sourceGraph. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return the first subgraph atom mapping found projected on sourceGraph. ...
[ "Returns", "the", "first", "subgraph", "atom", "mapping", "found", "for", "targetGraph", "in", "sourceGraph", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L327-L338
113,940
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.isSubgraph
public static boolean isSubgraph(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { if (sourceGraph instanceof IQueryAtomContainer) { throw new CDKException("The first IAtomContainer must not be an IQueryAtomContainer"); } ...
java
public static boolean isSubgraph(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { if (sourceGraph instanceof IQueryAtomContainer) { throw new CDKException("The first IAtomContainer must not be an IQueryAtomContainer"); } ...
[ "public", "static", "boolean", "isSubgraph", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "if", "(", "sourceGraph", "instanceof", "IQueryAtomContainer", ")", "{", "t...
Tests if targetGraph atom subgraph of sourceGraph. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return true if targetGraph atom subgraph on sourceGraph @throws CDKException
[ "Tests", "if", "targetGraph", "atom", "subgraph", "of", "sourceGraph", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L349-L385
113,941
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getOverlaps
public static List<IAtomContainer> getOverlaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { List<List<CDKRMap>> rMapsList = search(sourceGraph, targetGraph, new BitSet(), new BitSet(), true, false, shouldMatchBonds); ...
java
public static List<IAtomContainer> getOverlaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { List<List<CDKRMap>> rMapsList = search(sourceGraph, targetGraph, new BitSet(), new BitSet(), true, false, shouldMatchBonds); ...
[ "public", "static", "List", "<", "IAtomContainer", ">", "getOverlaps", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "List", "<", "List", "<", "CDKRMap", ">>", "r...
Returns all the maximal common substructure between 2 atom containers. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return the list of all the maximal common substructure found projected of sou...
[ "Returns", "all", "the", "maximal", "common", "substructure", "between", "2", "atom", "containers", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L398-L410
113,942
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.project
public static IAtomContainer project(List<CDKRMap> rMapList, IAtomContainer graph, int key) { IAtomContainer atomContainer = graph.getBuilder().newInstance(IAtomContainer.class); Map<IAtom, IAtom> table = new HashMap<IAtom, IAtom>(); IAtom atom1; IAtom atom2; IAtom atom; ...
java
public static IAtomContainer project(List<CDKRMap> rMapList, IAtomContainer graph, int key) { IAtomContainer atomContainer = graph.getBuilder().newInstance(IAtomContainer.class); Map<IAtom, IAtom> table = new HashMap<IAtom, IAtom>(); IAtom atom1; IAtom atom2; IAtom atom; ...
[ "public", "static", "IAtomContainer", "project", "(", "List", "<", "CDKRMap", ">", "rMapList", ",", "IAtomContainer", "graph", ",", "int", "key", ")", "{", "IAtomContainer", "atomContainer", "=", "graph", ".", "getBuilder", "(", ")", ".", "newInstance", "(", ...
Projects atom list of CDKRMap on atom molecule. @param rMapList the list to project @param graph the molecule on which project @param key the key in the CDKRMap of the molecule graph @return an AtomContainer
[ "Projects", "atom", "list", "of", "CDKRMap", "on", "atom", "molecule", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L533-L580
113,943
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.projectList
public static ArrayList<IAtomContainer> projectList(List<List<CDKRMap>> rMapsList, IAtomContainer graph, int key) { ArrayList<IAtomContainer> graphList = new ArrayList<IAtomContainer>(); for (List<CDKRMap> rMapList : rMapsList) { IAtomContainer atomContainer = project(rMapList, graph, key);...
java
public static ArrayList<IAtomContainer> projectList(List<List<CDKRMap>> rMapsList, IAtomContainer graph, int key) { ArrayList<IAtomContainer> graphList = new ArrayList<IAtomContainer>(); for (List<CDKRMap> rMapList : rMapsList) { IAtomContainer atomContainer = project(rMapList, graph, key);...
[ "public", "static", "ArrayList", "<", "IAtomContainer", ">", "projectList", "(", "List", "<", "List", "<", "CDKRMap", ">", ">", "rMapsList", ",", "IAtomContainer", "graph", ",", "int", "key", ")", "{", "ArrayList", "<", "IAtomContainer", ">", "graphList", "=...
Projects atom list of RMapsList on atom molecule. @param rMapsList list of RMapsList to project @param graph the molecule on which project @param key the key in the CDKRMap of the molecule graph @return atom list of AtomContainer
[ "Projects", "atom", "list", "of", "RMapsList", "on", "atom", "molecule", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L590-L598
113,944
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getMaximum
private static List<IAtomContainer> getMaximum(ArrayList<IAtomContainer> graphList, boolean shouldMatchBonds) throws CDKException { List<IAtomContainer> reducedGraphList = (List<IAtomContainer>) graphList.clone(); for (int i = 0; i < graphList.size(); i++) { IAtomContainer graph...
java
private static List<IAtomContainer> getMaximum(ArrayList<IAtomContainer> graphList, boolean shouldMatchBonds) throws CDKException { List<IAtomContainer> reducedGraphList = (List<IAtomContainer>) graphList.clone(); for (int i = 0; i < graphList.size(); i++) { IAtomContainer graph...
[ "private", "static", "List", "<", "IAtomContainer", ">", "getMaximum", "(", "ArrayList", "<", "IAtomContainer", ">", "graphList", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "List", "<", "IAtomContainer", ">", "reducedGraphList", "=", "...
Removes all redundant solution. @param graphList the list of structure to clean @return the list cleaned @throws org.openscience.cdk.exception.CDKException if there is atom problem in obtaining subgraphs
[ "Removes", "all", "redundant", "solution", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L608-L628
113,945
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.arcConstructor
private static void arcConstructor(CDKRGraph graph, IAtomContainer ac1, IAtomContainer ac2) throws CDKException { // each node is incompatible with itself for (int i = 0; i < graph.getGraph().size(); i++) { CDKRNode rNodeX = graph.getGraph().get(i); rNodeX.getForbidden().set(i); ...
java
private static void arcConstructor(CDKRGraph graph, IAtomContainer ac1, IAtomContainer ac2) throws CDKException { // each node is incompatible with itself for (int i = 0; i < graph.getGraph().size(); i++) { CDKRNode rNodeX = graph.getGraph().get(i); rNodeX.getForbidden().set(i); ...
[ "private", "static", "void", "arcConstructor", "(", "CDKRGraph", "graph", ",", "IAtomContainer", "ac1", ",", "IAtomContainer", "ac2", ")", "throws", "CDKException", "{", "// each node is incompatible with itself", "for", "(", "int", "i", "=", "0", ";", "i", "<", ...
Build edges of the RGraphs This method create the edge of the CDKRGraph and calculates the incompatibility and neighbourhood relationships between CDKRGraph nodes. @param graph the rGraph @param ac1 first molecule. Must not be an IQueryAtomContainer. @param ac2 second molecule. May be an IQueryAtomContainer. ...
[ "Build", "edges", "of", "the", "RGraphs", "This", "method", "create", "the", "edge", "of", "the", "CDKRGraph", "and", "calculates", "the", "incompatibility", "and", "neighbourhood", "relationships", "between", "CDKRGraph", "nodes", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L848-L898
113,946
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.hasCommonAtom
private static boolean hasCommonAtom(IBond bondA, IBond bondB) { return bondA.contains(bondB.getBegin()) || bondA.contains(bondB.getEnd()); }
java
private static boolean hasCommonAtom(IBond bondA, IBond bondB) { return bondA.contains(bondB.getBegin()) || bondA.contains(bondB.getEnd()); }
[ "private", "static", "boolean", "hasCommonAtom", "(", "IBond", "bondA", ",", "IBond", "bondB", ")", "{", "return", "bondA", ".", "contains", "(", "bondB", ".", "getBegin", "(", ")", ")", "||", "bondA", ".", "contains", "(", "bondB", ".", "getEnd", "(", ...
Determines if two bonds have at least one atom in common. @param atom first bondA1 @param bondB second bondA1 @return the symbol of the common atom or "" if the 2 bonds have no common atom
[ "Determines", "if", "two", "bonds", "have", "at", "least", "one", "atom", "in", "common", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L908-L910
113,947
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getCommonSymbol
private static String getCommonSymbol(IBond bondA, IBond bondB) { String symbol = ""; if (bondA.contains(bondB.getBegin())) { symbol = bondB.getBegin().getSymbol(); } else if (bondA.contains(bondB.getEnd())) { symbol = bondB.getEnd().getSymbol(); } retur...
java
private static String getCommonSymbol(IBond bondA, IBond bondB) { String symbol = ""; if (bondA.contains(bondB.getBegin())) { symbol = bondB.getBegin().getSymbol(); } else if (bondA.contains(bondB.getEnd())) { symbol = bondB.getEnd().getSymbol(); } retur...
[ "private", "static", "String", "getCommonSymbol", "(", "IBond", "bondA", ",", "IBond", "bondB", ")", "{", "String", "symbol", "=", "\"\"", ";", "if", "(", "bondA", ".", "contains", "(", "bondB", ".", "getBegin", "(", ")", ")", ")", "{", "symbol", "=", ...
Determines if 2 bondA1 have 1 atom in common and returns the common symbol @param atom first bondA1 @param bondB second bondA1 @return the symbol of the common atom or "" if the 2 bonds have no common atom
[ "Determines", "if", "2", "bondA1", "have", "1", "atom", "in", "common", "and", "returns", "the", "common", "symbol" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L920-L930
113,948
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.queryAdjacency
private static boolean queryAdjacency(IBond bondA1, IBond bondB1, IBond bondA2, IBond bondB2) { IAtom atom1 = null; IAtom atom2 = null; if (bondA1.contains(bondB1.getBegin())) { atom1 = bondB1.getBegin(); } else if (bondA1.contains(bondB1.getEnd())) { atom1 = bo...
java
private static boolean queryAdjacency(IBond bondA1, IBond bondB1, IBond bondA2, IBond bondB2) { IAtom atom1 = null; IAtom atom2 = null; if (bondA1.contains(bondB1.getBegin())) { atom1 = bondB1.getBegin(); } else if (bondA1.contains(bondB1.getEnd())) { atom1 = bo...
[ "private", "static", "boolean", "queryAdjacency", "(", "IBond", "bondA1", ",", "IBond", "bondB1", ",", "IBond", "bondA2", ",", "IBond", "bondB2", ")", "{", "IAtom", "atom1", "=", "null", ";", "IAtom", "atom2", "=", "null", ";", "if", "(", "bondA1", ".", ...
Determines if 2 bondA1 have 1 atom in common if second is atom query AtomContainer @param atom1 first bondA1 @param bondB1 second bondA1 @return the symbol of the common atom or "" if the 2 bonds have no common atom
[ "Determines", "if", "2", "bondA1", "have", "1", "atom", "in", "common", "if", "second", "is", "atom", "query", "AtomContainer" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L940-L964
113,949
cdk/cdk
tool/hash/src/main/java/org/openscience/cdk/hash/HashGeneratorMaker.java
HashGeneratorMaker.encode
public HashGeneratorMaker encode(AtomEncoder encoder) { if (encoder == null) throw new NullPointerException("no encoder provided"); customEncoders.add(encoder); return this; }
java
public HashGeneratorMaker encode(AtomEncoder encoder) { if (encoder == null) throw new NullPointerException("no encoder provided"); customEncoders.add(encoder); return this; }
[ "public", "HashGeneratorMaker", "encode", "(", "AtomEncoder", "encoder", ")", "{", "if", "(", "encoder", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"no encoder provided\"", ")", ";", "customEncoders", ".", "add", "(", "encoder", ")", ";", ...
Add a custom encoder to the hash generator which will be built. Although not enforced, the encoder should be stateless and should not modify any passed inputs. @param encoder an atom encoder @return fluent API reference (self) @throws NullPointerException no encoder provided
[ "Add", "a", "custom", "encoder", "to", "the", "hash", "generator", "which", "will", "be", "built", ".", "Although", "not", "enforced", "the", "encoder", "should", "be", "stateless", "and", "should", "not", "modify", "any", "passed", "inputs", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/HashGeneratorMaker.java#L266-L270
113,950
cdk/cdk
tool/hash/src/main/java/org/openscience/cdk/hash/HashGeneratorMaker.java
HashGeneratorMaker.makeStereoEncoderFactory
private StereoEncoderFactory makeStereoEncoderFactory() { if (stereoEncoders.isEmpty()) { return StereoEncoderFactory.EMPTY; } else if (stereoEncoders.size() == 1) { return stereoEncoders.get(0); } else { StereoEncoderFactory factory = new ConjugatedEncoderFac...
java
private StereoEncoderFactory makeStereoEncoderFactory() { if (stereoEncoders.isEmpty()) { return StereoEncoderFactory.EMPTY; } else if (stereoEncoders.size() == 1) { return stereoEncoders.get(0); } else { StereoEncoderFactory factory = new ConjugatedEncoderFac...
[ "private", "StereoEncoderFactory", "makeStereoEncoderFactory", "(", ")", "{", "if", "(", "stereoEncoders", ".", "isEmpty", "(", ")", ")", "{", "return", "StereoEncoderFactory", ".", "EMPTY", ";", "}", "else", "if", "(", "stereoEncoders", ".", "size", "(", ")",...
Combines the separate stereo encoder factories into a single factory. @return a single stereo encoder factory
[ "Combines", "the", "separate", "stereo", "encoder", "factories", "into", "a", "single", "factory", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/HashGeneratorMaker.java#L277-L289
113,951
cdk/cdk
display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/MappingGenerator.java
MappingGenerator.getWidthForMappingLine
private double getWidthForMappingLine(RendererModel model) { double scale = model.getParameter(Scale.class).getValue(); return mappingLineWidth.getValue() / scale; }
java
private double getWidthForMappingLine(RendererModel model) { double scale = model.getParameter(Scale.class).getValue(); return mappingLineWidth.getValue() / scale; }
[ "private", "double", "getWidthForMappingLine", "(", "RendererModel", "model", ")", "{", "double", "scale", "=", "model", ".", "getParameter", "(", "Scale", ".", "class", ")", ".", "getValue", "(", ")", ";", "return", "mappingLineWidth", ".", "getValue", "(", ...
Determine the width of an atom atom mapping, returning the width defined in the model. Note that this will be scaled to the space of the model. @param model the renderer model @return a double in chem-model space
[ "Determine", "the", "width", "of", "an", "atom", "atom", "mapping", "returning", "the", "width", "defined", "in", "the", "model", ".", "Note", "that", "this", "will", "be", "scaled", "to", "the", "space", "of", "the", "model", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/MappingGenerator.java#L116-L119
113,952
cdk/cdk
legacy/src/main/java/org/openscience/cdk/math/Complex.java
Complex.mul
public void mul(Complex c) { double newreal = real * c.real - imag * c.imag; double newimag = real * c.imag + imag * c.real; real = newreal; imag = newimag; }
java
public void mul(Complex c) { double newreal = real * c.real - imag * c.imag; double newimag = real * c.imag + imag * c.real; real = newreal; imag = newimag; }
[ "public", "void", "mul", "(", "Complex", "c", ")", "{", "double", "newreal", "=", "real", "*", "c", ".", "real", "-", "imag", "*", "c", ".", "imag", ";", "double", "newimag", "=", "real", "*", "c", ".", "imag", "+", "imag", "*", "c", ".", "real...
Multiply this value with a complex value
[ "Multiply", "this", "value", "with", "a", "complex", "value" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/Complex.java#L106-L111
113,953
cdk/cdk
legacy/src/main/java/org/openscience/cdk/math/Complex.java
Complex.div
public void div(Complex c) { double modulus = c.real * c.real + c.imag * c.imag; double newreal = imag * c.imag + real * c.real; double newimag = imag * c.real - real * c.imag; real = newreal / modulus; imag = newimag / modulus; }
java
public void div(Complex c) { double modulus = c.real * c.real + c.imag * c.imag; double newreal = imag * c.imag + real * c.real; double newimag = imag * c.real - real * c.imag; real = newreal / modulus; imag = newimag / modulus; }
[ "public", "void", "div", "(", "Complex", "c", ")", "{", "double", "modulus", "=", "c", ".", "real", "*", "c", ".", "real", "+", "c", ".", "imag", "*", "c", ".", "imag", ";", "double", "newreal", "=", "imag", "*", "c", ".", "imag", "+", "real", ...
Div this value by a complex value
[ "Div", "this", "value", "by", "a", "complex", "value" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/Complex.java#L116-L122
113,954
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/formula/rules/RDBERule.java
RDBERule.setParameters
@Override public void setParameters(Object[] params) throws CDKException { if (params.length != 2) throw new CDKException("RDBERule expects two parameters"); if (!(params[0] instanceof Double)) throw new CDKException("The 1 parameter must be of type Double"); if (!(params[1] instanceof Dou...
java
@Override public void setParameters(Object[] params) throws CDKException { if (params.length != 2) throw new CDKException("RDBERule expects two parameters"); if (!(params[0] instanceof Double)) throw new CDKException("The 1 parameter must be of type Double"); if (!(params[1] instanceof Dou...
[ "@", "Override", "public", "void", "setParameters", "(", "Object", "[", "]", "params", ")", "throws", "CDKException", "{", "if", "(", "params", ".", "length", "!=", "2", ")", "throw", "new", "CDKException", "(", "\"RDBERule expects two parameters\"", ")", ";",...
Sets the parameters attribute of the RDBE object. @param params The new parameters value @throws CDKException Description of the Exception @see #getParameters
[ "Sets", "the", "parameters", "attribute", "of", "the", "RDBE", "object", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/RDBERule.java#L89-L100
113,955
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/formula/rules/RDBERule.java
RDBERule.getParameters
@Override public Object[] getParameters() { // return the parameters as used for the rule validation Object[] params = new Object[2]; params[0] = min; params[1] = max; return params; }
java
@Override public Object[] getParameters() { // return the parameters as used for the rule validation Object[] params = new Object[2]; params[0] = min; params[1] = max; return params; }
[ "@", "Override", "public", "Object", "[", "]", "getParameters", "(", ")", "{", "// return the parameters as used for the rule validation", "Object", "[", "]", "params", "=", "new", "Object", "[", "2", "]", ";", "params", "[", "0", "]", "=", "min", ";", "para...
Gets the parameters attribute of the RDBRule object. @return The parameters value @see #setParameters
[ "Gets", "the", "parameters", "attribute", "of", "the", "RDBRule", "object", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/RDBERule.java#L108-L115
113,956
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/formula/rules/RDBERule.java
RDBERule.validate
@Override public double validate(IMolecularFormula formula) throws CDKException { logger.info("Start validation of ", formula); List<Double> RDBEList = getRDBEValue(formula); for (Iterator<Double> it = RDBEList.iterator(); it.hasNext();) { double RDBE = it.next(); if...
java
@Override public double validate(IMolecularFormula formula) throws CDKException { logger.info("Start validation of ", formula); List<Double> RDBEList = getRDBEValue(formula); for (Iterator<Double> it = RDBEList.iterator(); it.hasNext();) { double RDBE = it.next(); if...
[ "@", "Override", "public", "double", "validate", "(", "IMolecularFormula", "formula", ")", "throws", "CDKException", "{", "logger", ".", "info", "(", "\"Start validation of \"", ",", "formula", ")", ";", "List", "<", "Double", ">", "RDBEList", "=", "getRDBEValue...
Validate the RDBRule of this IMolecularFormula. @param formula Parameter is the IMolecularFormula @return A double value meaning 1.0 True, 0.0 False
[ "Validate", "the", "RDBRule", "of", "this", "IMolecularFormula", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/RDBERule.java#L124-L136
113,957
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/formula/rules/RDBERule.java
RDBERule.createTable
private void createTable() { if (oxidationStateTable == null) { oxidationStateTable = new HashMap<String, int[]>(); oxidationStateTable.put("H", new int[]{1}); // oxidationStateTable.put("Li", 1); // oxidationStateTable.put("Be", 2); ...
java
private void createTable() { if (oxidationStateTable == null) { oxidationStateTable = new HashMap<String, int[]>(); oxidationStateTable.put("H", new int[]{1}); // oxidationStateTable.put("Li", 1); // oxidationStateTable.put("Be", 2); ...
[ "private", "void", "createTable", "(", ")", "{", "if", "(", "oxidationStateTable", "==", "null", ")", "{", "oxidationStateTable", "=", "new", "HashMap", "<", "String", ",", "int", "[", "]", ">", "(", ")", ";", "oxidationStateTable", ".", "put", "(", "\"H...
Create the table with the common oxidation states
[ "Create", "the", "table", "with", "the", "common", "oxidation", "states" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/RDBERule.java#L241-L286
113,958
cdk/cdk
tool/fragment/src/main/java/org/openscience/cdk/fragment/FragmentUtils.java
FragmentUtils.splitMolecule
protected static List<IAtomContainer> splitMolecule(IAtomContainer atomContainer, IBond bond) { List<IAtomContainer> ret = new ArrayList<IAtomContainer>(); for (IAtom atom : bond.atoms()) { // later on we'll want to make sure that the fragment doesn't contain // the bond joinin...
java
protected static List<IAtomContainer> splitMolecule(IAtomContainer atomContainer, IBond bond) { List<IAtomContainer> ret = new ArrayList<IAtomContainer>(); for (IAtom atom : bond.atoms()) { // later on we'll want to make sure that the fragment doesn't contain // the bond joinin...
[ "protected", "static", "List", "<", "IAtomContainer", ">", "splitMolecule", "(", "IAtomContainer", "atomContainer", ",", "IBond", "bond", ")", "{", "List", "<", "IAtomContainer", ">", "ret", "=", "new", "ArrayList", "<", "IAtomContainer", ">", "(", ")", ";", ...
Non destructively split a molecule into two parts at the specified bond. Note that if a ring bond is specified, the resultant list will contain teh opened ring twice. @param atomContainer The molecule to split @param bond The bond to split at @return A list containing the two parts of the molecule
[ "Non", "destructively", "split", "a", "molecule", "into", "two", "parts", "at", "the", "specified", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/fragment/src/main/java/org/openscience/cdk/fragment/FragmentUtils.java#L54-L93
113,959
cdk/cdk
tool/fragment/src/main/java/org/openscience/cdk/fragment/FragmentUtils.java
FragmentUtils.makeAtomContainer
protected static IAtomContainer makeAtomContainer(IAtom atom, List<IBond> parts, IAtom excludedAtom) { IAtomContainer partContainer = atom.getBuilder().newInstance(IAtomContainer.class); partContainer.addAtom(atom); for (IBond aBond : parts) { for (IAtom bondedAtom : aBond.atoms()) {...
java
protected static IAtomContainer makeAtomContainer(IAtom atom, List<IBond> parts, IAtom excludedAtom) { IAtomContainer partContainer = atom.getBuilder().newInstance(IAtomContainer.class); partContainer.addAtom(atom); for (IBond aBond : parts) { for (IAtom bondedAtom : aBond.atoms()) {...
[ "protected", "static", "IAtomContainer", "makeAtomContainer", "(", "IAtom", "atom", ",", "List", "<", "IBond", ">", "parts", ",", "IAtom", "excludedAtom", ")", "{", "IAtomContainer", "partContainer", "=", "atom", ".", "getBuilder", "(", ")", ".", "newInstance", ...
splitting bond itself
[ "splitting", "bond", "itself" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/fragment/src/main/java/org/openscience/cdk/fragment/FragmentUtils.java#L99-L110
113,960
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/StabilizationPlusChargeDescriptor.java
StabilizationPlusChargeDescriptor.calculate
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer container) { IAtomContainer clone; IAtom localAtom; try { clone = (IAtomContainer) container.clone(); localAtom = clone.getAtom(container.indexOf(atom)); AtomContainerManipulator.percie...
java
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer container) { IAtomContainer clone; IAtom localAtom; try { clone = (IAtomContainer) container.clone(); localAtom = clone.getAtom(container.indexOf(atom)); AtomContainerManipulator.percie...
[ "@", "Override", "public", "DescriptorValue", "calculate", "(", "IAtom", "atom", ",", "IAtomContainer", "container", ")", "{", "IAtomContainer", "clone", ";", "IAtom", "localAtom", ";", "try", "{", "clone", "=", "(", "IAtomContainer", ")", "container", ".", "c...
The method calculates the stabilization of charge of a given atom It is needed to call the addExplicitHydrogensToSatisfyValency method from the class tools.HydrogenAdder. @param atom The IAtom for which the DescriptorValue is requested @param container AtomContainer @return return the stabilizat...
[ "The", "method", "calculates", "the", "stabilization", "of", "charge", "of", "a", "given", "atom", "It", "is", "needed", "to", "call", "the", "addExplicitHydrogensToSatisfyValency", "method", "from", "the", "class", "tools", ".", "HydrogenAdder", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/StabilizationPlusChargeDescriptor.java#L120-L141
113,961
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/DistanceToAtomDescriptor.java
DistanceToAtomDescriptor.setParameters
@Override public void setParameters(Object[] params) throws CDKException { if (params.length > 1) { throw new CDKException("DistanceToAtomDescriptor only expects two parameters"); } if (!(params[0] instanceof Integer)) { throw new CDKException("The parameter must be o...
java
@Override public void setParameters(Object[] params) throws CDKException { if (params.length > 1) { throw new CDKException("DistanceToAtomDescriptor only expects two parameters"); } if (!(params[0] instanceof Integer)) { throw new CDKException("The parameter must be o...
[ "@", "Override", "public", "void", "setParameters", "(", "Object", "[", "]", "params", ")", "throws", "CDKException", "{", "if", "(", "params", ".", "length", ">", "1", ")", "{", "throw", "new", "CDKException", "(", "\"DistanceToAtomDescriptor only expects two p...
Sets the parameters attribute of the DistanceToAtomDescriptor object @param params The parameter is the position to focus @exception CDKException Description of the Exception
[ "Sets", "the", "parameters", "attribute", "of", "the", "DistanceToAtomDescriptor", "object" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/DistanceToAtomDescriptor.java#L81-L90
113,962
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/DistanceToAtomDescriptor.java
DistanceToAtomDescriptor.calculate
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer container) { double distanceToAtom; IAtom focus = container.getAtom(focusPosition); if (atom.getPoint3d() == null || focus.getPoint3d() == null) { return new DescriptorValue(getSpecification(), getParameterNa...
java
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer container) { double distanceToAtom; IAtom focus = container.getAtom(focusPosition); if (atom.getPoint3d() == null || focus.getPoint3d() == null) { return new DescriptorValue(getSpecification(), getParameterNa...
[ "@", "Override", "public", "DescriptorValue", "calculate", "(", "IAtom", "atom", ",", "IAtomContainer", "container", ")", "{", "double", "distanceToAtom", ";", "IAtom", "focus", "=", "container", ".", "getAtom", "(", "focusPosition", ")", ";", "if", "(", "atom...
This method calculate the 3D distance between two atoms. @param atom The IAtom for which the DescriptorValue is requested @param container Parameter is the atom container. @return The number of bonds on the shortest path between two atoms
[ "This", "method", "calculate", "the", "3D", "distance", "between", "two", "atoms", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/DistanceToAtomDescriptor.java#L117-L135
113,963
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java
BondManipulator.isLowerOrder
public static boolean isLowerOrder(IBond.Order first, IBond.Order second) { if (first == null || second == null || first == IBond.Order.UNSET || second == IBond.Order.UNSET) return false; return first.compareTo(second) < 0; }
java
public static boolean isLowerOrder(IBond.Order first, IBond.Order second) { if (first == null || second == null || first == IBond.Order.UNSET || second == IBond.Order.UNSET) return false; return first.compareTo(second) < 0; }
[ "public", "static", "boolean", "isLowerOrder", "(", "IBond", ".", "Order", "first", ",", "IBond", ".", "Order", "second", ")", "{", "if", "(", "first", "==", "null", "||", "second", "==", "null", "||", "first", "==", "IBond", ".", "Order", ".", "UNSET"...
Returns true if the first bond has a lower bond order than the second bond. It returns false if the bond order is equal, and if the order of the first bond is larger than that of the second. Also returns false if either bond order is unset. @param first The first bond order object @param second The second bond order ...
[ "Returns", "true", "if", "the", "first", "bond", "has", "a", "lower", "bond", "order", "than", "the", "second", "bond", ".", "It", "returns", "false", "if", "the", "bond", "order", "is", "equal", "and", "if", "the", "order", "of", "the", "first", "bond...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java#L72-L76
113,964
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java
BondManipulator.increaseBondOrder
public static IBond.Order increaseBondOrder(IBond.Order oldOrder) { switch (oldOrder) { case SINGLE: return Order.DOUBLE; case DOUBLE: return Order.TRIPLE; case TRIPLE: return Order.QUADRUPLE; case QUADRUPLE: return Order.QUINTUPLE; ...
java
public static IBond.Order increaseBondOrder(IBond.Order oldOrder) { switch (oldOrder) { case SINGLE: return Order.DOUBLE; case DOUBLE: return Order.TRIPLE; case TRIPLE: return Order.QUADRUPLE; case QUADRUPLE: return Order.QUINTUPLE; ...
[ "public", "static", "IBond", ".", "Order", "increaseBondOrder", "(", "IBond", ".", "Order", "oldOrder", ")", "{", "switch", "(", "oldOrder", ")", "{", "case", "SINGLE", ":", "return", "Order", ".", "DOUBLE", ";", "case", "DOUBLE", ":", "return", "Order", ...
Returns the IBond.Order one higher. Does not increase the bond order beyond the QUADRUPLE bond order. @param oldOrder the old order @return The incremented bond order @see #increaseBondOrder(org.openscience.cdk.interfaces.IBond) @see #decreaseBondOrder(org.openscience.cdk.interfaces.IBond.Order) @see #decreaseBondOrder...
[ "Returns", "the", "IBond", ".", "Order", "one", "higher", ".", "Does", "not", "increase", "the", "bond", "order", "beyond", "the", "QUADRUPLE", "bond", "order", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java#L104-L119
113,965
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java
BondManipulator.createBondOrder
public static IBond.Order createBondOrder(double bondOrder) { for (IBond.Order order : IBond.Order.values()) { if (order.numeric().doubleValue() == bondOrder) return order; } return null; }
java
public static IBond.Order createBondOrder(double bondOrder) { for (IBond.Order order : IBond.Order.values()) { if (order.numeric().doubleValue() == bondOrder) return order; } return null; }
[ "public", "static", "IBond", ".", "Order", "createBondOrder", "(", "double", "bondOrder", ")", "{", "for", "(", "IBond", ".", "Order", "order", ":", "IBond", ".", "Order", ".", "values", "(", ")", ")", "{", "if", "(", "order", ".", "numeric", "(", ")...
Convenience method to convert a double into an IBond.Order. Returns NULL if the bond order is not 1.0, 2.0, 3.0 and 4.0. @param bondOrder The numerical bond order @return An instance of {@link org.openscience.cdk.interfaces.IBond.Order} @see #destroyBondOrder(org.openscience.cdk.interfaces.IBond.Order)
[ "Convenience", "method", "to", "convert", "a", "double", "into", "an", "IBond", ".", "Order", ".", "Returns", "NULL", "if", "the", "bond", "order", "is", "not", "1", ".", "0", "2", ".", "0", "3", ".", "0", "and", "4", ".", "0", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java#L178-L183
113,966
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java
BondManipulator.getMaximumBondOrder
public static IBond.Order getMaximumBondOrder(Iterator<IBond> bonds) { IBond.Order maxOrder = IBond.Order.SINGLE; while (bonds.hasNext()) { IBond bond = bonds.next(); if (isHigherOrder(bond.getOrder(), maxOrder)) maxOrder = bond.getOrder(); } return maxOrder; ...
java
public static IBond.Order getMaximumBondOrder(Iterator<IBond> bonds) { IBond.Order maxOrder = IBond.Order.SINGLE; while (bonds.hasNext()) { IBond bond = bonds.next(); if (isHigherOrder(bond.getOrder(), maxOrder)) maxOrder = bond.getOrder(); } return maxOrder; ...
[ "public", "static", "IBond", ".", "Order", "getMaximumBondOrder", "(", "Iterator", "<", "IBond", ">", "bonds", ")", "{", "IBond", ".", "Order", "maxOrder", "=", "IBond", ".", "Order", ".", "SINGLE", ";", "while", "(", "bonds", ".", "hasNext", "(", ")", ...
Returns the maximum bond order for a List of bonds, given an iterator to the list. @param bonds An iterator for the list of bonds @return The maximum bond order found @see #getMaximumBondOrder(java.util.List)
[ "Returns", "the", "maximum", "bond", "order", "for", "a", "List", "of", "bonds", "given", "an", "iterator", "to", "the", "list", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java#L218-L225
113,967
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java
BondManipulator.getMaximumBondOrder
public static IBond.Order getMaximumBondOrder(IBond firstBond, IBond secondBond) { if (firstBond == null || secondBond == null) throw new IllegalArgumentException("null instance of IBond provided"); return getMaximumBondOrder(firstBond.getOrder(), secondBond.getOrder()); }
java
public static IBond.Order getMaximumBondOrder(IBond firstBond, IBond secondBond) { if (firstBond == null || secondBond == null) throw new IllegalArgumentException("null instance of IBond provided"); return getMaximumBondOrder(firstBond.getOrder(), secondBond.getOrder()); }
[ "public", "static", "IBond", ".", "Order", "getMaximumBondOrder", "(", "IBond", "firstBond", ",", "IBond", "secondBond", ")", "{", "if", "(", "firstBond", "==", "null", "||", "secondBond", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"...
Returns the maximum bond order for the two bonds. @param firstBond first bond to compare @param secondBond second bond to compare @return The maximum bond order found
[ "Returns", "the", "maximum", "bond", "order", "for", "the", "two", "bonds", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java#L234-L238
113,968
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java
BondManipulator.getMaximumBondOrder
public static IBond.Order getMaximumBondOrder(IBond.Order firstOrder, IBond.Order secondOrder) { if (firstOrder == Order.UNSET) { if (secondOrder == Order.UNSET) throw new IllegalArgumentException("Both bond orders are unset"); return secondOrder; } if (secondOrder == Ord...
java
public static IBond.Order getMaximumBondOrder(IBond.Order firstOrder, IBond.Order secondOrder) { if (firstOrder == Order.UNSET) { if (secondOrder == Order.UNSET) throw new IllegalArgumentException("Both bond orders are unset"); return secondOrder; } if (secondOrder == Ord...
[ "public", "static", "IBond", ".", "Order", "getMaximumBondOrder", "(", "IBond", ".", "Order", "firstOrder", ",", "IBond", ".", "Order", "secondOrder", ")", "{", "if", "(", "firstOrder", "==", "Order", ".", "UNSET", ")", "{", "if", "(", "secondOrder", "==",...
Returns the maximum bond order for the two bond orders. @param firstOrder first bond order to compare @param secondOrder second bond order to compare @return The maximum bond order found
[ "Returns", "the", "maximum", "bond", "order", "for", "the", "two", "bond", "orders", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java#L247-L261
113,969
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java
BondManipulator.getMinimumBondOrder
public static IBond.Order getMinimumBondOrder(Iterator<IBond> bonds) { IBond.Order minOrder = IBond.Order.SEXTUPLE; while (bonds.hasNext()) { IBond bond = bonds.next(); if (isLowerOrder(bond.getOrder(), minOrder)) minOrder = bond.getOrder(); } return minOrder; ...
java
public static IBond.Order getMinimumBondOrder(Iterator<IBond> bonds) { IBond.Order minOrder = IBond.Order.SEXTUPLE; while (bonds.hasNext()) { IBond bond = bonds.next(); if (isLowerOrder(bond.getOrder(), minOrder)) minOrder = bond.getOrder(); } return minOrder; ...
[ "public", "static", "IBond", ".", "Order", "getMinimumBondOrder", "(", "Iterator", "<", "IBond", ">", "bonds", ")", "{", "IBond", ".", "Order", "minOrder", "=", "IBond", ".", "Order", ".", "SEXTUPLE", ";", "while", "(", "bonds", ".", "hasNext", "(", ")",...
Returns the minimum bond order for a List of bonds, given an iterator to the list. @param bonds An iterator for the list of bonds @return The minimum bond order found @see #getMinimumBondOrder(java.util.List)
[ "Returns", "the", "minimum", "bond", "order", "for", "a", "List", "of", "bonds", "given", "an", "iterator", "to", "the", "list", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java#L282-L289
113,970
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/EquitablePartitionRefiner.java
EquitablePartitionRefiner.split
private void split(Map<Invariant, SortedSet<Integer>> invariants, Partition partition) { int nonEmptyInvariants = invariants.keySet().size(); if (nonEmptyInvariants > 1) { List<Invariant> invariantKeys = new ArrayList<Invariant>(invariants.keySet()); partitio...
java
private void split(Map<Invariant, SortedSet<Integer>> invariants, Partition partition) { int nonEmptyInvariants = invariants.keySet().size(); if (nonEmptyInvariants > 1) { List<Invariant> invariantKeys = new ArrayList<Invariant>(invariants.keySet()); partitio...
[ "private", "void", "split", "(", "Map", "<", "Invariant", ",", "SortedSet", "<", "Integer", ">", ">", "invariants", ",", "Partition", "partition", ")", "{", "int", "nonEmptyInvariants", "=", "invariants", ".", "keySet", "(", ")", ".", "size", "(", ")", "...
Split the current block using the invariants calculated in getInvariants. @param invariants a map of neighbor counts to elements @param partition the partition that is being refined
[ "Split", "the", "current", "block", "using", "the", "invariants", "calculated", "in", "getInvariants", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/EquitablePartitionRefiner.java#L159-L181
113,971
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PiElectronegativityDescriptor.java
PiElectronegativityDescriptor.setParameters
@Override public void setParameters(Object[] params) throws CDKException { if (params.length > 3) throw new CDKException("PartialPiChargeDescriptor only expects three parameter"); if (!(params[0] instanceof Integer)) throw new CDKException("The parameter must be of type Integer"); maxIterat...
java
@Override public void setParameters(Object[] params) throws CDKException { if (params.length > 3) throw new CDKException("PartialPiChargeDescriptor only expects three parameter"); if (!(params[0] instanceof Integer)) throw new CDKException("The parameter must be of type Integer"); maxIterat...
[ "@", "Override", "public", "void", "setParameters", "(", "Object", "[", "]", "params", ")", "throws", "CDKException", "{", "if", "(", "params", ".", "length", ">", "3", ")", "throw", "new", "CDKException", "(", "\"PartialPiChargeDescriptor only expects three param...
Sets the parameters attribute of the PiElectronegativityDescriptor object @param params The number of maximum iterations. 1= maxIterations. 2= maxResonStruc. @exception CDKException Description of the Exception
[ "Sets", "the", "parameters", "attribute", "of", "the", "PiElectronegativityDescriptor", "object" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PiElectronegativityDescriptor.java#L98-L114
113,972
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PiElectronegativityDescriptor.java
PiElectronegativityDescriptor.getParameters
@Override public Object[] getParameters() { // return the parameters as used for the descriptor calculation Object[] params = new Object[3]; params[0] = maxIterations; params[1] = lpeChecker; params[2] = maxResonStruc; return params; }
java
@Override public Object[] getParameters() { // return the parameters as used for the descriptor calculation Object[] params = new Object[3]; params[0] = maxIterations; params[1] = lpeChecker; params[2] = maxResonStruc; return params; }
[ "@", "Override", "public", "Object", "[", "]", "getParameters", "(", ")", "{", "// return the parameters as used for the descriptor calculation", "Object", "[", "]", "params", "=", "new", "Object", "[", "3", "]", ";", "params", "[", "0", "]", "=", "maxIterations...
Gets the parameters attribute of the PiElectronegativityDescriptor object @return The parameters value
[ "Gets", "the", "parameters", "attribute", "of", "the", "PiElectronegativityDescriptor", "object" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PiElectronegativityDescriptor.java#L122-L130
113,973
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PiElectronegativityDescriptor.java
PiElectronegativityDescriptor.calculate
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer atomContainer) { IAtomContainer clone; IAtom localAtom; try { clone = (IAtomContainer) atomContainer.clone(); AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(clone); if (lpeC...
java
@Override public DescriptorValue calculate(IAtom atom, IAtomContainer atomContainer) { IAtomContainer clone; IAtom localAtom; try { clone = (IAtomContainer) atomContainer.clone(); AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(clone); if (lpeC...
[ "@", "Override", "public", "DescriptorValue", "calculate", "(", "IAtom", "atom", ",", "IAtomContainer", "atomContainer", ")", "{", "IAtomContainer", "clone", ";", "IAtom", "localAtom", ";", "try", "{", "clone", "=", "(", "IAtomContainer", ")", "atomContainer", "...
The method calculates the pi electronegativity of a given atom It is needed to call the addExplicitHydrogensToSatisfyValency method from the class tools.HydrogenAdder. @param atom The IAtom for which the DescriptorValue is requested @param atomContainer AtomContainer @return ...
[ "The", "method", "calculates", "the", "pi", "electronegativity", "of", "a", "given", "atom", "It", "is", "needed", "to", "call", "the", "addExplicitHydrogensToSatisfyValency", "method", "from", "the", "class", "tools", ".", "HydrogenAdder", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PiElectronegativityDescriptor.java#L145-L172
113,974
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PiElectronegativityDescriptor.java
PiElectronegativityDescriptor.getParameterNames
@Override public String[] getParameterNames() { String[] params = new String[3]; params[0] = "maxIterations"; params[1] = "lpeChecker"; params[2] = "maxResonStruc"; return params; }
java
@Override public String[] getParameterNames() { String[] params = new String[3]; params[0] = "maxIterations"; params[1] = "lpeChecker"; params[2] = "maxResonStruc"; return params; }
[ "@", "Override", "public", "String", "[", "]", "getParameterNames", "(", ")", "{", "String", "[", "]", "params", "=", "new", "String", "[", "3", "]", ";", "params", "[", "0", "]", "=", "\"maxIterations\"", ";", "params", "[", "1", "]", "=", "\"lpeChe...
Gets the parameterNames attribute of the SigmaElectronegativityDescriptor object @return The parameterNames value
[ "Gets", "the", "parameterNames", "attribute", "of", "the", "SigmaElectronegativityDescriptor", "object" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PiElectronegativityDescriptor.java#L180-L187
113,975
cdk/cdk
descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PiElectronegativityDescriptor.java
PiElectronegativityDescriptor.getParameterType
@Override public Object getParameterType(String name) { if ("maxIterations".equals(name)) return Integer.MAX_VALUE; if ("lpeChecker".equals(name)) return Boolean.TRUE; if ("maxResonStruc".equals(name)) return Integer.MAX_VALUE; return null; }
java
@Override public Object getParameterType(String name) { if ("maxIterations".equals(name)) return Integer.MAX_VALUE; if ("lpeChecker".equals(name)) return Boolean.TRUE; if ("maxResonStruc".equals(name)) return Integer.MAX_VALUE; return null; }
[ "@", "Override", "public", "Object", "getParameterType", "(", "String", "name", ")", "{", "if", "(", "\"maxIterations\"", ".", "equals", "(", "name", ")", ")", "return", "Integer", ".", "MAX_VALUE", ";", "if", "(", "\"lpeChecker\"", ".", "equals", "(", "na...
Gets the parameterType attribute of the SigmaElectronegativityDescriptor object @param name Description of the Parameter @return The parameterType value
[ "Gets", "the", "parameterType", "attribute", "of", "the", "SigmaElectronegativityDescriptor", "object" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PiElectronegativityDescriptor.java#L196-L202
113,976
cdk/cdk
legacy/src/main/java/org/openscience/cdk/math/IMatrix.java
IMatrix.getVectorFromRow
public IVector getVectorFromRow(int index) { IVector result = new IVector(columns); for (int i = 0; i < columns; i++) { result.realvector[i] = realmatrix[index][i]; result.imagvector[i] = imagmatrix[index][i]; } return result; }
java
public IVector getVectorFromRow(int index) { IVector result = new IVector(columns); for (int i = 0; i < columns; i++) { result.realvector[i] = realmatrix[index][i]; result.imagvector[i] = imagmatrix[index][i]; } return result; }
[ "public", "IVector", "getVectorFromRow", "(", "int", "index", ")", "{", "IVector", "result", "=", "new", "IVector", "(", "columns", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "columns", ";", "i", "++", ")", "{", "result", ".", "real...
Creates a vector with the content of a row from this matrix
[ "Creates", "a", "vector", "with", "the", "content", "of", "a", "row", "from", "this", "matrix" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/IMatrix.java#L85-L92
113,977
cdk/cdk
legacy/src/main/java/org/openscience/cdk/math/IMatrix.java
IMatrix.getVectorFromColumn
public IVector getVectorFromColumn(int index) { IVector result = new IVector(rows); for (int i = 0; i < rows; i++) { result.realvector[i] = realmatrix[i][index]; result.imagvector[i] = imagmatrix[i][index]; } return result; }
java
public IVector getVectorFromColumn(int index) { IVector result = new IVector(rows); for (int i = 0; i < rows; i++) { result.realvector[i] = realmatrix[i][index]; result.imagvector[i] = imagmatrix[i][index]; } return result; }
[ "public", "IVector", "getVectorFromColumn", "(", "int", "index", ")", "{", "IVector", "result", "=", "new", "IVector", "(", "rows", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "rows", ";", "i", "++", ")", "{", "result", ".", "realvec...
Creates a vector with the content of a column from this matrix
[ "Creates", "a", "vector", "with", "the", "content", "of", "a", "column", "from", "this", "matrix" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/IMatrix.java#L97-L104
113,978
cdk/cdk
legacy/src/main/java/org/openscience/cdk/math/IMatrix.java
IMatrix.getVectorFromDiagonal
public IVector getVectorFromDiagonal() { int size = Math.min(rows, columns); IVector result = new IVector(size); for (int i = 0; i < rows; i++) { result.realvector[i] = realmatrix[i][i]; result.imagvector[i] = imagmatrix[i][i]; } return result; }
java
public IVector getVectorFromDiagonal() { int size = Math.min(rows, columns); IVector result = new IVector(size); for (int i = 0; i < rows; i++) { result.realvector[i] = realmatrix[i][i]; result.imagvector[i] = imagmatrix[i][i]; } return result; }
[ "public", "IVector", "getVectorFromDiagonal", "(", ")", "{", "int", "size", "=", "Math", ".", "min", "(", "rows", ",", "columns", ")", ";", "IVector", "result", "=", "new", "IVector", "(", "size", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i...
Creates a vector with the content of the diagonal elements from this matrix
[ "Creates", "a", "vector", "with", "the", "content", "of", "the", "diagonal", "elements", "from", "this", "matrix" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/IMatrix.java#L109-L117
113,979
cdk/cdk
legacy/src/main/java/org/openscience/cdk/math/IMatrix.java
IMatrix.add
public IMatrix add(IMatrix b) { IMatrix result = new IMatrix(rows, columns); add(b, result); return result; }
java
public IMatrix add(IMatrix b) { IMatrix result = new IMatrix(rows, columns); add(b, result); return result; }
[ "public", "IMatrix", "add", "(", "IMatrix", "b", ")", "{", "IMatrix", "result", "=", "new", "IMatrix", "(", "rows", ",", "columns", ")", ";", "add", "(", "b", ",", "result", ")", ";", "return", "result", ";", "}" ]
Addition from two matrices
[ "Addition", "from", "two", "matrices" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/IMatrix.java#L122-L126
113,980
cdk/cdk
legacy/src/main/java/org/openscience/cdk/math/IMatrix.java
IMatrix.contraction
public Complex contraction() { int i, j; Complex result = new Complex(0d, 0d); for (i = 0; i < rows; i++) for (j = 0; j < columns; j++) { result.real += realmatrix[i][j]; result.imag += imagmatrix[i][j]; } return result; }
java
public Complex contraction() { int i, j; Complex result = new Complex(0d, 0d); for (i = 0; i < rows; i++) for (j = 0; j < columns; j++) { result.real += realmatrix[i][j]; result.imag += imagmatrix[i][j]; } return result; }
[ "public", "Complex", "contraction", "(", ")", "{", "int", "i", ",", "j", ";", "Complex", "result", "=", "new", "Complex", "(", "0d", ",", "0d", ")", ";", "for", "(", "i", "=", "0", ";", "i", "<", "rows", ";", "i", "++", ")", "for", "(", "j", ...
Calculates the contraction from a matrix
[ "Calculates", "the", "contraction", "from", "a", "matrix" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/IMatrix.java#L340-L349
113,981
cdk/cdk
legacy/src/main/java/org/openscience/cdk/math/IMatrix.java
IMatrix.reshape
public void reshape(int newrows, int newcolumns) { if (((newrows == rows) && (newcolumns == columns)) || (newrows <= 0) || (newcolumns <= 0)) return; double[][] newrealmatrix = new double[newrows][newcolumns]; double[][] newimagmatrix = new double[newrows][newcolumns]; int minrows = Mat...
java
public void reshape(int newrows, int newcolumns) { if (((newrows == rows) && (newcolumns == columns)) || (newrows <= 0) || (newcolumns <= 0)) return; double[][] newrealmatrix = new double[newrows][newcolumns]; double[][] newimagmatrix = new double[newrows][newcolumns]; int minrows = Mat...
[ "public", "void", "reshape", "(", "int", "newrows", ",", "int", "newcolumns", ")", "{", "if", "(", "(", "(", "newrows", "==", "rows", ")", "&&", "(", "newcolumns", "==", "columns", ")", ")", "||", "(", "newrows", "<=", "0", ")", "||", "(", "newcolu...
Resize the matrix
[ "Resize", "the", "matrix" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/IMatrix.java#L394-L430
113,982
cdk/cdk
tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java
MmffAromaticTypeMapping.updateAromaticTypesInSixMemberRing
static void updateAromaticTypesInSixMemberRing(int[] cycle, String[] symbs) { for (final int v : cycle) { if (NCN_PLUS.equals(symbs[v]) || "N+=C".equals(symbs[v]) || "N=+C".equals(symbs[v])) symbs[v] = "NPD+"; else if ("N2OX".equals(symbs[v])) symbs[v] = "...
java
static void updateAromaticTypesInSixMemberRing(int[] cycle, String[] symbs) { for (final int v : cycle) { if (NCN_PLUS.equals(symbs[v]) || "N+=C".equals(symbs[v]) || "N=+C".equals(symbs[v])) symbs[v] = "NPD+"; else if ("N2OX".equals(symbs[v])) symbs[v] = "...
[ "static", "void", "updateAromaticTypesInSixMemberRing", "(", "int", "[", "]", "cycle", ",", "String", "[", "]", "symbs", ")", "{", "for", "(", "final", "int", "v", ":", "cycle", ")", "{", "if", "(", "NCN_PLUS", ".", "equals", "(", "symbs", "[", "v", ...
Update aromatic atom types in a six member ring. The aromatic types here are hard coded from the 'MMFFAROM.PAR' file. @param cycle 6-member aromatic cycle / ring @param symbs vector of symbolic types for the whole structure
[ "Update", "aromatic", "atom", "types", "in", "a", "six", "member", "ring", ".", "The", "aromatic", "types", "here", "are", "hard", "coded", "from", "the", "MMFFAROM", ".", "PAR", "file", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java#L225-L235
113,983
cdk/cdk
tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java
MmffAromaticTypeMapping.indexOfHetro
static int indexOfHetro(int[] cycle, int[] contribution) { int index = -1; for (int i = 0; i < cycle.length - 1; i++) { if (contribution[cycle[i]] == 2) index = index == -1 ? i : -2; } return index; }
java
static int indexOfHetro(int[] cycle, int[] contribution) { int index = -1; for (int i = 0; i < cycle.length - 1; i++) { if (contribution[cycle[i]] == 2) index = index == -1 ? i : -2; } return index; }
[ "static", "int", "indexOfHetro", "(", "int", "[", "]", "cycle", ",", "int", "[", "]", "contribution", ")", "{", "int", "index", "=", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "cycle", ".", "length", "-", "1", ";", "i", "...
Find the index of a hetroatom in a cycle. A hetroatom in MMFF is the unique atom that contributes a pi-lone-pair to the aromatic system. @param cycle aromatic cycle, |C| = 5 @param contribution vector of p electron contributions from each vertex @return index of hetroatom, if none found index is < 0.
[ "Find", "the", "index", "of", "a", "hetroatom", "in", "a", "cycle", ".", "A", "hetroatom", "in", "MMFF", "is", "the", "unique", "atom", "that", "contributes", "a", "pi", "-", "lone", "-", "pair", "to", "the", "aromatic", "system", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java#L323-L329
113,984
cdk/cdk
tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java
MmffAromaticTypeMapping.contribution
@SuppressWarnings("PMD.CyclomaticComplexity") // high complexity but clean static int contribution(int elem, int x, int v) { switch (elem) { case 6: if (x == 3 && v == 4) return 1; // pi bond *-C=* break; case 7: if (x == 2 && v == ...
java
@SuppressWarnings("PMD.CyclomaticComplexity") // high complexity but clean static int contribution(int elem, int x, int v) { switch (elem) { case 6: if (x == 3 && v == 4) return 1; // pi bond *-C=* break; case 7: if (x == 2 && v == ...
[ "@", "SuppressWarnings", "(", "\"PMD.CyclomaticComplexity\"", ")", "// high complexity but clean", "static", "int", "contribution", "(", "int", "elem", ",", "int", "x", ",", "int", "v", ")", "{", "switch", "(", "elem", ")", "{", "case", "6", ":", "if", "(", ...
Electron contribution of an element with the specified connectivity and valence. @param elem atomic number @param x connectivity @param v bonded valence @return p electrons
[ "Electron", "contribution", "of", "an", "element", "with", "the", "specified", "connectivity", "and", "valence", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java#L362-L381
113,985
cdk/cdk
tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java
MmffAromaticTypeMapping.setupContributionAndDoubleBonds
private static void setupContributionAndDoubleBonds(IAtomContainer molecule, EdgeToBondMap bonds, int[][] graph, int[] contribution, int[] dbs) { // fill the contribution and dbs vectors for (int v = 0; v < graph.length; v++) { // hydrogens, valence, and connectivity ...
java
private static void setupContributionAndDoubleBonds(IAtomContainer molecule, EdgeToBondMap bonds, int[][] graph, int[] contribution, int[] dbs) { // fill the contribution and dbs vectors for (int v = 0; v < graph.length; v++) { // hydrogens, valence, and connectivity ...
[ "private", "static", "void", "setupContributionAndDoubleBonds", "(", "IAtomContainer", "molecule", ",", "EdgeToBondMap", "bonds", ",", "int", "[", "]", "[", "]", "graph", ",", "int", "[", "]", "contribution", ",", "int", "[", "]", "dbs", ")", "{", "// fill t...
Internal - sets up the 'contribution' and 'dbs' vectors. These define how many pi electrons an atom can contribute and provide a lookup of the double bonded neighbour. @param molecule structure representation @param bonds edge to bond map lookup @param graph adjacency list graph representation of str...
[ "Internal", "-", "sets", "up", "the", "contribution", "and", "dbs", "vectors", ".", "These", "define", "how", "many", "pi", "electrons", "an", "atom", "can", "contribute", "and", "provide", "a", "lookup", "of", "the", "double", "bonded", "neighbour", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAromaticTypeMapping.java#L408-L428
113,986
cdk/cdk
storage/libiomd/src/main/java/org/openscience/cdk/io/cml/MDMoleculeConvention.java
MDMoleculeConvention.endElement
@Override public void endElement(CMLStack xpath, String uri, String name, String raw) { if (name.equals("molecule")) { // System.out.println("Ending element mdmolecule"); // add chargeGroup, and then delete them if (currentChargeGroup != null) { if (curr...
java
@Override public void endElement(CMLStack xpath, String uri, String name, String raw) { if (name.equals("molecule")) { // System.out.println("Ending element mdmolecule"); // add chargeGroup, and then delete them if (currentChargeGroup != null) { if (curr...
[ "@", "Override", "public", "void", "endElement", "(", "CMLStack", "xpath", ",", "String", "uri", ",", "String", "name", ",", "String", "raw", ")", "{", "if", "(", "name", ".", "equals", "(", "\"molecule\"", ")", ")", "{", "//\t\t\tSystem.out.println(\"Ending...
Finish up parsing of elements in mdmolecule.
[ "Finish", "up", "parsing", "of", "elements", "in", "mdmolecule", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/libiomd/src/main/java/org/openscience/cdk/io/cml/MDMoleculeConvention.java#L184-L240
113,987
cdk/cdk
base/reaction/src/main/java/org/openscience/cdk/reaction/type/ElectronImpactSDBReaction.java
ElectronImpactSDBReaction.setActiveCenters
private void setActiveCenters(IAtomContainer reactant) throws CDKException { Iterator<IBond> bonds = reactant.bonds().iterator(); while (bonds.hasNext()) { IBond bondi = bonds.next(); IAtom atom1 = bondi.getBegin(); IAtom atom2 = bondi.getEnd(); if (bondi....
java
private void setActiveCenters(IAtomContainer reactant) throws CDKException { Iterator<IBond> bonds = reactant.bonds().iterator(); while (bonds.hasNext()) { IBond bondi = bonds.next(); IAtom atom1 = bondi.getBegin(); IAtom atom2 = bondi.getEnd(); if (bondi....
[ "private", "void", "setActiveCenters", "(", "IAtomContainer", "reactant", ")", "throws", "CDKException", "{", "Iterator", "<", "IBond", ">", "bonds", "=", "reactant", ".", "bonds", "(", ")", ".", "iterator", "(", ")", ";", "while", "(", "bonds", ".", "hasN...
Set the active center for this molecule. The active center will be single bonds. As default is only those atoms without charge and between a sigma bond. @param reactant The molecule to set the activity @throws CDKException
[ "Set", "the", "active", "center", "for", "this", "molecule", ".", "The", "active", "center", "will", "be", "single", "bonds", ".", "As", "default", "is", "only", "those", "atoms", "without", "charge", "and", "between", "a", "sigma", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/reaction/src/main/java/org/openscience/cdk/reaction/type/ElectronImpactSDBReaction.java#L172-L188
113,988
cdk/cdk
tool/forcefield/src/main/java/org/openscience/cdk/charges/MMFF94PartialCharges.java
MMFF94PartialCharges.assignMMFF94PartialCharges
public IAtomContainer assignMMFF94PartialCharges(IAtomContainer ac) throws CDKException { if (!mmff.assignAtomTypes(ac)) throw new CDKException("Molecule had an atom of unknown MMFF type"); mmff.partialCharges(ac); mmff.clearProps(ac); for (IAtom atom : ac.atoms()) ...
java
public IAtomContainer assignMMFF94PartialCharges(IAtomContainer ac) throws CDKException { if (!mmff.assignAtomTypes(ac)) throw new CDKException("Molecule had an atom of unknown MMFF type"); mmff.partialCharges(ac); mmff.clearProps(ac); for (IAtom atom : ac.atoms()) ...
[ "public", "IAtomContainer", "assignMMFF94PartialCharges", "(", "IAtomContainer", "ac", ")", "throws", "CDKException", "{", "if", "(", "!", "mmff", ".", "assignAtomTypes", "(", "ac", ")", ")", "throw", "new", "CDKException", "(", "\"Molecule had an atom of unknown MMFF...
Main method which assigns MMFF94 partial charges @param ac AtomContainer @return AtomContainer with MMFF94 partial charges as atom properties
[ "Main", "method", "which", "assigns", "MMFF94", "partial", "charges" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/charges/MMFF94PartialCharges.java#L73-L81
113,989
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LargestPiSystemDescriptor.java
LargestPiSystemDescriptor.breadthFirstSearch
private void breadthFirstSearch(IAtomContainer container, List<IAtom> sphere, List<IAtom> path) throws CDKException { IAtom nextAtom; List<IAtom> newSphere = new ArrayList<IAtom>(); //logger.debug("Start of breadthFirstSearch"); for (IAtom atom : sphere) { //logger.debug("Bre...
java
private void breadthFirstSearch(IAtomContainer container, List<IAtom> sphere, List<IAtom> path) throws CDKException { IAtom nextAtom; List<IAtom> newSphere = new ArrayList<IAtom>(); //logger.debug("Start of breadthFirstSearch"); for (IAtom atom : sphere) { //logger.debug("Bre...
[ "private", "void", "breadthFirstSearch", "(", "IAtomContainer", "container", ",", "List", "<", "IAtom", ">", "sphere", ",", "List", "<", "IAtom", ">", "path", ")", "throws", "CDKException", "{", "IAtom", "nextAtom", ";", "List", "<", "IAtom", ">", "newSphere...
Performs a breadthFirstSearch in an AtomContainer starting with a particular sphere, which usually consists of one start atom, and searches for a pi system. @param container The AtomContainer to be searched @param sphere A sphere of atoms to start the search with @param path An array list which stores the atom...
[ "Performs", "a", "breadthFirstSearch", "in", "an", "AtomContainer", "starting", "with", "a", "particular", "sphere", "which", "usually", "consists", "of", "one", "start", "atom", "and", "searches", "for", "a", "pi", "system", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LargestPiSystemDescriptor.java#L237-L265
113,990
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java
DfState.findBuilder
private static IChemObjectBuilder findBuilder() { if (BUILDER != null) return BUILDER; for (String name : new String[]{ "org.openscience.cdk.silent.SilentChemObjectBuilder", "org.openscience.cdk.DefaultChemObjectBuilder" }) { try { ...
java
private static IChemObjectBuilder findBuilder() { if (BUILDER != null) return BUILDER; for (String name : new String[]{ "org.openscience.cdk.silent.SilentChemObjectBuilder", "org.openscience.cdk.DefaultChemObjectBuilder" }) { try { ...
[ "private", "static", "IChemObjectBuilder", "findBuilder", "(", ")", "{", "if", "(", "BUILDER", "!=", "null", ")", "return", "BUILDER", ";", "for", "(", "String", "name", ":", "new", "String", "[", "]", "{", "\"org.openscience.cdk.silent.SilentChemObjectBuilder\"",...
with the query
[ "with", "the", "query" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java#L163-L179
113,991
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java
DfState.prepare
private int prepare(IAtom atom, IBond prev) { int count = 0; amap[atom.getIndex()] = 1; for (IBond bond : atom.bonds()) { if (bond == prev) continue; IAtom nbr = bond.getOther(atom); if (amap[nbr.getIndex()] == 0) { qbonds[numBo...
java
private int prepare(IAtom atom, IBond prev) { int count = 0; amap[atom.getIndex()] = 1; for (IBond bond : atom.bonds()) { if (bond == prev) continue; IAtom nbr = bond.getOther(atom); if (amap[nbr.getIndex()] == 0) { qbonds[numBo...
[ "private", "int", "prepare", "(", "IAtom", "atom", ",", "IBond", "prev", ")", "{", "int", "count", "=", "0", ";", "amap", "[", "atom", ".", "getIndex", "(", ")", "]", "=", "1", ";", "for", "(", "IBond", "bond", ":", "atom", ".", "bonds", "(", "...
prepare the query, the required stack size is returned
[ "prepare", "the", "query", "the", "required", "stack", "size", "is", "returned" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java#L182-L198
113,992
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java
DfState.setMol
void setMol(IAtomContainer mol) { this.mol = mol; Arrays.fill(amap, -1); numMapped = 0; this.avisit = new boolean[mol.getAtomCount()]; sptr = 0; store(0, null); }
java
void setMol(IAtomContainer mol) { this.mol = mol; Arrays.fill(amap, -1); numMapped = 0; this.avisit = new boolean[mol.getAtomCount()]; sptr = 0; store(0, null); }
[ "void", "setMol", "(", "IAtomContainer", "mol", ")", "{", "this", ".", "mol", "=", "mol", ";", "Arrays", ".", "fill", "(", "amap", ",", "-", "1", ")", ";", "numMapped", "=", "0", ";", "this", ".", "avisit", "=", "new", "boolean", "[", "mol", ".",...
Set the molecule to be matched. @param mol the molecule
[ "Set", "the", "molecule", "to", "be", "matched", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java#L204-L211
113,993
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java
DfState.feasible
private boolean feasible(int bidx, IQueryAtom qatom, IAtom atom) { int aidx = atom.getIndex(); if (avisit[aidx] || !qatom.matches(atom)) return false; ++numMapped; amap[qatom.getIndex()] = aidx; avisit[aidx] = true; store(bidx, qatom); return true; ...
java
private boolean feasible(int bidx, IQueryAtom qatom, IAtom atom) { int aidx = atom.getIndex(); if (avisit[aidx] || !qatom.matches(atom)) return false; ++numMapped; amap[qatom.getIndex()] = aidx; avisit[aidx] = true; store(bidx, qatom); return true; ...
[ "private", "boolean", "feasible", "(", "int", "bidx", ",", "IQueryAtom", "qatom", ",", "IAtom", "atom", ")", "{", "int", "aidx", "=", "atom", ".", "getIndex", "(", ")", ";", "if", "(", "avisit", "[", "aidx", "]", "||", "!", "qatom", ".", "matches", ...
Determine if a atom from the molecule is unvisited and if it is matched by the query atom. If the match is feasible the provided query bond index stored on the stack. @param qatom atom from the query @param atom atom from the molecule @return the match was feasible and the state was stored
[ "Determine", "if", "a", "atom", "from", "the", "molecule", "is", "unvisited", "and", "if", "it", "is", "matched", "by", "the", "query", "atom", ".", "If", "the", "match", "is", "feasible", "the", "provided", "query", "bond", "index", "stored", "on", "the...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java#L287-L296
113,994
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java
DfState.feasible
private boolean feasible(IQueryBond qbond, IBond bond) { if (bond == null || !qbond.matches(bond)) return false; store(currBondIdx() + 1, null); return true; }
java
private boolean feasible(IQueryBond qbond, IBond bond) { if (bond == null || !qbond.matches(bond)) return false; store(currBondIdx() + 1, null); return true; }
[ "private", "boolean", "feasible", "(", "IQueryBond", "qbond", ",", "IBond", "bond", ")", "{", "if", "(", "bond", "==", "null", "||", "!", "qbond", ".", "matches", "(", "bond", ")", ")", "return", "false", ";", "store", "(", "currBondIdx", "(", ")", "...
Determine if a bond from the molecule exists and if it is matched by the query bond. If the match is feasible the current query bond index is increment and stored on the stack. @param qbond bond from the query @param bond bond from the molecule @return the match was feasible and the state was stored
[ "Determine", "if", "a", "bond", "from", "the", "molecule", "exists", "and", "if", "it", "is", "matched", "by", "the", "query", "bond", ".", "If", "the", "match", "is", "feasible", "the", "current", "query", "bond", "index", "is", "increment", "and", "sto...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java#L307-L312
113,995
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java
DfState.matchNext
boolean matchNext() { if (numAtoms == 0) return false; if (sptr > 1) backtrack(); main: while (sptr != 0) { final int bidx = currBondIdx(); if (bidx == numBonds) { // done if (numMapped == numAtoms) ...
java
boolean matchNext() { if (numAtoms == 0) return false; if (sptr > 1) backtrack(); main: while (sptr != 0) { final int bidx = currBondIdx(); if (bidx == numBonds) { // done if (numMapped == numAtoms) ...
[ "boolean", "matchNext", "(", ")", "{", "if", "(", "numAtoms", "==", "0", ")", "return", "false", ";", "if", "(", "sptr", ">", "1", ")", "backtrack", "(", ")", ";", "main", ":", "while", "(", "sptr", "!=", "0", ")", "{", "final", "int", "bidx", ...
Primary match function, if this function returns true the algorithm has found a match. Calling it again will backtrack and find the next match. @return a mapping was found
[ "Primary", "match", "function", "if", "this", "function", "returns", "true", "the", "algorithm", "has", "found", "a", "match", ".", "Calling", "it", "again", "will", "backtrack", "and", "find", "the", "next", "match", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfState.java#L321-L399
113,996
cdk/cdk
storage/io/src/main/java/org/openscience/cdk/io/XYZWriter.java
XYZWriter.writeMolecule
public void writeMolecule(IAtomContainer mol) throws IOException { String st = ""; boolean writecharge = true; try { String s1 = "" + mol.getAtomCount(); writer.write(s1, 0, s1.length()); writer.write('\n'); String s2 = null; // FIXME: add some...
java
public void writeMolecule(IAtomContainer mol) throws IOException { String st = ""; boolean writecharge = true; try { String s1 = "" + mol.getAtomCount(); writer.write(s1, 0, s1.length()); writer.write('\n'); String s2 = null; // FIXME: add some...
[ "public", "void", "writeMolecule", "(", "IAtomContainer", "mol", ")", "throws", "IOException", "{", "String", "st", "=", "\"\"", ";", "boolean", "writecharge", "=", "true", ";", "try", "{", "String", "s1", "=", "\"\"", "+", "mol", ".", "getAtomCount", "(",...
writes a single frame in XYZ format to the Writer. @param mol the Molecule to write
[ "writes", "a", "single", "frame", "in", "XYZ", "format", "to", "the", "Writer", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/XYZWriter.java#L140-L185
113,997
cdk/cdk
base/data/src/main/java/org/openscience/cdk/Bond.java
Bond.setAtoms
@Override public void setAtoms(IAtom[] atoms) { this.atoms = atoms; atomCount = atoms.length; notifyChanged(); }
java
@Override public void setAtoms(IAtom[] atoms) { this.atoms = atoms; atomCount = atoms.length; notifyChanged(); }
[ "@", "Override", "public", "void", "setAtoms", "(", "IAtom", "[", "]", "atoms", ")", "{", "this", ".", "atoms", "=", "atoms", ";", "atomCount", "=", "atoms", ".", "length", ";", "notifyChanged", "(", ")", ";", "}" ]
Sets the array of atoms making up this bond. @param atoms An array of atoms that forms this bond @see #atoms
[ "Sets", "the", "array", "of", "atoms", "making", "up", "this", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Bond.java#L219-L224
113,998
cdk/cdk
base/data/src/main/java/org/openscience/cdk/Bond.java
Bond.contains
@Override public boolean contains(IAtom atom) { if (atoms == null) return false; for (IAtom localAtom : atoms) { if (localAtom.equals(atom)) return true; } return false; }
java
@Override public boolean contains(IAtom atom) { if (atoms == null) return false; for (IAtom localAtom : atoms) { if (localAtom.equals(atom)) return true; } return false; }
[ "@", "Override", "public", "boolean", "contains", "(", "IAtom", "atom", ")", "{", "if", "(", "atoms", "==", "null", ")", "return", "false", ";", "for", "(", "IAtom", "localAtom", ":", "atoms", ")", "{", "if", "(", "localAtom", ".", "equals", "(", "at...
Returns true if the given atom participates in this bond. @param atom The atom to be tested if it participates in this bond @return true if the atom participates in this bond
[ "Returns", "true", "if", "the", "given", "atom", "participates", "in", "this", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Bond.java#L309-L316
113,999
cdk/cdk
base/data/src/main/java/org/openscience/cdk/Bond.java
Bond.get2DCenter
@Override public Point2d get2DCenter() { double xOfCenter = 0; double yOfCenter = 0; for (IAtom atom : atoms) { xOfCenter += atom.getPoint2d().x; yOfCenter += atom.getPoint2d().y; } return new Point2d(xOfCenter / ((double) getAtomCount()), yOfCenter /...
java
@Override public Point2d get2DCenter() { double xOfCenter = 0; double yOfCenter = 0; for (IAtom atom : atoms) { xOfCenter += atom.getPoint2d().x; yOfCenter += atom.getPoint2d().y; } return new Point2d(xOfCenter / ((double) getAtomCount()), yOfCenter /...
[ "@", "Override", "public", "Point2d", "get2DCenter", "(", ")", "{", "double", "xOfCenter", "=", "0", ";", "double", "yOfCenter", "=", "0", ";", "for", "(", "IAtom", "atom", ":", "atoms", ")", "{", "xOfCenter", "+=", "atom", ".", "getPoint2d", "(", ")",...
Returns the geometric 2D center of the bond. @return The geometric 2D center of the bond
[ "Returns", "the", "geometric", "2D", "center", "of", "the", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Bond.java#L419-L429