id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
114,900 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/RoundRobinFormulaGenerator.java | RangeMassDecomposer.calcERT | private void calcERT(int deviation) {
final int[][][] ERTs = this.ERTs;
final int currentLength = ERTs.length;
// we have to extend the ERT table
int[][] lastERT = ERTs[ERTs.length - 1];
int[][] nextERT = new int[lastERT.length][weights.size()];
if (currentLength == 1) ... | java | private void calcERT(int deviation) {
final int[][][] ERTs = this.ERTs;
final int currentLength = ERTs.length;
// we have to extend the ERT table
int[][] lastERT = ERTs[ERTs.length - 1];
int[][] nextERT = new int[lastERT.length][weights.size()];
if (currentLength == 1) ... | [
"private",
"void",
"calcERT",
"(",
"int",
"deviation",
")",
"{",
"final",
"int",
"[",
"]",
"[",
"]",
"[",
"]",
"ERTs",
"=",
"this",
".",
"ERTs",
";",
"final",
"int",
"currentLength",
"=",
"ERTs",
".",
"length",
";",
"// we have to extend the ERT table",
... | calculates ERTs to look up whether a mass or lower masses within a certain deviation are decomposable.
only ERTs for deviation 2^x are calculated | [
"calculates",
"ERTs",
"to",
"look",
"up",
"whether",
"a",
"mass",
"or",
"lower",
"masses",
"within",
"a",
"certain",
"deviation",
"are",
"decomposable",
".",
"only",
"ERTs",
"for",
"deviation",
"2^x",
"are",
"calculated"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/RoundRobinFormulaGenerator.java#L347-L393 |
114,901 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/ReactionSet.java | ReactionSet.addReaction | @Override
public void addReaction(IReaction reaction) {
if (reactionCount + 1 >= reactions.length) growReactionArray();
reactions[reactionCount] = reaction;
reactionCount++;
} | java | @Override
public void addReaction(IReaction reaction) {
if (reactionCount + 1 >= reactions.length) growReactionArray();
reactions[reactionCount] = reaction;
reactionCount++;
} | [
"@",
"Override",
"public",
"void",
"addReaction",
"(",
"IReaction",
"reaction",
")",
"{",
"if",
"(",
"reactionCount",
"+",
"1",
">=",
"reactions",
".",
"length",
")",
"growReactionArray",
"(",
")",
";",
"reactions",
"[",
"reactionCount",
"]",
"=",
"reaction"... | Adds an reaction to this container.
@param reaction The reaction to be added to this container | [
"Adds",
"an",
"reaction",
"to",
"this",
"container",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/ReactionSet.java#L95-L100 |
114,902 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/ReactionSet.java | ReactionSet.removeAllReactions | @Override
public void removeAllReactions() {
for (int pos = this.reactionCount - 1; pos >= 0; pos--) {
this.reactions[pos] = null;
}
this.reactionCount = 0;
} | java | @Override
public void removeAllReactions() {
for (int pos = this.reactionCount - 1; pos >= 0; pos--) {
this.reactions[pos] = null;
}
this.reactionCount = 0;
} | [
"@",
"Override",
"public",
"void",
"removeAllReactions",
"(",
")",
"{",
"for",
"(",
"int",
"pos",
"=",
"this",
".",
"reactionCount",
"-",
"1",
";",
"pos",
">=",
"0",
";",
"pos",
"--",
")",
"{",
"this",
".",
"reactions",
"[",
"pos",
"]",
"=",
"null"... | Removes all Reactions from this container. | [
"Removes",
"all",
"Reactions",
"from",
"this",
"container",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/ReactionSet.java#L227-L233 |
114,903 | cdk/cdk | base/reaction/src/main/java/org/openscience/cdk/reaction/type/PiBondingMovementReaction.java | PiBondingMovementReaction.setActiveCenters | private void setActiveCenters(IAtomContainer reactant) throws CDKException {
AllRingsFinder arf = new AllRingsFinder();
IRingSet ringSet = arf.findAllRings(reactant);
for (int ir = 0; ir < ringSet.getAtomContainerCount(); ir++) {
IRing ring = (IRing) ringSet.getAtomContainer(ir);
... | java | private void setActiveCenters(IAtomContainer reactant) throws CDKException {
AllRingsFinder arf = new AllRingsFinder();
IRingSet ringSet = arf.findAllRings(reactant);
for (int ir = 0; ir < ringSet.getAtomContainerCount(); ir++) {
IRing ring = (IRing) ringSet.getAtomContainer(ir);
... | [
"private",
"void",
"setActiveCenters",
"(",
"IAtomContainer",
"reactant",
")",
"throws",
"CDKException",
"{",
"AllRingsFinder",
"arf",
"=",
"new",
"AllRingsFinder",
"(",
")",
";",
"IRingSet",
"ringSet",
"=",
"arf",
".",
"findAllRings",
"(",
"reactant",
")",
";",... | Set the active center for this molecule.
The active center will be those which correspond to a ring
with pi electrons with resonance.
FIXME REACT: It could be possible that a ring is a super ring of others small rings
@param reactant The molecule to set the activity | [
"Set",
"the",
"active",
"center",
"for",
"this",
"molecule",
".",
"The",
"active",
"center",
"will",
"be",
"those",
"which",
"correspond",
"to",
"a",
"ring",
"with",
"pi",
"electrons",
"with",
"resonance",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/reaction/src/main/java/org/openscience/cdk/reaction/type/PiBondingMovementReaction.java#L199-L219 |
114,904 | cdk/cdk | tool/structgen/src/main/java/org/openscience/cdk/structgen/RandomGenerator.java | RandomGenerator.proposeStructure | public IAtomContainer proposeStructure() {
logger.debug("RandomGenerator->proposeStructure() Start");
do {
try {
trial = molecule.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Could not clone IAtomContainer!" + ... | java | public IAtomContainer proposeStructure() {
logger.debug("RandomGenerator->proposeStructure() Start");
do {
try {
trial = molecule.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Could not clone IAtomContainer!" + ... | [
"public",
"IAtomContainer",
"proposeStructure",
"(",
")",
"{",
"logger",
".",
"debug",
"(",
"\"RandomGenerator->proposeStructure() Start\"",
")",
";",
"do",
"{",
"try",
"{",
"trial",
"=",
"molecule",
".",
"clone",
"(",
")",
";",
"}",
"catch",
"(",
"CloneNotSup... | Proposes a structure which can be accepted or rejected by an external
entity. If rejected, the structure is not used as a starting point
for the next random move in structure space.
@return A proposed molecule | [
"Proposes",
"a",
"structure",
"which",
"can",
"be",
"accepted",
"or",
"rejected",
"by",
"an",
"external",
"entity",
".",
"If",
"rejected",
"the",
"structure",
"is",
"not",
"used",
"as",
"a",
"starting",
"point",
"for",
"the",
"next",
"random",
"move",
"in"... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/structgen/src/main/java/org/openscience/cdk/structgen/RandomGenerator.java#L72-L97 |
114,905 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/HBondDonorCountDescriptor.java | HBondDonorCountDescriptor.calculate | @Override
public DescriptorValue calculate(IAtomContainer atomContainer) {
int hBondDonors = 0;
IAtomContainer ac;
try {
ac = (IAtomContainer) atomContainer.clone();
} catch (CloneNotSupportedException e) {
return getDummyDescriptorValue(e);
}
... | java | @Override
public DescriptorValue calculate(IAtomContainer atomContainer) {
int hBondDonors = 0;
IAtomContainer ac;
try {
ac = (IAtomContainer) atomContainer.clone();
} catch (CloneNotSupportedException e) {
return getDummyDescriptorValue(e);
}
... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtomContainer",
"atomContainer",
")",
"{",
"int",
"hBondDonors",
"=",
"0",
";",
"IAtomContainer",
"ac",
";",
"try",
"{",
"ac",
"=",
"(",
"IAtomContainer",
")",
"atomContainer",
".",
"clone",
"("... | Calculates the number of H bond donors.
@param atomContainer AtomContainer
@return number of H bond donors | [
"Calculates",
"the",
"number",
"of",
"H",
"bond",
"donors",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/HBondDonorCountDescriptor.java#L127-L164 |
114,906 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/ringsearch/RegularCyclicVertexSearch.java | RegularCyclicVertexSearch.buildVertexColor | private int[] buildVertexColor() {
int[] color = new int[g.length];
int n = 1;
Arrays.fill(color, -1);
for (long cycle : cycles) {
for (int i = 0; i < g.length; i++) {
if ((cycle & 0x1) == 0x1) color[i] = color[i] < 0 ? n : 0;
cycle >>= 1;
... | java | private int[] buildVertexColor() {
int[] color = new int[g.length];
int n = 1;
Arrays.fill(color, -1);
for (long cycle : cycles) {
for (int i = 0; i < g.length; i++) {
if ((cycle & 0x1) == 0x1) color[i] = color[i] < 0 ? n : 0;
cycle >>= 1;
... | [
"private",
"int",
"[",
"]",
"buildVertexColor",
"(",
")",
"{",
"int",
"[",
"]",
"color",
"=",
"new",
"int",
"[",
"g",
".",
"length",
"]",
";",
"int",
"n",
"=",
"1",
";",
"Arrays",
".",
"fill",
"(",
"color",
",",
"-",
"1",
")",
";",
"for",
"("... | Build an indexed lookup of vertex color. The vertex color indicates which
cycle a given vertex belongs. If a vertex belongs to more then one cycle
it is colored '0'. If a vertex belongs to no cycle it is colored '-1'.
@return vertex colors | [
"Build",
"an",
"indexed",
"lookup",
"of",
"vertex",
"color",
".",
"The",
"vertex",
"color",
"indicates",
"which",
"cycle",
"a",
"given",
"vertex",
"belongs",
".",
"If",
"a",
"vertex",
"belongs",
"to",
"more",
"then",
"one",
"cycle",
"it",
"is",
"colored",
... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/ringsearch/RegularCyclicVertexSearch.java#L262-L276 |
114,907 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.getSize | public int getSize() {
int count = 0;
for (List<IIsotope> isotope : isotopes)
if (isotope != null)
count += isotope.size();
return count;
} | java | public int getSize() {
int count = 0;
for (List<IIsotope> isotope : isotopes)
if (isotope != null)
count += isotope.size();
return count;
} | [
"public",
"int",
"getSize",
"(",
")",
"{",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"List",
"<",
"IIsotope",
">",
"isotope",
":",
"isotopes",
")",
"if",
"(",
"isotope",
"!=",
"null",
")",
"count",
"+=",
"isotope",
".",
"size",
"(",
")",
";",
"r... | Returns the number of isotopes defined by this class.
@return The size value | [
"Returns",
"the",
"number",
"of",
"isotopes",
"defined",
"by",
"this",
"class",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L57-L63 |
114,908 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.add | protected void add(IIsotope isotope) {
Integer atomicNum = isotope.getAtomicNumber();
assert atomicNum != null;
List<IIsotope> isotopesForElement = isotopes[atomicNum];
if (isotopesForElement == null) {
isotopesForElement = new ArrayList<>();
isotopes[atomicNum] =... | java | protected void add(IIsotope isotope) {
Integer atomicNum = isotope.getAtomicNumber();
assert atomicNum != null;
List<IIsotope> isotopesForElement = isotopes[atomicNum];
if (isotopesForElement == null) {
isotopesForElement = new ArrayList<>();
isotopes[atomicNum] =... | [
"protected",
"void",
"add",
"(",
"IIsotope",
"isotope",
")",
"{",
"Integer",
"atomicNum",
"=",
"isotope",
".",
"getAtomicNumber",
"(",
")",
";",
"assert",
"atomicNum",
"!=",
"null",
";",
"List",
"<",
"IIsotope",
">",
"isotopesForElement",
"=",
"isotopes",
"[... | Protected methods only to be used by classes extending this class to add
an IIsotope. | [
"Protected",
"methods",
"only",
"to",
"be",
"used",
"by",
"classes",
"extending",
"this",
"class",
"to",
"add",
"an",
"IIsotope",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L69-L78 |
114,909 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.getIsotopes | public IIsotope[] getIsotopes(int elem) {
if (isotopes[elem] == null)
return EMPTY_ISOTOPE_ARRAY;
List<IIsotope> list = new ArrayList<>();
for (IIsotope isotope : isotopes[elem]) {
list.add(clone(isotope));
}
return list.toArray(new IIsotope[0]);
} | java | public IIsotope[] getIsotopes(int elem) {
if (isotopes[elem] == null)
return EMPTY_ISOTOPE_ARRAY;
List<IIsotope> list = new ArrayList<>();
for (IIsotope isotope : isotopes[elem]) {
list.add(clone(isotope));
}
return list.toArray(new IIsotope[0]);
} | [
"public",
"IIsotope",
"[",
"]",
"getIsotopes",
"(",
"int",
"elem",
")",
"{",
"if",
"(",
"isotopes",
"[",
"elem",
"]",
"==",
"null",
")",
"return",
"EMPTY_ISOTOPE_ARRAY",
";",
"List",
"<",
"IIsotope",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")"... | Gets an array of all isotopes known to the IsotopeFactory for the given
element symbol.
@param elem atomic number
@return An array of isotopes that matches the given element symbol | [
"Gets",
"an",
"array",
"of",
"all",
"isotopes",
"known",
"to",
"the",
"IsotopeFactory",
"for",
"the",
"given",
"element",
"symbol",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L87-L95 |
114,910 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.getIsotopes | public IIsotope[] getIsotopes() {
List<IIsotope> list = new ArrayList<IIsotope>();
for (List<IIsotope> isotopes : this.isotopes) {
if (isotopes == null) continue;
for (IIsotope isotope : isotopes) {
list.add(clone(isotope));
}
}
return ... | java | public IIsotope[] getIsotopes() {
List<IIsotope> list = new ArrayList<IIsotope>();
for (List<IIsotope> isotopes : this.isotopes) {
if (isotopes == null) continue;
for (IIsotope isotope : isotopes) {
list.add(clone(isotope));
}
}
return ... | [
"public",
"IIsotope",
"[",
"]",
"getIsotopes",
"(",
")",
"{",
"List",
"<",
"IIsotope",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"IIsotope",
">",
"(",
")",
";",
"for",
"(",
"List",
"<",
"IIsotope",
">",
"isotopes",
":",
"this",
".",
"isotopes",
")",... | Gets a array of all isotopes known to the IsotopeFactory.
@return An array of all isotopes | [
"Gets",
"a",
"array",
"of",
"all",
"isotopes",
"known",
"to",
"the",
"IsotopeFactory",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L113-L122 |
114,911 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.getIsotopes | public IIsotope[] getIsotopes(double exactMass, double difference) {
List<IIsotope> list = new ArrayList<>();
for (List<IIsotope> isotopes : this.isotopes) {
if (isotopes == null) continue;
for (IIsotope isotope : isotopes) {
if (Math.abs(isotope.getExactMass() - ... | java | public IIsotope[] getIsotopes(double exactMass, double difference) {
List<IIsotope> list = new ArrayList<>();
for (List<IIsotope> isotopes : this.isotopes) {
if (isotopes == null) continue;
for (IIsotope isotope : isotopes) {
if (Math.abs(isotope.getExactMass() - ... | [
"public",
"IIsotope",
"[",
"]",
"getIsotopes",
"(",
"double",
"exactMass",
",",
"double",
"difference",
")",
"{",
"List",
"<",
"IIsotope",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"List",
"<",
"IIsotope",
">",
"isotopes",
... | Gets an array of all isotopes matching the searched exact mass within
a certain difference.
@param exactMass search mass
@param difference mass the isotope is allowed to differ from the search mass
@return An array of all isotopes | [
"Gets",
"an",
"array",
"of",
"all",
"isotopes",
"matching",
"the",
"searched",
"exact",
"mass",
"within",
"a",
"certain",
"difference",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L132-L143 |
114,912 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.getIsotope | public IIsotope getIsotope(String symbol, int massNumber) {
int elem = Elements.ofString(symbol).number();
List<IIsotope> isotopes = this.isotopes[elem];
if (isotopes == null)
return null;
for (IIsotope isotope : isotopes) {
if (isotope.getSymbol().equals(symbol) ... | java | public IIsotope getIsotope(String symbol, int massNumber) {
int elem = Elements.ofString(symbol).number();
List<IIsotope> isotopes = this.isotopes[elem];
if (isotopes == null)
return null;
for (IIsotope isotope : isotopes) {
if (isotope.getSymbol().equals(symbol) ... | [
"public",
"IIsotope",
"getIsotope",
"(",
"String",
"symbol",
",",
"int",
"massNumber",
")",
"{",
"int",
"elem",
"=",
"Elements",
".",
"ofString",
"(",
"symbol",
")",
".",
"number",
"(",
")",
";",
"List",
"<",
"IIsotope",
">",
"isotopes",
"=",
"this",
"... | Get isotope based on element symbol and mass number.
@param symbol the element symbol
@param massNumber the mass number
@return the corresponding isotope | [
"Get",
"isotope",
"based",
"on",
"element",
"symbol",
"and",
"mass",
"number",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L152-L163 |
114,913 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.getIsotope | public IIsotope getIsotope(String symbol, double exactMass, double tolerance) {
IIsotope ret = null;
double minDiff = Double.MAX_VALUE;
int elem = Elements.ofString(symbol).number();
List<IIsotope> isotopes = this.isotopes[elem];
if (isotopes == null)
return null;
... | java | public IIsotope getIsotope(String symbol, double exactMass, double tolerance) {
IIsotope ret = null;
double minDiff = Double.MAX_VALUE;
int elem = Elements.ofString(symbol).number();
List<IIsotope> isotopes = this.isotopes[elem];
if (isotopes == null)
return null;
... | [
"public",
"IIsotope",
"getIsotope",
"(",
"String",
"symbol",
",",
"double",
"exactMass",
",",
"double",
"tolerance",
")",
"{",
"IIsotope",
"ret",
"=",
"null",
";",
"double",
"minDiff",
"=",
"Double",
".",
"MAX_VALUE",
";",
"int",
"elem",
"=",
"Elements",
"... | Get an isotope based on the element symbol and exact mass.
@param symbol the element symbol
@param exactMass the mass number
@param tolerance allowed difference from provided exact mass
@return the corresponding isotope | [
"Get",
"an",
"isotope",
"based",
"on",
"the",
"element",
"symbol",
"and",
"exact",
"mass",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L173-L188 |
114,914 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.getExactMass | public double getExactMass(Integer atomicNumber, Integer massNumber) {
if (atomicNumber == null || massNumber == null)
return 0;
for (IIsotope isotope : this.isotopes[atomicNumber]) {
if (isotope.getMassNumber().equals(massNumber))
return isotope.getExactMass();
... | java | public double getExactMass(Integer atomicNumber, Integer massNumber) {
if (atomicNumber == null || massNumber == null)
return 0;
for (IIsotope isotope : this.isotopes[atomicNumber]) {
if (isotope.getMassNumber().equals(massNumber))
return isotope.getExactMass();
... | [
"public",
"double",
"getExactMass",
"(",
"Integer",
"atomicNumber",
",",
"Integer",
"massNumber",
")",
"{",
"if",
"(",
"atomicNumber",
"==",
"null",
"||",
"massNumber",
"==",
"null",
")",
"return",
"0",
";",
"for",
"(",
"IIsotope",
"isotope",
":",
"this",
... | Get the exact mass of a specified isotope for an atom.
@param atomicNumber atomic number
@param massNumber the mass number
@return the exact mass | [
"Get",
"the",
"exact",
"mass",
"of",
"a",
"specified",
"isotope",
"for",
"an",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L243-L251 |
114,915 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.configure | public IAtom configure(IAtom atom, IIsotope isotope) {
atom.setMassNumber(isotope.getMassNumber());
atom.setSymbol(isotope.getSymbol());
atom.setExactMass(isotope.getExactMass());
atom.setAtomicNumber(isotope.getAtomicNumber());
atom.setNaturalAbundance(isotope.getNaturalAbundanc... | java | public IAtom configure(IAtom atom, IIsotope isotope) {
atom.setMassNumber(isotope.getMassNumber());
atom.setSymbol(isotope.getSymbol());
atom.setExactMass(isotope.getExactMass());
atom.setAtomicNumber(isotope.getAtomicNumber());
atom.setNaturalAbundance(isotope.getNaturalAbundanc... | [
"public",
"IAtom",
"configure",
"(",
"IAtom",
"atom",
",",
"IIsotope",
"isotope",
")",
"{",
"atom",
".",
"setMassNumber",
"(",
"isotope",
".",
"getMassNumber",
"(",
")",
")",
";",
"atom",
".",
"setSymbol",
"(",
"isotope",
".",
"getSymbol",
"(",
")",
")",... | Configures an atom to have all the data of the
given isotope.
@param atom The atom to be configure
@param isotope The isotope to read the data from
@return The configured atom | [
"Configures",
"an",
"atom",
"to",
"have",
"all",
"the",
"data",
"of",
"the",
"given",
"isotope",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L341-L348 |
114,916 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.configureAtoms | public void configureAtoms(IAtomContainer container) {
for (int f = 0; f < container.getAtomCount(); f++) {
configure(container.getAtom(f));
}
} | java | public void configureAtoms(IAtomContainer container) {
for (int f = 0; f < container.getAtomCount(); f++) {
configure(container.getAtom(f));
}
} | [
"public",
"void",
"configureAtoms",
"(",
"IAtomContainer",
"container",
")",
"{",
"for",
"(",
"int",
"f",
"=",
"0",
";",
"f",
"<",
"container",
".",
"getAtomCount",
"(",
")",
";",
"f",
"++",
")",
"{",
"configure",
"(",
"container",
".",
"getAtom",
"(",... | Configures atoms in an AtomContainer to
carry all the correct data according to their element type.
@param container The AtomContainer to be configured | [
"Configures",
"atoms",
"in",
"an",
"AtomContainer",
"to",
"carry",
"all",
"the",
"correct",
"data",
"according",
"to",
"their",
"element",
"type",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L356-L360 |
114,917 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.getNaturalMass | public double getNaturalMass(int atomicNum) {
List<IIsotope> isotopes = this.isotopes[atomicNum];
if (isotopes == null)
return 0;
double summedAbundances = 0;
double summedWeightedAbundances = 0;
double getNaturalMass = 0;
for (IIsotope isotope : isotopes) {
... | java | public double getNaturalMass(int atomicNum) {
List<IIsotope> isotopes = this.isotopes[atomicNum];
if (isotopes == null)
return 0;
double summedAbundances = 0;
double summedWeightedAbundances = 0;
double getNaturalMass = 0;
for (IIsotope isotope : isotopes) {
... | [
"public",
"double",
"getNaturalMass",
"(",
"int",
"atomicNum",
")",
"{",
"List",
"<",
"IIsotope",
">",
"isotopes",
"=",
"this",
".",
"isotopes",
"[",
"atomicNum",
"]",
";",
"if",
"(",
"isotopes",
"==",
"null",
")",
"return",
"0",
";",
"double",
"summedAb... | Gets the natural mass of this element, defined as average of masses of
isotopes, weighted by abundance.
@param atomicNum the element in question
@return The natural mass value | [
"Gets",
"the",
"natural",
"mass",
"of",
"this",
"element",
"defined",
"as",
"average",
"of",
"masses",
"of",
"isotopes",
"weighted",
"by",
"abundance",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L369-L382 |
114,918 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/Congestion.java | Congestion.initScore | private double initScore() {
double score = 0;
final int n = atoms.length;
for (int i = 0; i < n; i++) {
final Point2d p1 = atoms[i].getPoint2d();
for (int j = i + 1; j < n; j++) {
if (contribution[i][j] < 0) continue;
final Point2d p2 = at... | java | private double initScore() {
double score = 0;
final int n = atoms.length;
for (int i = 0; i < n; i++) {
final Point2d p1 = atoms[i].getPoint2d();
for (int j = i + 1; j < n; j++) {
if (contribution[i][j] < 0) continue;
final Point2d p2 = at... | [
"private",
"double",
"initScore",
"(",
")",
"{",
"double",
"score",
"=",
"0",
";",
"final",
"int",
"n",
"=",
"atoms",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"n",
";",
"i",
"++",
")",
"{",
"final",
"Point2d",
"p1",
... | Calculate the initial score.
@return congestion score | [
"Calculate",
"the",
"initial",
"score",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/Congestion.java#L61-L76 |
114,919 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/Congestion.java | Congestion.update | void update(boolean[] visit, int[] vs, int n) {
int len = atoms.length;
double subtract = 0;
for (int i = 0; i < n; i++) {
final int v = vs[i];
final Point2d p1 = atoms[v].getPoint2d();
for (int w = 0; w < len; w++) {
if (visit[w] || contributi... | java | void update(boolean[] visit, int[] vs, int n) {
int len = atoms.length;
double subtract = 0;
for (int i = 0; i < n; i++) {
final int v = vs[i];
final Point2d p1 = atoms[v].getPoint2d();
for (int w = 0; w < len; w++) {
if (visit[w] || contributi... | [
"void",
"update",
"(",
"boolean",
"[",
"]",
"visit",
",",
"int",
"[",
"]",
"vs",
",",
"int",
"n",
")",
"{",
"int",
"len",
"=",
"atoms",
".",
"length",
";",
"double",
"subtract",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
... | Update the score considering that some atoms have moved. We only
need to update the score of atom that have moved vs those that haven't
since all those that moved did so together.
@param visit visit flags
@param vs visit list
@param n number of visited in visit list | [
"Update",
"the",
"score",
"considering",
"that",
"some",
"atoms",
"have",
"moved",
".",
"We",
"only",
"need",
"to",
"update",
"the",
"score",
"of",
"atom",
"that",
"have",
"moved",
"vs",
"those",
"that",
"haven",
"t",
"since",
"all",
"those",
"that",
"mo... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/Congestion.java#L87-L104 |
114,920 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/AllCycles.java | AllCycles.verticesInOrder | static int[] verticesInOrder(final int[] rank) {
int[] vs = new int[rank.length];
for (int v = 0; v < rank.length; v++)
vs[rank[v]] = v;
return vs;
} | java | static int[] verticesInOrder(final int[] rank) {
int[] vs = new int[rank.length];
for (int v = 0; v < rank.length; v++)
vs[rank[v]] = v;
return vs;
} | [
"static",
"int",
"[",
"]",
"verticesInOrder",
"(",
"final",
"int",
"[",
"]",
"rank",
")",
"{",
"int",
"[",
"]",
"vs",
"=",
"new",
"int",
"[",
"rank",
".",
"length",
"]",
";",
"for",
"(",
"int",
"v",
"=",
"0",
";",
"v",
"<",
"rank",
".",
"leng... | Using the pre-computed rank, get the vertices in order.
@param rank see {@link #rank(int[][])}
@return vertices in order | [
"Using",
"the",
"pre",
"-",
"computed",
"rank",
"get",
"the",
"vertices",
"in",
"order",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/AllCycles.java#L136-L141 |
114,921 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/AllCycles.java | AllCycles.rank | static int[] rank(final int[][] g) {
final int ord = g.length;
final int[] count = new int[ord + 1];
final int[] rank = new int[ord];
// frequency of each degree
for (int v = 0; v < ord; v++)
count[g[v].length + 1]++;
// cumulated counts
for (int i =... | java | static int[] rank(final int[][] g) {
final int ord = g.length;
final int[] count = new int[ord + 1];
final int[] rank = new int[ord];
// frequency of each degree
for (int v = 0; v < ord; v++)
count[g[v].length + 1]++;
// cumulated counts
for (int i =... | [
"static",
"int",
"[",
"]",
"rank",
"(",
"final",
"int",
"[",
"]",
"[",
"]",
"g",
")",
"{",
"final",
"int",
"ord",
"=",
"g",
".",
"length",
";",
"final",
"int",
"[",
"]",
"count",
"=",
"new",
"int",
"[",
"ord",
"+",
"1",
"]",
";",
"final",
"... | Compute a rank for each vertex. This rank is based on the degree and
indicates the position each vertex would be in a sorted array.
@param g a graph in adjacent list representation
@return array indicating the rank of each vertex. | [
"Compute",
"a",
"rank",
"for",
"each",
"vertex",
".",
"This",
"rank",
"is",
"based",
"on",
"the",
"degree",
"and",
"indicates",
"the",
"position",
"each",
"vertex",
"would",
"be",
"in",
"a",
"sorted",
"array",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/AllCycles.java#L150-L167 |
114,922 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/AllCycles.java | AllCycles.paths | public int[][] paths() {
int[][] paths = new int[cycles.size()][];
for (int i = 0; i < cycles.size(); i++)
paths[i] = cycles.get(i).clone();
return paths;
} | java | public int[][] paths() {
int[][] paths = new int[cycles.size()][];
for (int i = 0; i < cycles.size(); i++)
paths[i] = cycles.get(i).clone();
return paths;
} | [
"public",
"int",
"[",
"]",
"[",
"]",
"paths",
"(",
")",
"{",
"int",
"[",
"]",
"[",
"]",
"paths",
"=",
"new",
"int",
"[",
"cycles",
".",
"size",
"(",
")",
"]",
"[",
"",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"cycles",
... | The paths describing all simple cycles in the given graph. The path stats
and ends vertex.
@return 2d array of paths | [
"The",
"paths",
"describing",
"all",
"simple",
"cycles",
"in",
"the",
"given",
"graph",
".",
"The",
"path",
"stats",
"and",
"ends",
"vertex",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/AllCycles.java#L175-L180 |
114,923 | cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java | DepictionGenerator.depict | public Depiction depict(Iterable<IAtomContainer> mols, int nrow, int ncol) throws CDKException {
List<LayoutBackup> layoutBackups = new ArrayList<>();
int molId = 0;
for (IAtomContainer mol : mols) {
setIfMissing(mol, MarkedElement.ID_KEY, "mol" + ++molId);
layoutBackups... | java | public Depiction depict(Iterable<IAtomContainer> mols, int nrow, int ncol) throws CDKException {
List<LayoutBackup> layoutBackups = new ArrayList<>();
int molId = 0;
for (IAtomContainer mol : mols) {
setIfMissing(mol, MarkedElement.ID_KEY, "mol" + ++molId);
layoutBackups... | [
"public",
"Depiction",
"depict",
"(",
"Iterable",
"<",
"IAtomContainer",
">",
"mols",
",",
"int",
"nrow",
",",
"int",
"ncol",
")",
"throws",
"CDKException",
"{",
"List",
"<",
"LayoutBackup",
">",
"layoutBackups",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";... | Depict a set of molecules, they will be depicted in a grid with the
specified number of rows and columns. Rows are filled first and then
columns.
@param mols molecules
@param nrow number of rows
@param ncol number of columns
@return depiction
@throws CDKException a depiction could not be generated | [
"Depict",
"a",
"set",
"of",
"molecules",
"they",
"will",
"be",
"depicted",
"in",
"a",
"grid",
"with",
"the",
"specified",
"number",
"of",
"rows",
"and",
"columns",
".",
"Rows",
"are",
"filled",
"first",
"and",
"then",
"columns",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L335-L379 |
114,924 | cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java | DepictionGenerator.makeHighlightAtomMap | private Map<IChemObject, Color> makeHighlightAtomMap(List<IAtomContainer> reactants,
List<IAtomContainer> products) {
Map<IChemObject, Color> colorMap = new HashMap<>();
Map<Integer, Color> mapToColor = new HashMap<>();
int colorIdx = -1;
... | java | private Map<IChemObject, Color> makeHighlightAtomMap(List<IAtomContainer> reactants,
List<IAtomContainer> products) {
Map<IChemObject, Color> colorMap = new HashMap<>();
Map<Integer, Color> mapToColor = new HashMap<>();
int colorIdx = -1;
... | [
"private",
"Map",
"<",
"IChemObject",
",",
"Color",
">",
"makeHighlightAtomMap",
"(",
"List",
"<",
"IAtomContainer",
">",
"reactants",
",",
"List",
"<",
"IAtomContainer",
">",
"products",
")",
"{",
"Map",
"<",
"IChemObject",
",",
"Color",
">",
"colorMap",
"=... | Internal - makes a map of the highlights for reaction mapping.
@param reactants reaction reactants
@param products reaction products
@return the highlight map | [
"Internal",
"-",
"makes",
"a",
"map",
"of",
"the",
"highlights",
"for",
"reaction",
"mapping",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L508-L558 |
114,925 | cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java | DepictionGenerator.generateTitle | private Bounds generateTitle(IChemObject chemObj, double scale) {
String title = chemObj.getProperty(CDKConstants.TITLE);
if (title == null || title.isEmpty())
return new Bounds();
scale = 1 / scale * getParameterValue(RendererModel.TitleFontScale.class);
return new Bounds(Ma... | java | private Bounds generateTitle(IChemObject chemObj, double scale) {
String title = chemObj.getProperty(CDKConstants.TITLE);
if (title == null || title.isEmpty())
return new Bounds();
scale = 1 / scale * getParameterValue(RendererModel.TitleFontScale.class);
return new Bounds(Ma... | [
"private",
"Bounds",
"generateTitle",
"(",
"IChemObject",
"chemObj",
",",
"double",
"scale",
")",
"{",
"String",
"title",
"=",
"chemObj",
".",
"getProperty",
"(",
"CDKConstants",
".",
"TITLE",
")",
";",
"if",
"(",
"title",
"==",
"null",
"||",
"title",
".",... | Generate a bound element that is the title of the provided molecule. If title
is not specified an empty bounds is returned.
@param chemObj molecule or reaction
@return bound element | [
"Generate",
"a",
"bound",
"element",
"that",
"is",
"the",
"title",
"of",
"the",
"provided",
"molecule",
".",
"If",
"title",
"is",
"not",
"specified",
"an",
"empty",
"bounds",
"is",
"returned",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L643-L650 |
114,926 | cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java | DepictionGenerator.ensure2dLayout | private boolean ensure2dLayout(IAtomContainer container) throws CDKException {
if (!GeometryUtil.has2DCoordinates(container)) {
StructureDiagramGenerator sdg = new StructureDiagramGenerator();
sdg.generateCoordinates(container);
return true;
}
return false;
... | java | private boolean ensure2dLayout(IAtomContainer container) throws CDKException {
if (!GeometryUtil.has2DCoordinates(container)) {
StructureDiagramGenerator sdg = new StructureDiagramGenerator();
sdg.generateCoordinates(container);
return true;
}
return false;
... | [
"private",
"boolean",
"ensure2dLayout",
"(",
"IAtomContainer",
"container",
")",
"throws",
"CDKException",
"{",
"if",
"(",
"!",
"GeometryUtil",
".",
"has2DCoordinates",
"(",
"container",
")",
")",
"{",
"StructureDiagramGenerator",
"sdg",
"=",
"new",
"StructureDiagra... | Automatically generate coordinates if a user has provided a molecule without them.
@param container a molecule
@return if coordinates needed to be generated
@throws CDKException coordinates could not be generated | [
"Automatically",
"generate",
"coordinates",
"if",
"a",
"user",
"has",
"provided",
"a",
"molecule",
"without",
"them",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L668-L675 |
114,927 | cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java | DepictionGenerator.ensure2dLayout | private void ensure2dLayout(IReaction rxn) throws CDKException {
if (!GeometryUtil.has2DCoordinates(rxn)) {
StructureDiagramGenerator sdg = new StructureDiagramGenerator();
sdg.setAlignMappedReaction(alignMappedReactions);
sdg.generateCoordinates(rxn);
}
} | java | private void ensure2dLayout(IReaction rxn) throws CDKException {
if (!GeometryUtil.has2DCoordinates(rxn)) {
StructureDiagramGenerator sdg = new StructureDiagramGenerator();
sdg.setAlignMappedReaction(alignMappedReactions);
sdg.generateCoordinates(rxn);
}
} | [
"private",
"void",
"ensure2dLayout",
"(",
"IReaction",
"rxn",
")",
"throws",
"CDKException",
"{",
"if",
"(",
"!",
"GeometryUtil",
".",
"has2DCoordinates",
"(",
"rxn",
")",
")",
"{",
"StructureDiagramGenerator",
"sdg",
"=",
"new",
"StructureDiagramGenerator",
"(",
... | Automatically generate coordinates if a user has provided reaction without them.
@param rxn reaction
@throws CDKException coordinates could not be generated | [
"Automatically",
"generate",
"coordinates",
"if",
"a",
"user",
"has",
"provided",
"reaction",
"without",
"them",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L683-L689 |
114,928 | cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java | DepictionGenerator.withOuterGlowHighlight | public DepictionGenerator withOuterGlowHighlight(double width) {
return withParam(StandardGenerator.Highlighting.class,
StandardGenerator.HighlightStyle.OuterGlow)
.withParam(StandardGenerator.OuterGlowWidth.class,
width);
} | java | public DepictionGenerator withOuterGlowHighlight(double width) {
return withParam(StandardGenerator.Highlighting.class,
StandardGenerator.HighlightStyle.OuterGlow)
.withParam(StandardGenerator.OuterGlowWidth.class,
width);
} | [
"public",
"DepictionGenerator",
"withOuterGlowHighlight",
"(",
"double",
"width",
")",
"{",
"return",
"withParam",
"(",
"StandardGenerator",
".",
"Highlighting",
".",
"class",
",",
"StandardGenerator",
".",
"HighlightStyle",
".",
"OuterGlow",
")",
".",
"withParam",
... | Highlights are shown as an outer glow around the atom symbols and bonds
rather than recoloring.
@param width width of the outer glow relative to the bond stroke
@return new generator for method chaining
@see StandardGenerator.Highlighting
@see StandardGenerator.HighlightStyle | [
"Highlights",
"are",
"shown",
"as",
"an",
"outer",
"glow",
"around",
"the",
"atom",
"symbols",
"and",
"bonds",
"rather",
"than",
"recoloring",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L752-L757 |
114,929 | cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java | DepictionGenerator.withAtomNumbers | public DepictionGenerator withAtomNumbers() {
if (annotateAtomMap || annotateAtomVal)
throw new IllegalArgumentException("Can not annotated atom numbers, atom values or maps are already annotated");
DepictionGenerator copy = new DepictionGenerator(this);
copy.annotateAtomNum = true;
... | java | public DepictionGenerator withAtomNumbers() {
if (annotateAtomMap || annotateAtomVal)
throw new IllegalArgumentException("Can not annotated atom numbers, atom values or maps are already annotated");
DepictionGenerator copy = new DepictionGenerator(this);
copy.annotateAtomNum = true;
... | [
"public",
"DepictionGenerator",
"withAtomNumbers",
"(",
")",
"{",
"if",
"(",
"annotateAtomMap",
"||",
"annotateAtomVal",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Can not annotated atom numbers, atom values or maps are already annotated\"",
")",
";",
"DepictionGe... | Display atom numbers on the molecule or reaction. The numbers are based on the
ordering of atoms in the molecule data structure and not a systematic system
such as IUPAC numbering.
Note: A depiction can not have both atom numbers and atom maps visible
(but this can be achieved by manually setting the annotation).
@re... | [
"Display",
"atom",
"numbers",
"on",
"the",
"molecule",
"or",
"reaction",
".",
"The",
"numbers",
"are",
"based",
"on",
"the",
"ordering",
"of",
"atoms",
"in",
"the",
"molecule",
"data",
"structure",
"and",
"not",
"a",
"systematic",
"system",
"such",
"as",
"... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L771-L777 |
114,930 | cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java | DepictionGenerator.withAtomValues | public DepictionGenerator withAtomValues() {
if (annotateAtomNum || annotateAtomMap)
throw new IllegalArgumentException("Can not annotated atom values, atom numbers or maps are already annotated");
DepictionGenerator copy = new DepictionGenerator(this);
copy.annotateAtomVal = true;
... | java | public DepictionGenerator withAtomValues() {
if (annotateAtomNum || annotateAtomMap)
throw new IllegalArgumentException("Can not annotated atom values, atom numbers or maps are already annotated");
DepictionGenerator copy = new DepictionGenerator(this);
copy.annotateAtomVal = true;
... | [
"public",
"DepictionGenerator",
"withAtomValues",
"(",
")",
"{",
"if",
"(",
"annotateAtomNum",
"||",
"annotateAtomMap",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Can not annotated atom values, atom numbers or maps are already annotated\"",
")",
";",
"DepictionGen... | Display atom values on the molecule or reaction. The values need to be assigned by
<pre>{@code
atom.setProperty(CDKConstants.COMMENT, myValueToBeDisplayedNextToAtom);
}</pre>
Note: A depiction can not have both atom numbers and atom maps visible
(but this can be achieved by manually setting the annotation).
@return ... | [
"Display",
"atom",
"values",
"on",
"the",
"molecule",
"or",
"reaction",
".",
"The",
"values",
"need",
"to",
"be",
"assigned",
"by"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L793-L799 |
114,931 | cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java | DepictionGenerator.withAtomMapHighlight | public DepictionGenerator withAtomMapHighlight(Color[] colors) {
DepictionGenerator copy = new DepictionGenerator(this);
copy.highlightAtomMap = true;
copy.atomMapColors = Arrays.copyOf(colors, colors.length);
return copy;
} | java | public DepictionGenerator withAtomMapHighlight(Color[] colors) {
DepictionGenerator copy = new DepictionGenerator(this);
copy.highlightAtomMap = true;
copy.atomMapColors = Arrays.copyOf(colors, colors.length);
return copy;
} | [
"public",
"DepictionGenerator",
"withAtomMapHighlight",
"(",
"Color",
"[",
"]",
"colors",
")",
"{",
"DepictionGenerator",
"copy",
"=",
"new",
"DepictionGenerator",
"(",
"this",
")",
";",
"copy",
".",
"highlightAtomMap",
"=",
"true",
";",
"copy",
".",
"atomMapCol... | Adds to the highlight the coloring of reaction atom-maps. The
optional color array is used as the pallet with which to
highlight. If none is provided a set of high-contrast colors
will be used.
@param colors array of colors
@return new generator for method chaining
@see #withAtomMapNumbers()
@see #withAtomMapHighlight... | [
"Adds",
"to",
"the",
"highlight",
"the",
"coloring",
"of",
"reaction",
"atom",
"-",
"maps",
".",
"The",
"optional",
"color",
"array",
"is",
"used",
"as",
"the",
"pallet",
"with",
"which",
"to",
"highlight",
".",
"If",
"none",
"is",
"provided",
"a",
"set"... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L847-L853 |
114,932 | cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java | DepictionGenerator.withHighlight | public DepictionGenerator withHighlight(Iterable<? extends IChemObject> chemObjs, Color color) {
DepictionGenerator copy = new DepictionGenerator(this);
for (IChemObject chemObj : chemObjs)
copy.highlight.put(chemObj, color);
return copy;
} | java | public DepictionGenerator withHighlight(Iterable<? extends IChemObject> chemObjs, Color color) {
DepictionGenerator copy = new DepictionGenerator(this);
for (IChemObject chemObj : chemObjs)
copy.highlight.put(chemObj, color);
return copy;
} | [
"public",
"DepictionGenerator",
"withHighlight",
"(",
"Iterable",
"<",
"?",
"extends",
"IChemObject",
">",
"chemObjs",
",",
"Color",
"color",
")",
"{",
"DepictionGenerator",
"copy",
"=",
"new",
"DepictionGenerator",
"(",
"this",
")",
";",
"for",
"(",
"IChemObjec... | Highlight the provided set of atoms and bonds in the depiction in the
specified color.
Calling this methods appends to the current highlight buffer. The buffer
is cleared after each depiction is generated (e.g. {@link #depict(IAtomContainer)}).
@param chemObjs set of atoms and bonds
@param color the color to highl... | [
"Highlight",
"the",
"provided",
"set",
"of",
"atoms",
"and",
"bonds",
"in",
"the",
"depiction",
"in",
"the",
"specified",
"color",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L978-L983 |
114,933 | cdk/cdk | app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java | DepictionGenerator.withParam | public <T extends IGeneratorParameter<S>, S, U extends S> DepictionGenerator withParam(Class<T> key, U value) {
DepictionGenerator copy = new DepictionGenerator(this);
copy.setParam(key, value);
return copy;
} | java | public <T extends IGeneratorParameter<S>, S, U extends S> DepictionGenerator withParam(Class<T> key, U value) {
DepictionGenerator copy = new DepictionGenerator(this);
copy.setParam(key, value);
return copy;
} | [
"public",
"<",
"T",
"extends",
"IGeneratorParameter",
"<",
"S",
">",
",",
"S",
",",
"U",
"extends",
"S",
">",
"DepictionGenerator",
"withParam",
"(",
"Class",
"<",
"T",
">",
"key",
",",
"U",
"value",
")",
"{",
"DepictionGenerator",
"copy",
"=",
"new",
... | Low-level option method to set a rendering model parameter.
@param key option key
@param value option value
@param <T> option key type
@param <U> option value type
@return new generator for method chaining | [
"Low",
"-",
"level",
"option",
"method",
"to",
"set",
"a",
"rendering",
"model",
"parameter",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L1075-L1079 |
114,934 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/math/qm/Orbitals.java | Orbitals.setCoefficients | public void setCoefficients(Matrix C) {
if (count_basis == C.rows) {
this.C = C;
count_orbitals = C.columns;
}
} | java | public void setCoefficients(Matrix C) {
if (count_basis == C.rows) {
this.C = C;
count_orbitals = C.columns;
}
} | [
"public",
"void",
"setCoefficients",
"(",
"Matrix",
"C",
")",
"{",
"if",
"(",
"count_basis",
"==",
"C",
".",
"rows",
")",
"{",
"this",
".",
"C",
"=",
"C",
";",
"count_orbitals",
"=",
"C",
".",
"columns",
";",
"}",
"}"
] | Set a coefficient matrix | [
"Set",
"a",
"coefficient",
"matrix"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/qm/Orbitals.java#L84-L89 |
114,935 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/math/qm/Orbitals.java | Orbitals.getValues | public Vector getValues(int index, Matrix m) {
if (m.rows != 3) return null;
Vector result = basis.getValues(0, m).mul(C.matrix[0][index]);
for (int i = 1; i < count_basis; i++)
if (C.matrix[i][index] != 0d) result.add(basis.getValues(i, m).mul(C.matrix[0][index]));
return r... | java | public Vector getValues(int index, Matrix m) {
if (m.rows != 3) return null;
Vector result = basis.getValues(0, m).mul(C.matrix[0][index]);
for (int i = 1; i < count_basis; i++)
if (C.matrix[i][index] != 0d) result.add(basis.getValues(i, m).mul(C.matrix[0][index]));
return r... | [
"public",
"Vector",
"getValues",
"(",
"int",
"index",
",",
"Matrix",
"m",
")",
"{",
"if",
"(",
"m",
".",
"rows",
"!=",
"3",
")",
"return",
"null",
";",
"Vector",
"result",
"=",
"basis",
".",
"getValues",
"(",
"0",
",",
"m",
")",
".",
"mul",
"(",
... | Get the function value of a orbital | [
"Get",
"the",
"function",
"value",
"of",
"a",
"orbital"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/qm/Orbitals.java#L111-L118 |
114,936 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java | ConvexHull.ofShapes | public static ConvexHull ofShapes(final List<Shape> shapes) {
final Path2D combined = new Path2D.Double();
for (Shape shape : shapes)
combined.append(shape, false);
return new ConvexHull(shapeOf(grahamScan(pointsOf(combined))));
} | java | public static ConvexHull ofShapes(final List<Shape> shapes) {
final Path2D combined = new Path2D.Double();
for (Shape shape : shapes)
combined.append(shape, false);
return new ConvexHull(shapeOf(grahamScan(pointsOf(combined))));
} | [
"public",
"static",
"ConvexHull",
"ofShapes",
"(",
"final",
"List",
"<",
"Shape",
">",
"shapes",
")",
"{",
"final",
"Path2D",
"combined",
"=",
"new",
"Path2D",
".",
"Double",
"(",
")",
";",
"for",
"(",
"Shape",
"shape",
":",
"shapes",
")",
"combined",
... | Calculate the convex hull of multiple shapes.
@param shapes Java 2D shapes
@return the convex hull | [
"Calculate",
"the",
"convex",
"hull",
"of",
"multiple",
"shapes",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java#L85-L90 |
114,937 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java | ConvexHull.shapeOf | static Shape shapeOf(List<Point2D> points) {
Path2D path = new Path2D.Double();
if (!points.isEmpty()) {
path.moveTo(points.get(0).getX(), points.get(0).getY());
for (Point2D point : points)
path.lineTo(point.getX(), point.getY());
path.closePath();
... | java | static Shape shapeOf(List<Point2D> points) {
Path2D path = new Path2D.Double();
if (!points.isEmpty()) {
path.moveTo(points.get(0).getX(), points.get(0).getY());
for (Point2D point : points)
path.lineTo(point.getX(), point.getY());
path.closePath();
... | [
"static",
"Shape",
"shapeOf",
"(",
"List",
"<",
"Point2D",
">",
"points",
")",
"{",
"Path2D",
"path",
"=",
"new",
"Path2D",
".",
"Double",
"(",
")",
";",
"if",
"(",
"!",
"points",
".",
"isEmpty",
"(",
")",
")",
"{",
"path",
".",
"moveTo",
"(",
"p... | Convert a list of points to a shape.
@param points list of points
@return a shape | [
"Convert",
"a",
"list",
"of",
"points",
"to",
"a",
"shape",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java#L117-L126 |
114,938 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java | ConvexHull.pointsOf | static List<Point2D> pointsOf(final Shape shape) {
final List<Point2D> points = new ArrayList<Point2D>();
final double[] coordinates = new double[6];
for (PathIterator i = shape.getPathIterator(null); !i.isDone(); i.next()) {
switch (i.currentSegment(coordinates)) {
c... | java | static List<Point2D> pointsOf(final Shape shape) {
final List<Point2D> points = new ArrayList<Point2D>();
final double[] coordinates = new double[6];
for (PathIterator i = shape.getPathIterator(null); !i.isDone(); i.next()) {
switch (i.currentSegment(coordinates)) {
c... | [
"static",
"List",
"<",
"Point2D",
">",
"pointsOf",
"(",
"final",
"Shape",
"shape",
")",
"{",
"final",
"List",
"<",
"Point2D",
">",
"points",
"=",
"new",
"ArrayList",
"<",
"Point2D",
">",
"(",
")",
";",
"final",
"double",
"[",
"]",
"coordinates",
"=",
... | Convert a Java 2D shape to a list of points.
@param shape a shape
@return list of point | [
"Convert",
"a",
"Java",
"2D",
"shape",
"to",
"a",
"list",
"of",
"points",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java#L134-L161 |
114,939 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java | ConvexHull.lineLineIntersect | public static Point2D lineLineIntersect(final Line2D lineA, final Line2D lineB) {
return lineLineIntersect(lineA.getX1(), lineA.getY1(), lineA.getX2(), lineA.getY2(), lineB.getX1(),
lineB.getY1(), lineB.getX2(), lineB.getY2());
} | java | public static Point2D lineLineIntersect(final Line2D lineA, final Line2D lineB) {
return lineLineIntersect(lineA.getX1(), lineA.getY1(), lineA.getX2(), lineA.getY2(), lineB.getX1(),
lineB.getY1(), lineB.getX2(), lineB.getY2());
} | [
"public",
"static",
"Point2D",
"lineLineIntersect",
"(",
"final",
"Line2D",
"lineA",
",",
"final",
"Line2D",
"lineB",
")",
"{",
"return",
"lineLineIntersect",
"(",
"lineA",
".",
"getX1",
"(",
")",
",",
"lineA",
".",
"getY1",
"(",
")",
",",
"lineA",
".",
... | Calculate the intersection of two lines.
@param lineA a line
@param lineB another line
@return the point where the two lines intersect (or null) | [
"Calculate",
"the",
"intersection",
"of",
"two",
"lines",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java#L236-L240 |
114,940 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java | ConvexHull.isLeftTurn | private static boolean isLeftTurn(Point2D a, Point2D b, Point2D c) {
return winding(a, b, c) > 0;
} | java | private static boolean isLeftTurn(Point2D a, Point2D b, Point2D c) {
return winding(a, b, c) > 0;
} | [
"private",
"static",
"boolean",
"isLeftTurn",
"(",
"Point2D",
"a",
",",
"Point2D",
"b",
",",
"Point2D",
"c",
")",
"{",
"return",
"winding",
"(",
"a",
",",
"b",
",",
"c",
")",
">",
"0",
";",
"}"
] | Determine if the three points make a left turn.
@param a first point
@param b second point
@param c third point
@return whether the points make a left turn | [
"Determine",
"if",
"the",
"three",
"points",
"make",
"a",
"left",
"turn",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java#L328-L330 |
114,941 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java | ConvexHull.winding | private static int winding(Point2D a, Point2D b, Point2D c) {
return (int) Math.signum((b.getX() - a.getX()) * (c.getY() - a.getY()) - (b.getY() - a.getY())
* (c.getX() - a.getX()));
} | java | private static int winding(Point2D a, Point2D b, Point2D c) {
return (int) Math.signum((b.getX() - a.getX()) * (c.getY() - a.getY()) - (b.getY() - a.getY())
* (c.getX() - a.getX()));
} | [
"private",
"static",
"int",
"winding",
"(",
"Point2D",
"a",
",",
"Point2D",
"b",
",",
"Point2D",
"c",
")",
"{",
"return",
"(",
"int",
")",
"Math",
".",
"signum",
"(",
"(",
"b",
".",
"getX",
"(",
")",
"-",
"a",
".",
"getX",
"(",
")",
")",
"*",
... | Determine the winding of three points. The winding is the sign of the space - the parity.
@param a first point
@param b second point
@param c third point
@return winding, -1=cw, 0=straight, +1=ccw | [
"Determine",
"the",
"winding",
"of",
"three",
"points",
".",
"The",
"winding",
"is",
"the",
"sign",
"of",
"the",
"space",
"-",
"the",
"parity",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java#L340-L343 |
114,942 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/font/AbstractFontManager.java | AbstractFontManager.getFontSizeForZoom | protected Integer getFontSizeForZoom(double zoom) {
double lower = -1;
for (double upper : this.zoomToFontSizeMap.keySet()) {
if (lower == -1) {
lower = upper;
if (zoom <= lower) return this.zoomToFontSizeMap.get(upper);
continue;
}... | java | protected Integer getFontSizeForZoom(double zoom) {
double lower = -1;
for (double upper : this.zoomToFontSizeMap.keySet()) {
if (lower == -1) {
lower = upper;
if (zoom <= lower) return this.zoomToFontSizeMap.get(upper);
continue;
}... | [
"protected",
"Integer",
"getFontSizeForZoom",
"(",
"double",
"zoom",
")",
"{",
"double",
"lower",
"=",
"-",
"1",
";",
"for",
"(",
"double",
"upper",
":",
"this",
".",
"zoomToFontSizeMap",
".",
"keySet",
"(",
")",
")",
"{",
"if",
"(",
"lower",
"==",
"-"... | For a particular zoom, get the appropriate font size.
@param zoom the zoom level
@return an integer font size | [
"For",
"a",
"particular",
"zoom",
"get",
"the",
"appropriate",
"font",
"size",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/font/AbstractFontManager.java#L118-L133 |
114,943 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/font/AbstractFontManager.java | AbstractFontManager.increaseFontSize | public void increaseFontSize() {
// move INTO range if we have just moved OUT of lower virtual
if (inRange() || (atMin() && atLowerBoundary())) {
currentFontIndex++;
} else if (atMax()) {
upperVirtualCount++;
} else if (atMin() && inLower()) {
lowerVir... | java | public void increaseFontSize() {
// move INTO range if we have just moved OUT of lower virtual
if (inRange() || (atMin() && atLowerBoundary())) {
currentFontIndex++;
} else if (atMax()) {
upperVirtualCount++;
} else if (atMin() && inLower()) {
lowerVir... | [
"public",
"void",
"increaseFontSize",
"(",
")",
"{",
"// move INTO range if we have just moved OUT of lower virtual",
"if",
"(",
"inRange",
"(",
")",
"||",
"(",
"atMin",
"(",
")",
"&&",
"atLowerBoundary",
"(",
")",
")",
")",
"{",
"currentFontIndex",
"++",
";",
"... | Move the font size pointer up. If this would move the pointer past
the maximum font size, track this increase with a virtual size. | [
"Move",
"the",
"font",
"size",
"pointer",
"up",
".",
"If",
"this",
"would",
"move",
"the",
"pointer",
"past",
"the",
"maximum",
"font",
"size",
"track",
"this",
"increase",
"with",
"a",
"virtual",
"size",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/font/AbstractFontManager.java#L163-L172 |
114,944 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/font/AbstractFontManager.java | AbstractFontManager.decreaseFontSize | public void decreaseFontSize() {
// move INTO range if we have just moved OUT of upper virtual
if (inRange() || (atMax() && atUpperBoundary())) {
currentFontIndex--;
} else if (atMin()) {
lowerVirtualCount--;
} else if (atMax() && inUpper()) {
upperVir... | java | public void decreaseFontSize() {
// move INTO range if we have just moved OUT of upper virtual
if (inRange() || (atMax() && atUpperBoundary())) {
currentFontIndex--;
} else if (atMin()) {
lowerVirtualCount--;
} else if (atMax() && inUpper()) {
upperVir... | [
"public",
"void",
"decreaseFontSize",
"(",
")",
"{",
"// move INTO range if we have just moved OUT of upper virtual",
"if",
"(",
"inRange",
"(",
")",
"||",
"(",
"atMax",
"(",
")",
"&&",
"atUpperBoundary",
"(",
")",
")",
")",
"{",
"currentFontIndex",
"--",
";",
"... | Move the font size pointer down. If this would move the pointer past
the minimum font size, track this increase with a virtual size. | [
"Move",
"the",
"font",
"size",
"pointer",
"down",
".",
"If",
"this",
"would",
"move",
"the",
"pointer",
"past",
"the",
"minimum",
"font",
"size",
"track",
"this",
"increase",
"with",
"a",
"virtual",
"size",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/font/AbstractFontManager.java#L178-L187 |
114,945 | cdk/cdk | descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/VdWRadiusDescriptor.java | VdWRadiusDescriptor.calculate | @Override
public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
String symbol = atom.getSymbol();
double vdwradius = PeriodicTable.getVdwRadius(symbol);
return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(),
new DoubleResult(vd... | java | @Override
public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
String symbol = atom.getSymbol();
double vdwradius = PeriodicTable.getVdwRadius(symbol);
return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(),
new DoubleResult(vd... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtom",
"atom",
",",
"IAtomContainer",
"container",
")",
"{",
"String",
"symbol",
"=",
"atom",
".",
"getSymbol",
"(",
")",
";",
"double",
"vdwradius",
"=",
"PeriodicTable",
".",
"getVdwRadius",
"... | This method calculate the Van der Waals radius of an atom.
@param container The {@link IAtomContainer} for which the descriptor is to be calculated
@return The Van der Waals radius of the atom | [
"This",
"method",
"calculate",
"the",
"Van",
"der",
"Waals",
"radius",
"of",
"an",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/VdWRadiusDescriptor.java#L118-L125 |
114,946 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/DynamicFactory.java | DynamicFactory.register | public <S extends ICDKObject, T extends S> boolean register(Class<S> intf, Constructor<T> constructor) {
return register(intf, constructor, null);
} | java | public <S extends ICDKObject, T extends S> boolean register(Class<S> intf, Constructor<T> constructor) {
return register(intf, constructor, null);
} | [
"public",
"<",
"S",
"extends",
"ICDKObject",
",",
"T",
"extends",
"S",
">",
"boolean",
"register",
"(",
"Class",
"<",
"S",
">",
"intf",
",",
"Constructor",
"<",
"T",
">",
"constructor",
")",
"{",
"return",
"register",
"(",
"intf",
",",
"constructor",
"... | Register a specific constructor with an explicit interface.
<pre>{@code
// only register construction of IAtom using a string - Atom("C")
factory.register(IAtom.class,
Atom.class.getConstructor(String.class));
}</pre>
@param intf the interface
@param constructor a constructor which builds the given interface
@... | [
"Register",
"a",
"specific",
"constructor",
"with",
"an",
"explicit",
"interface",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/DynamicFactory.java#L352-L354 |
114,947 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/DynamicFactory.java | DynamicFactory.register | public <S extends ICDKObject, T extends S> boolean register(Class<S> intf, Constructor<T> constructor,
CreationModifier<T> modifier) {
// do not register private constructors
if (Modifier.isPrivate(constructor.getModifiers()) ||
Modifier.isProtected(constructor.getModifiers())) ... | java | public <S extends ICDKObject, T extends S> boolean register(Class<S> intf, Constructor<T> constructor,
CreationModifier<T> modifier) {
// do not register private constructors
if (Modifier.isPrivate(constructor.getModifiers()) ||
Modifier.isProtected(constructor.getModifiers())) ... | [
"public",
"<",
"S",
"extends",
"ICDKObject",
",",
"T",
"extends",
"S",
">",
"boolean",
"register",
"(",
"Class",
"<",
"S",
">",
"intf",
",",
"Constructor",
"<",
"T",
">",
"constructor",
",",
"CreationModifier",
"<",
"T",
">",
"modifier",
")",
"{",
"// ... | Register a specific constructor with a creation modifier to an explicit
interface.
<pre>{@code
// only register construction of IAtom using a string - Atom("C")
factory.register(IAtom.class,
Atom.class.getConstructor(String.class),
new DynamicFactory.CreationModifier<Atom>() {
public void modify(Atom instance) {
inst... | [
"Register",
"a",
"specific",
"constructor",
"with",
"a",
"creation",
"modifier",
"to",
"an",
"explicit",
"interface",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/DynamicFactory.java#L378-L390 |
114,948 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/DynamicFactory.java | DynamicFactory.register | private <T> Creator<T> register(ConstructorKey key, Constructor<T> constructor, CreationModifier<T> modifier) {
Creator<T> creator = new ReflectionCreator<T>(constructor);
if (modifier != null) creator = new ModifiedCreator<T>(creator, modifier);
return register(key, creator);
} | java | private <T> Creator<T> register(ConstructorKey key, Constructor<T> constructor, CreationModifier<T> modifier) {
Creator<T> creator = new ReflectionCreator<T>(constructor);
if (modifier != null) creator = new ModifiedCreator<T>(creator, modifier);
return register(key, creator);
} | [
"private",
"<",
"T",
">",
"Creator",
"<",
"T",
">",
"register",
"(",
"ConstructorKey",
"key",
",",
"Constructor",
"<",
"T",
">",
"constructor",
",",
"CreationModifier",
"<",
"T",
">",
"modifier",
")",
"{",
"Creator",
"<",
"T",
">",
"creator",
"=",
"new... | Register a constructor key with a public constructor.
@param key the key to register this constructor with
@param constructor the constructor to invoke when the key is match
@param <T> the type the constructor will create
@return return the constructor passed as the parameter | [
"Register",
"a",
"constructor",
"key",
"with",
"a",
"public",
"constructor",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/DynamicFactory.java#L400-L407 |
114,949 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/DynamicFactory.java | DynamicFactory.ofClass | public <T extends ICDKObject> T ofClass(Class<T> intf, Object... objects) {
try {
if (!intf.isInterface()) throw new IllegalArgumentException("expected interface, got " + intf.getClass());
Creator<T> constructor = get(new ObjectBasedKey(intf, objects));
return constructor.... | java | public <T extends ICDKObject> T ofClass(Class<T> intf, Object... objects) {
try {
if (!intf.isInterface()) throw new IllegalArgumentException("expected interface, got " + intf.getClass());
Creator<T> constructor = get(new ObjectBasedKey(intf, objects));
return constructor.... | [
"public",
"<",
"T",
"extends",
"ICDKObject",
">",
"T",
"ofClass",
"(",
"Class",
"<",
"T",
">",
"intf",
",",
"Object",
"...",
"objects",
")",
"{",
"try",
"{",
"if",
"(",
"!",
"intf",
".",
"isInterface",
"(",
")",
")",
"throw",
"new",
"IllegalArgumentE... | Construct an implementation using a constructor whose parameters match
that of the provided objects.
@param intf the interface to construct an instance of
@param <T> the type of the class
@return an implementation of provided interface
@throws IllegalArgumentException thrown if the implementation can not be
construct... | [
"Construct",
"an",
"implementation",
"using",
"a",
"constructor",
"whose",
"parameters",
"match",
"that",
"of",
"the",
"provided",
"objects",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/DynamicFactory.java#L512-L529 |
114,950 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/DynamicFactory.java | DynamicFactory.find | private <T> Creator<T> find(final ConstructorKey key) {
for (ConstructorKey candidate : lookup.getCandidates(key)) {
if (key.isAssignable(candidate)) {
return get(candidate);
}
}
// if the key has uniform parameter types
if (key.isUniform()) {
... | java | private <T> Creator<T> find(final ConstructorKey key) {
for (ConstructorKey candidate : lookup.getCandidates(key)) {
if (key.isAssignable(candidate)) {
return get(candidate);
}
}
// if the key has uniform parameter types
if (key.isUniform()) {
... | [
"private",
"<",
"T",
">",
"Creator",
"<",
"T",
">",
"find",
"(",
"final",
"ConstructorKey",
"key",
")",
"{",
"for",
"(",
"ConstructorKey",
"candidate",
":",
"lookup",
".",
"getCandidates",
"(",
"key",
")",
")",
"{",
"if",
"(",
"key",
".",
"isAssignable... | Find a constructor whose parameters are assignable from the provided
key.
@param key a key to find the constructor for
@param <T> type of the constructor
@return a constructor compatible with the given key
@throws IllegalArgumentException when no constructor is found the given
key | [
"Find",
"a",
"constructor",
"whose",
"parameters",
"are",
"assignable",
"from",
"the",
"provided",
"key",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/DynamicFactory.java#L607-L651 |
114,951 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/DynamicFactory.java | DynamicFactory.implementorsOf | public <T extends ICDKObject> Set<Class<?>> implementorsOf(Class<T> intf) {
Set<Class<?>> implementations = new HashSet<Class<?>>(5);
for (ConstructorKey key : lookup.getConstructors(intf)) {
implementations.add(get(key).getDeclaringClass());
}
return implementations;
} | java | public <T extends ICDKObject> Set<Class<?>> implementorsOf(Class<T> intf) {
Set<Class<?>> implementations = new HashSet<Class<?>>(5);
for (ConstructorKey key : lookup.getConstructors(intf)) {
implementations.add(get(key).getDeclaringClass());
}
return implementations;
} | [
"public",
"<",
"T",
"extends",
"ICDKObject",
">",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"implementorsOf",
"(",
"Class",
"<",
"T",
">",
"intf",
")",
"{",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"implementations",
"=",
"new",
"HashSet",
"<",
"Cla... | Access the registered implementations for a given interface.
@param intf an interface which has registered implementations in the
factory
@param <T> the type of the interface
@return set of implementation classes (empty if none found) | [
"Access",
"the",
"registered",
"implementations",
"for",
"a",
"given",
"interface",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/DynamicFactory.java#L661-L667 |
114,952 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/SpanningTree.java | SpanningTree.getSpanningTree | public IAtomContainer getSpanningTree() {
IAtomContainer container = molecule.getBuilder().newInstance(IAtomContainer.class);
for (int a = 0; a < totalVertexCount; a++)
container.addAtom(molecule.getAtom(a));
for (int b = 0; b < totalEdgeCount; b++)
if (bondsInTree[b]) co... | java | public IAtomContainer getSpanningTree() {
IAtomContainer container = molecule.getBuilder().newInstance(IAtomContainer.class);
for (int a = 0; a < totalVertexCount; a++)
container.addAtom(molecule.getAtom(a));
for (int b = 0; b < totalEdgeCount; b++)
if (bondsInTree[b]) co... | [
"public",
"IAtomContainer",
"getSpanningTree",
"(",
")",
"{",
"IAtomContainer",
"container",
"=",
"molecule",
".",
"getBuilder",
"(",
")",
".",
"newInstance",
"(",
"IAtomContainer",
".",
"class",
")",
";",
"for",
"(",
"int",
"a",
"=",
"0",
";",
"a",
"<",
... | Access the computed spanning tree of the input molecule.
@return acyclic tree of the input molecule | [
"Access",
"the",
"computed",
"spanning",
"tree",
"of",
"the",
"input",
"molecule",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/SpanningTree.java#L180-L187 |
114,953 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/SpanningTree.java | SpanningTree.getBasicRings | public IRingSet getBasicRings() throws NoSuchAtomException {
IRingSet ringset = molecule.getBuilder().newInstance(IRingSet.class);
IAtomContainer spt = getSpanningTree();
for (int i = 0; i < totalEdgeCount; i++)
if (!bondsInTree[i]) ringset.addAtomContainer(getRing(spt, molecule.getB... | java | public IRingSet getBasicRings() throws NoSuchAtomException {
IRingSet ringset = molecule.getBuilder().newInstance(IRingSet.class);
IAtomContainer spt = getSpanningTree();
for (int i = 0; i < totalEdgeCount; i++)
if (!bondsInTree[i]) ringset.addAtomContainer(getRing(spt, molecule.getB... | [
"public",
"IRingSet",
"getBasicRings",
"(",
")",
"throws",
"NoSuchAtomException",
"{",
"IRingSet",
"ringset",
"=",
"molecule",
".",
"getBuilder",
"(",
")",
".",
"newInstance",
"(",
"IRingSet",
".",
"class",
")",
";",
"IAtomContainer",
"spt",
"=",
"getSpanningTre... | The basic rings of the spanning tree. Using the pruned edges, return any path
which connects the end points of the pruned edge in the tree. These paths form
cycles.
@return basic rings
@throws NoSuchAtomException atoms not found in the molecule | [
"The",
"basic",
"rings",
"of",
"the",
"spanning",
"tree",
".",
"Using",
"the",
"pruned",
"edges",
"return",
"any",
"path",
"which",
"connects",
"the",
"end",
"points",
"of",
"the",
"pruned",
"edge",
"in",
"the",
"tree",
".",
"These",
"paths",
"form",
"cy... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/SpanningTree.java#L233-L239 |
114,954 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/SpanningTree.java | SpanningTree.getCyclicFragmentsContainer | public IAtomContainer getCyclicFragmentsContainer() {
IAtomContainer fragContainer = this.molecule.getBuilder().newInstance(IAtomContainer.class);
IAtomContainer spt = getSpanningTree();
for (int i = 0; i < totalEdgeCount; i++)
if (!bondsInTree[i]) {
IRing ring = get... | java | public IAtomContainer getCyclicFragmentsContainer() {
IAtomContainer fragContainer = this.molecule.getBuilder().newInstance(IAtomContainer.class);
IAtomContainer spt = getSpanningTree();
for (int i = 0; i < totalEdgeCount; i++)
if (!bondsInTree[i]) {
IRing ring = get... | [
"public",
"IAtomContainer",
"getCyclicFragmentsContainer",
"(",
")",
"{",
"IAtomContainer",
"fragContainer",
"=",
"this",
".",
"molecule",
".",
"getBuilder",
"(",
")",
".",
"newInstance",
"(",
"IAtomContainer",
".",
"class",
")",
";",
"IAtomContainer",
"spt",
"=",... | Returns an IAtomContainer which contains all the atoms and bonds which
are involved in ring systems.
@see #getAllRings()
@see #getBasicRings()
@return the IAtomContainer as described above | [
"Returns",
"an",
"IAtomContainer",
"which",
"contains",
"all",
"the",
"atoms",
"and",
"bonds",
"which",
"are",
"involved",
"in",
"ring",
"systems",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/SpanningTree.java#L249-L271 |
114,955 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/SpanningTree.java | SpanningTree.identifyBonds | private void identifyBonds() {
IAtomContainer spt = getSpanningTree();
IRing ring;
int nBasicRings = 0;
for (int i = 0; i < totalEdgeCount; i++) {
if (!bondsInTree[i]) {
ring = getRing(spt, molecule.getBond(i));
for (int b = 0; b < ring.getBond... | java | private void identifyBonds() {
IAtomContainer spt = getSpanningTree();
IRing ring;
int nBasicRings = 0;
for (int i = 0; i < totalEdgeCount; i++) {
if (!bondsInTree[i]) {
ring = getRing(spt, molecule.getBond(i));
for (int b = 0; b < ring.getBond... | [
"private",
"void",
"identifyBonds",
"(",
")",
"{",
"IAtomContainer",
"spt",
"=",
"getSpanningTree",
"(",
")",
";",
"IRing",
"ring",
";",
"int",
"nBasicRings",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"totalEdgeCount",
";",
"i",
... | Identifies whether bonds are cyclic or not. It is used by several other methods. | [
"Identifies",
"whether",
"bonds",
"are",
"cyclic",
"or",
"not",
".",
"It",
"is",
"used",
"by",
"several",
"other",
"methods",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/SpanningTree.java#L276-L312 |
114,956 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/SpanningTree.java | SpanningTree.getAllRings | public IRingSet getAllRings() throws NoSuchAtomException {
IRingSet ringset = getBasicRings();
IRing newring;
int nBasicRings = ringset.getAtomContainerCount();
for (int i = 0; i < nBasicRings; i++)
getBondsInRing(molecule, (IRing) ringset.getAtomContainer(i), cb[i]);
... | java | public IRingSet getAllRings() throws NoSuchAtomException {
IRingSet ringset = getBasicRings();
IRing newring;
int nBasicRings = ringset.getAtomContainerCount();
for (int i = 0; i < nBasicRings; i++)
getBondsInRing(molecule, (IRing) ringset.getAtomContainer(i), cb[i]);
... | [
"public",
"IRingSet",
"getAllRings",
"(",
")",
"throws",
"NoSuchAtomException",
"{",
"IRingSet",
"ringset",
"=",
"getBasicRings",
"(",
")",
";",
"IRing",
"newring",
";",
"int",
"nBasicRings",
"=",
"ringset",
".",
"getAtomContainerCount",
"(",
")",
";",
"for",
... | All basic rings and the all pairs of basic rings share at least one edge
combined.
@return subset of all rings
@throws NoSuchAtomException atom was not found in the molecule
@see #getBasicRings() | [
"All",
"basic",
"rings",
"and",
"the",
"all",
"pairs",
"of",
"basic",
"rings",
"share",
"at",
"least",
"one",
"edge",
"combined",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/SpanningTree.java#L322-L340 |
114,957 | cdk/cdk | display/renderextra/src/main/java/org/openscience/cdk/renderer/ChemModelRenderer.java | ChemModelRenderer.setup | @Override
public void setup(IChemModel chemModel, Rectangle screen) {
this.setScale(chemModel);
Rectangle2D bounds = BoundsCalculator.calculateBounds(chemModel);
if (bounds != null) this.modelCenter = new Point2d(bounds.getCenterX(), bounds.getCenterY());
this.drawCenter = new Point2... | java | @Override
public void setup(IChemModel chemModel, Rectangle screen) {
this.setScale(chemModel);
Rectangle2D bounds = BoundsCalculator.calculateBounds(chemModel);
if (bounds != null) this.modelCenter = new Point2d(bounds.getCenterX(), bounds.getCenterY());
this.drawCenter = new Point2... | [
"@",
"Override",
"public",
"void",
"setup",
"(",
"IChemModel",
"chemModel",
",",
"Rectangle",
"screen",
")",
"{",
"this",
".",
"setScale",
"(",
"chemModel",
")",
";",
"Rectangle2D",
"bounds",
"=",
"BoundsCalculator",
".",
"calculateBounds",
"(",
"chemModel",
"... | Setup the transformations necessary to draw this Chem Model.
@param chemModel
@param screen | [
"Setup",
"the",
"transformations",
"necessary",
"to",
"draw",
"this",
"Chem",
"Model",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/ChemModelRenderer.java#L153-L160 |
114,958 | cdk/cdk | display/renderextra/src/main/java/org/openscience/cdk/renderer/ChemModelRenderer.java | ChemModelRenderer.setScale | @Override
public void setScale(IChemModel chemModel) {
double bondLength = AverageBondLengthCalculator.calculateAverageBondLength(chemModel);
double scale = this.calculateScaleForBondLength(bondLength);
// store the scale so that other components can access it
this.rendererModel.get... | java | @Override
public void setScale(IChemModel chemModel) {
double bondLength = AverageBondLengthCalculator.calculateAverageBondLength(chemModel);
double scale = this.calculateScaleForBondLength(bondLength);
// store the scale so that other components can access it
this.rendererModel.get... | [
"@",
"Override",
"public",
"void",
"setScale",
"(",
"IChemModel",
"chemModel",
")",
"{",
"double",
"bondLength",
"=",
"AverageBondLengthCalculator",
".",
"calculateAverageBondLength",
"(",
"chemModel",
")",
";",
"double",
"scale",
"=",
"this",
".",
"calculateScaleFo... | Set the scale for an IChemModel. It calculates the average bond length of
the model and calculates the multiplication factor to transform this
to the bond length that is set in the RendererModel.
@param chemModel | [
"Set",
"the",
"scale",
"for",
"an",
"IChemModel",
".",
"It",
"calculates",
"the",
"average",
"bond",
"length",
"of",
"the",
"model",
"and",
"calculates",
"the",
"multiplication",
"factor",
"to",
"transform",
"this",
"to",
"the",
"bond",
"length",
"that",
"is... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/ChemModelRenderer.java#L169-L176 |
114,959 | cdk/cdk | display/renderextra/src/main/java/org/openscience/cdk/renderer/ChemModelRenderer.java | ChemModelRenderer.paint | @Override
public Rectangle paint(IChemModel chemModel, IDrawVisitor drawVisitor) {
IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
IReactionSet reactionSet = chemModel.getReactionSet();
if (moleculeSet == null && reactionSet != null) {
Rectangle2D totalBounds = calc... | java | @Override
public Rectangle paint(IChemModel chemModel, IDrawVisitor drawVisitor) {
IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
IReactionSet reactionSet = chemModel.getReactionSet();
if (moleculeSet == null && reactionSet != null) {
Rectangle2D totalBounds = calc... | [
"@",
"Override",
"public",
"Rectangle",
"paint",
"(",
"IChemModel",
"chemModel",
",",
"IDrawVisitor",
"drawVisitor",
")",
"{",
"IAtomContainerSet",
"moleculeSet",
"=",
"chemModel",
".",
"getMoleculeSet",
"(",
")",
";",
"IReactionSet",
"reactionSet",
"=",
"chemModel"... | Paint an IChemModel using the IDrawVisitor at a scale determined by the
bond length in RendererModel.
@param chemModel
the chem model to draw
@param drawVisitor
the visitor used to draw with
@return the rectangular area that the diagram will occupy on screen | [
"Paint",
"an",
"IChemModel",
"using",
"the",
"IDrawVisitor",
"at",
"a",
"scale",
"determined",
"by",
"the",
"bond",
"length",
"in",
"RendererModel",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/ChemModelRenderer.java#L188-L225 |
114,960 | cdk/cdk | display/renderextra/src/main/java/org/openscience/cdk/renderer/ChemModelRenderer.java | ChemModelRenderer.paint | @Override
public void paint(IChemModel chemModel, IDrawVisitor drawVisitor, Rectangle2D bounds, boolean resetCenter) {
// check for an empty model
IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
IReactionSet reactionSet = chemModel.getReactionSet();
// nasty, but it seem... | java | @Override
public void paint(IChemModel chemModel, IDrawVisitor drawVisitor, Rectangle2D bounds, boolean resetCenter) {
// check for an empty model
IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
IReactionSet reactionSet = chemModel.getReactionSet();
// nasty, but it seem... | [
"@",
"Override",
"public",
"void",
"paint",
"(",
"IChemModel",
"chemModel",
",",
"IDrawVisitor",
"drawVisitor",
",",
"Rectangle2D",
"bounds",
",",
"boolean",
"resetCenter",
")",
"{",
"// check for an empty model",
"IAtomContainerSet",
"moleculeSet",
"=",
"chemModel",
... | Paint a ChemModel.
@param chemModel
@param drawVisitor the visitor that does the drawing
@param bounds the bounds of the area to paint on.
@param resetCenter
if true, set the modelCenter to the center of the ChemModel's bounds. | [
"Paint",
"a",
"ChemModel",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/ChemModelRenderer.java#L275-L301 |
114,961 | cdk/cdk | display/renderextra/src/main/java/org/openscience/cdk/renderer/ChemModelRenderer.java | ChemModelRenderer.calculateDiagramBounds | @Override
public Rectangle calculateDiagramBounds(IChemModel model) {
IAtomContainerSet moleculeSet = model.getMoleculeSet();
IReactionSet reactionSet = model.getReactionSet();
if ((moleculeSet == null && reactionSet == null)) {
return new Rectangle();
}
Rectangl... | java | @Override
public Rectangle calculateDiagramBounds(IChemModel model) {
IAtomContainerSet moleculeSet = model.getMoleculeSet();
IReactionSet reactionSet = model.getReactionSet();
if ((moleculeSet == null && reactionSet == null)) {
return new Rectangle();
}
Rectangl... | [
"@",
"Override",
"public",
"Rectangle",
"calculateDiagramBounds",
"(",
"IChemModel",
"model",
")",
"{",
"IAtomContainerSet",
"moleculeSet",
"=",
"model",
".",
"getMoleculeSet",
"(",
")",
";",
"IReactionSet",
"reactionSet",
"=",
"model",
".",
"getReactionSet",
"(",
... | Given a chem model, calculates the bounding rectangle in screen space.
@param model the model to draw.
@return a rectangle in screen space. | [
"Given",
"a",
"chem",
"model",
"calculates",
"the",
"bounding",
"rectangle",
"in",
"screen",
"space",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/ChemModelRenderer.java#L319-L345 |
114,962 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/PDBPolymer.java | PDBPolymer.addAtom | @Override
public void addAtom(IPDBAtom oAtom, IMonomer oMonomer, IStrand oStrand) {
super.addAtom(oAtom, oMonomer, oStrand);
if (!sequentialListOfMonomers.contains(oMonomer.getMonomerName()))
sequentialListOfMonomers.add(oMonomer.getMonomerName());
} | java | @Override
public void addAtom(IPDBAtom oAtom, IMonomer oMonomer, IStrand oStrand) {
super.addAtom(oAtom, oMonomer, oStrand);
if (!sequentialListOfMonomers.contains(oMonomer.getMonomerName()))
sequentialListOfMonomers.add(oMonomer.getMonomerName());
} | [
"@",
"Override",
"public",
"void",
"addAtom",
"(",
"IPDBAtom",
"oAtom",
",",
"IMonomer",
"oMonomer",
",",
"IStrand",
"oStrand",
")",
"{",
"super",
".",
"addAtom",
"(",
"oAtom",
",",
"oMonomer",
",",
"oStrand",
")",
";",
"if",
"(",
"!",
"sequentialListOfMon... | Adds the IPDBAtom oAtom to a specified Monomer of a specified Strand.
Additionally, it keeps record of the iCode.
@param oAtom The IPDBAtom to add
@param oMonomer The monomer the atom belongs to | [
"Adds",
"the",
"IPDBAtom",
"oAtom",
"to",
"a",
"specified",
"Monomer",
"of",
"a",
"specified",
"Strand",
".",
"Additionally",
"it",
"keeps",
"record",
"of",
"the",
"iCode",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/PDBPolymer.java#L106-L111 |
114,963 | cdk/cdk | descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/AtomValenceDescriptor.java | AtomValenceDescriptor.calculate | @Override
public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
int atomValence = AtomValenceTool.getValence(atom);
return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
atomValence), getDescriptorNames());
} | java | @Override
public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
int atomValence = AtomValenceTool.getValence(atom);
return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
atomValence), getDescriptorNames());
} | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtom",
"atom",
",",
"IAtomContainer",
"container",
")",
"{",
"int",
"atomValence",
"=",
"AtomValenceTool",
".",
"getValence",
"(",
"atom",
")",
";",
"return",
"new",
"DescriptorValue",
"(",
"getSp... | This method calculates the valence of an atom.
@param atom The IAtom for which the DescriptorValue is requested
@param container Parameter is the atom container.
@return The valence of an atom | [
"This",
"method",
"calculates",
"the",
"valence",
"of",
"an",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/AtomValenceDescriptor.java#L93-L98 |
114,964 | cdk/cdk | storage/smiles/src/main/java/org/openscience/cdk/smiles/CDKToBeam.java | CDKToBeam.addGeometricConfiguration | private static void addGeometricConfiguration(IDoubleBondStereochemistry dbs, int flavour, GraphBuilder gb, Map<IAtom, Integer> indices) {
IBond db = dbs.getStereoBond();
IBond[] bs = dbs.getBonds();
// don't try to set a configuration on aromatic bonds
if (SmiFlavor.isSet(flavour, Smi... | java | private static void addGeometricConfiguration(IDoubleBondStereochemistry dbs, int flavour, GraphBuilder gb, Map<IAtom, Integer> indices) {
IBond db = dbs.getStereoBond();
IBond[] bs = dbs.getBonds();
// don't try to set a configuration on aromatic bonds
if (SmiFlavor.isSet(flavour, Smi... | [
"private",
"static",
"void",
"addGeometricConfiguration",
"(",
"IDoubleBondStereochemistry",
"dbs",
",",
"int",
"flavour",
",",
"GraphBuilder",
"gb",
",",
"Map",
"<",
"IAtom",
",",
"Integer",
">",
"indices",
")",
"{",
"IBond",
"db",
"=",
"dbs",
".",
"getStereo... | Add double-bond stereo configuration to the Beam GraphBuilder.
@param dbs stereo element specifying double-bond configuration
@param gb the current graph builder
@param indices atom indices | [
"Add",
"double",
"-",
"bond",
"stereo",
"configuration",
"to",
"the",
"Beam",
"GraphBuilder",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/smiles/src/main/java/org/openscience/cdk/smiles/CDKToBeam.java#L309-L329 |
114,965 | cdk/cdk | storage/smiles/src/main/java/org/openscience/cdk/smiles/CDKToBeam.java | CDKToBeam.addTetrahedralConfiguration | private static void addTetrahedralConfiguration(ITetrahedralChirality tc, GraphBuilder gb, Map<IAtom, Integer> indices) {
IAtom[] ligands = tc.getLigands();
int u = indices.get(tc.getChiralAtom());
int vs[] = new int[]{indices.get(ligands[0]), indices.get(ligands[1]), indices.get(ligands[2]),
... | java | private static void addTetrahedralConfiguration(ITetrahedralChirality tc, GraphBuilder gb, Map<IAtom, Integer> indices) {
IAtom[] ligands = tc.getLigands();
int u = indices.get(tc.getChiralAtom());
int vs[] = new int[]{indices.get(ligands[0]), indices.get(ligands[1]), indices.get(ligands[2]),
... | [
"private",
"static",
"void",
"addTetrahedralConfiguration",
"(",
"ITetrahedralChirality",
"tc",
",",
"GraphBuilder",
"gb",
",",
"Map",
"<",
"IAtom",
",",
"Integer",
">",
"indices",
")",
"{",
"IAtom",
"[",
"]",
"ligands",
"=",
"tc",
".",
"getLigands",
"(",
")... | Add tetrahedral stereo configuration to the Beam GraphBuilder.
@param tc stereo element specifying tetrahedral configuration
@param gb the current graph builder
@param indices atom indices | [
"Add",
"tetrahedral",
"stereo",
"configuration",
"to",
"the",
"Beam",
"GraphBuilder",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/smiles/src/main/java/org/openscience/cdk/smiles/CDKToBeam.java#L338-L348 |
114,966 | cdk/cdk | storage/smiles/src/main/java/org/openscience/cdk/smiles/CDKToBeam.java | CDKToBeam.addExtendedTetrahedralConfiguration | private static void addExtendedTetrahedralConfiguration(ExtendedTetrahedral et, GraphBuilder gb,
Map<IAtom, Integer> indices) {
IAtom[] ligands = et.peripherals();
int u = indices.get(et.focus());
int vs[] = new int[]{indices.get(ligands[0]), indices.get(ligands[1]), indices.get(li... | java | private static void addExtendedTetrahedralConfiguration(ExtendedTetrahedral et, GraphBuilder gb,
Map<IAtom, Integer> indices) {
IAtom[] ligands = et.peripherals();
int u = indices.get(et.focus());
int vs[] = new int[]{indices.get(ligands[0]), indices.get(ligands[1]), indices.get(li... | [
"private",
"static",
"void",
"addExtendedTetrahedralConfiguration",
"(",
"ExtendedTetrahedral",
"et",
",",
"GraphBuilder",
"gb",
",",
"Map",
"<",
"IAtom",
",",
"Integer",
">",
"indices",
")",
"{",
"IAtom",
"[",
"]",
"ligands",
"=",
"et",
".",
"peripherals",
"(... | Add extended tetrahedral stereo configuration to the Beam GraphBuilder.
@param et stereo element specifying tetrahedral configuration
@param gb the current graph builder
@param indices atom indices | [
"Add",
"extended",
"tetrahedral",
"stereo",
"configuration",
"to",
"the",
"Beam",
"GraphBuilder",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/smiles/src/main/java/org/openscience/cdk/smiles/CDKToBeam.java#L357-L368 |
114,967 | cdk/cdk | storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java | MDLV2000Writer.determineCharge | private int determineCharge(IAtomContainer mol, IAtom atom) {
Integer q = atom.getFormalCharge();
if (q == null)
q = 0;
switch (q) {
case -3: return 7;
case -2: return 6;
case -1: return 5;
case 0:
if (mol.getConnectedSi... | java | private int determineCharge(IAtomContainer mol, IAtom atom) {
Integer q = atom.getFormalCharge();
if (q == null)
q = 0;
switch (q) {
case -3: return 7;
case -2: return 6;
case -1: return 5;
case 0:
if (mol.getConnectedSi... | [
"private",
"int",
"determineCharge",
"(",
"IAtomContainer",
"mol",
",",
"IAtom",
"atom",
")",
"{",
"Integer",
"q",
"=",
"atom",
".",
"getFormalCharge",
"(",
")",
";",
"if",
"(",
"q",
"==",
"null",
")",
"q",
"=",
"0",
";",
"switch",
"(",
"q",
")",
"... | 4 = doublet radical, 5 = -1, 6 = -2, 7 = -3 | [
"4",
"=",
"doublet",
"radical",
"5",
"=",
"-",
"1",
"6",
"=",
"-",
"2",
"7",
"=",
"-",
"3"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java#L775-L792 |
114,968 | cdk/cdk | storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java | MDLV2000Writer.formatMDLInt | protected static String formatMDLInt(int x, int n) {
char[] buf = new char[n];
Arrays.fill(buf, ' ');
String val = Integer.toString(x);
if (val.length() > n)
val = "0";
int off = n - val.length();
for (int i = 0; i < val.length(); i++)
buf[off+i] =... | java | protected static String formatMDLInt(int x, int n) {
char[] buf = new char[n];
Arrays.fill(buf, ' ');
String val = Integer.toString(x);
if (val.length() > n)
val = "0";
int off = n - val.length();
for (int i = 0; i < val.length(); i++)
buf[off+i] =... | [
"protected",
"static",
"String",
"formatMDLInt",
"(",
"int",
"x",
",",
"int",
"n",
")",
"{",
"char",
"[",
"]",
"buf",
"=",
"new",
"char",
"[",
"n",
"]",
";",
"Arrays",
".",
"fill",
"(",
"buf",
",",
"'",
"'",
")",
";",
"String",
"val",
"=",
"Int... | Formats an integer to fit into the connection table and changes it
to a String.
@param x The int to be formated
@param n Length of the String
@return The String to be written into the connectiontable | [
"Formats",
"an",
"integer",
"to",
"fit",
"into",
"the",
"connection",
"table",
"and",
"changes",
"it",
"to",
"a",
"String",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java#L1112-L1122 |
114,969 | cdk/cdk | storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java | MDLV2000Writer.formatMDLFloat | protected static String formatMDLFloat(float fl) {
String s = "", fs = "";
int l;
NumberFormat nf = NumberFormat.getNumberInstance(Locale.ENGLISH);
nf.setMinimumIntegerDigits(1);
nf.setMaximumIntegerDigits(4);
nf.setMinimumFractionDigits(4);
nf.setMaximumFractionD... | java | protected static String formatMDLFloat(float fl) {
String s = "", fs = "";
int l;
NumberFormat nf = NumberFormat.getNumberInstance(Locale.ENGLISH);
nf.setMinimumIntegerDigits(1);
nf.setMaximumIntegerDigits(4);
nf.setMinimumFractionDigits(4);
nf.setMaximumFractionD... | [
"protected",
"static",
"String",
"formatMDLFloat",
"(",
"float",
"fl",
")",
"{",
"String",
"s",
"=",
"\"\"",
",",
"fs",
"=",
"\"\"",
";",
"int",
"l",
";",
"NumberFormat",
"nf",
"=",
"NumberFormat",
".",
"getNumberInstance",
"(",
"Locale",
".",
"ENGLISH",
... | Formats a float to fit into the connectiontable and changes it
to a String.
@param fl The float to be formated
@return The String to be written into the connectiontable | [
"Formats",
"a",
"float",
"to",
"fit",
"into",
"the",
"connectiontable",
"and",
"changes",
"it",
"to",
"a",
"String",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java#L1131-L1149 |
114,970 | cdk/cdk | storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java | MDLV2000Writer.formatMDLString | protected static String formatMDLString(String s, int le) {
s = s.trim();
if (s.length() > le) return s.substring(0, le);
int l;
l = le - s.length();
for (int f = 0; f < l; f++)
s += " ";
return s;
} | java | protected static String formatMDLString(String s, int le) {
s = s.trim();
if (s.length() > le) return s.substring(0, le);
int l;
l = le - s.length();
for (int f = 0; f < l; f++)
s += " ";
return s;
} | [
"protected",
"static",
"String",
"formatMDLString",
"(",
"String",
"s",
",",
"int",
"le",
")",
"{",
"s",
"=",
"s",
".",
"trim",
"(",
")",
";",
"if",
"(",
"s",
".",
"length",
"(",
")",
">",
"le",
")",
"return",
"s",
".",
"substring",
"(",
"0",
"... | Formats a String to fit into the connectiontable.
@param s The String to be formated
@param le The length of the String
@return The String to be written in the connectiontable | [
"Formats",
"a",
"String",
"to",
"fit",
"into",
"the",
"connectiontable",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/ctab/src/main/java/org/openscience/cdk/io/MDLV2000Writer.java#L1158-L1166 |
114,971 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/BondCountDescriptor.java | BondCountDescriptor.setParameters | @Override
public void setParameters(Object[] params) throws CDKException {
if (params.length > 1) {
throw new CDKException("BondCount only expects one parameter");
}
if (!(params[0] instanceof String)) {
throw new CDKException("The parameter must be of type IBond.Orde... | java | @Override
public void setParameters(Object[] params) throws CDKException {
if (params.length > 1) {
throw new CDKException("BondCount only expects one parameter");
}
if (!(params[0] instanceof String)) {
throw new CDKException("The parameter must be of type IBond.Orde... | [
"@",
"Override",
"public",
"void",
"setParameters",
"(",
"Object",
"[",
"]",
"params",
")",
"throws",
"CDKException",
"{",
"if",
"(",
"params",
".",
"length",
">",
"1",
")",
"{",
"throw",
"new",
"CDKException",
"(",
"\"BondCount only expects one parameter\"",
... | Sets the parameters attribute of the BondCountDescriptor object
@param params The new parameters value
@exception CDKException Description of the Exception | [
"Sets",
"the",
"parameters",
"attribute",
"of",
"the",
"BondCountDescriptor",
"object"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/BondCountDescriptor.java#L93-L107 |
114,972 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/BondCountDescriptor.java | BondCountDescriptor.calculate | @Override
public DescriptorValue calculate(IAtomContainer container) {
if (order.equals("")) {
int bondCount = 0;
for (IBond bond : container.bonds()) {
boolean hasHydrogen = false;
for (int i = 0; i < bond.getAtomCount(); i++) {
if... | java | @Override
public DescriptorValue calculate(IAtomContainer container) {
if (order.equals("")) {
int bondCount = 0;
for (IBond bond : container.bonds()) {
boolean hasHydrogen = false;
for (int i = 0; i < bond.getAtomCount(); i++) {
if... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtomContainer",
"container",
")",
"{",
"if",
"(",
"order",
".",
"equals",
"(",
"\"\"",
")",
")",
"{",
"int",
"bondCount",
"=",
"0",
";",
"for",
"(",
"IBond",
"bond",
":",
"container",
".",... | This method calculate the number of bonds of a given type in an atomContainer
@param container AtomContainer
@return The number of bonds of a certain type. | [
"This",
"method",
"calculate",
"the",
"number",
"of",
"bonds",
"of",
"a",
"given",
"type",
"in",
"an",
"atomContainer"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/BondCountDescriptor.java#L136-L164 |
114,973 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/math/Vector.java | Vector.sub | public Vector sub(Vector b) {
if ((b == null) || (size != b.size)) return null;
int i;
Vector result = new Vector(size);
for (i = 0; i < size; i++)
result.vector[i] = vector[i] - b.vector[i];
return result;
} | java | public Vector sub(Vector b) {
if ((b == null) || (size != b.size)) return null;
int i;
Vector result = new Vector(size);
for (i = 0; i < size; i++)
result.vector[i] = vector[i] - b.vector[i];
return result;
} | [
"public",
"Vector",
"sub",
"(",
"Vector",
"b",
")",
"{",
"if",
"(",
"(",
"b",
"==",
"null",
")",
"||",
"(",
"size",
"!=",
"b",
".",
"size",
")",
")",
"return",
"null",
";",
"int",
"i",
";",
"Vector",
"result",
"=",
"new",
"Vector",
"(",
"size",... | Subtraktion from two vectors | [
"Subtraktion",
"from",
"two",
"vectors"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/Vector.java#L100-L108 |
114,974 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/math/Vector.java | Vector.mul | public Vector mul(double b) {
Vector result = new Vector(size);
int i;
for (i = 0; i < size; i++)
result.vector[i] = vector[i] * b;
return result;
} | java | public Vector mul(double b) {
Vector result = new Vector(size);
int i;
for (i = 0; i < size; i++)
result.vector[i] = vector[i] * b;
return result;
} | [
"public",
"Vector",
"mul",
"(",
"double",
"b",
")",
"{",
"Vector",
"result",
"=",
"new",
"Vector",
"(",
"size",
")",
";",
"int",
"i",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"size",
";",
"i",
"++",
")",
"result",
".",
"vector",
"[",
"i... | Multiplikation from a vectors with an double | [
"Multiplikation",
"from",
"a",
"vectors",
"with",
"an",
"double"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/Vector.java#L113-L119 |
114,975 | cdk/cdk | base/reaction/src/main/java/org/openscience/cdk/reaction/ReactionEngine.java | ReactionEngine.extractMechanism | private void extractMechanism(EntryReact entry) {
String mechanismName = "org.openscience.cdk.reaction.mechanism." + entry.getMechanism();
try {
mechanism = (IReactionMechanism) this.getClass().getClassLoader().loadClass(mechanismName).newInstance();
logger.info("Loaded mechanism... | java | private void extractMechanism(EntryReact entry) {
String mechanismName = "org.openscience.cdk.reaction.mechanism." + entry.getMechanism();
try {
mechanism = (IReactionMechanism) this.getClass().getClassLoader().loadClass(mechanismName).newInstance();
logger.info("Loaded mechanism... | [
"private",
"void",
"extractMechanism",
"(",
"EntryReact",
"entry",
")",
"{",
"String",
"mechanismName",
"=",
"\"org.openscience.cdk.reaction.mechanism.\"",
"+",
"entry",
".",
"getMechanism",
"(",
")",
";",
"try",
"{",
"mechanism",
"=",
"(",
"IReactionMechanism",
")"... | Extract the mechanism necessary for this reaction.
@param entry The EntryReact object | [
"Extract",
"the",
"mechanism",
"necessary",
"for",
"this",
"reaction",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/reaction/src/main/java/org/openscience/cdk/reaction/ReactionEngine.java#L81-L93 |
114,976 | cdk/cdk | base/reaction/src/main/java/org/openscience/cdk/reaction/ReactionEngine.java | ReactionEngine.initiateDictionary | private EntryReact initiateDictionary(String nameDict, IReactionProcess reaction) {
DictionaryDatabase db = new DictionaryDatabase();
dictionary = db.getDictionary(nameDict);
String entryString = reaction.getSpecification().getSpecificationReference();
entryString = entryString.substring... | java | private EntryReact initiateDictionary(String nameDict, IReactionProcess reaction) {
DictionaryDatabase db = new DictionaryDatabase();
dictionary = db.getDictionary(nameDict);
String entryString = reaction.getSpecification().getSpecificationReference();
entryString = entryString.substring... | [
"private",
"EntryReact",
"initiateDictionary",
"(",
"String",
"nameDict",
",",
"IReactionProcess",
"reaction",
")",
"{",
"DictionaryDatabase",
"db",
"=",
"new",
"DictionaryDatabase",
"(",
")",
";",
"dictionary",
"=",
"db",
".",
"getDictionary",
"(",
"nameDict",
")... | Open the Dictionary OWLReact.
@param nameDict Name of the Dictionary
@param reaction The IReactionProcess
@return The entry for this reaction | [
"Open",
"the",
"Dictionary",
"OWLReact",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/reaction/src/main/java/org/openscience/cdk/reaction/ReactionEngine.java#L102-L109 |
114,977 | cdk/cdk | base/reaction/src/main/java/org/openscience/cdk/reaction/ReactionEngine.java | ReactionEngine.initiateParameterMap2 | private void initiateParameterMap2(EntryReact entry) {
List<List<String>> paramDic = entry.getParameterClass();
paramsMap2 = new ArrayList<IParameterReact>();
for (Iterator<List<String>> it = paramDic.iterator(); it.hasNext();) {
List<String> param = it.next();
String pa... | java | private void initiateParameterMap2(EntryReact entry) {
List<List<String>> paramDic = entry.getParameterClass();
paramsMap2 = new ArrayList<IParameterReact>();
for (Iterator<List<String>> it = paramDic.iterator(); it.hasNext();) {
List<String> param = it.next();
String pa... | [
"private",
"void",
"initiateParameterMap2",
"(",
"EntryReact",
"entry",
")",
"{",
"List",
"<",
"List",
"<",
"String",
">>",
"paramDic",
"=",
"entry",
".",
"getParameterClass",
"(",
")",
";",
"paramsMap2",
"=",
"new",
"ArrayList",
"<",
"IParameterReact",
">",
... | Creates a map with the name and type of the parameters. | [
"Creates",
"a",
"map",
"with",
"the",
"name",
"and",
"type",
"of",
"the",
"parameters",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/reaction/src/main/java/org/openscience/cdk/reaction/ReactionEngine.java#L114-L137 |
114,978 | cdk/cdk | base/reaction/src/main/java/org/openscience/cdk/reaction/ReactionEngine.java | ReactionEngine.getParameterClass | public IParameterReact getParameterClass(Class<?> paramClass) {
for (Iterator<IParameterReact> it = paramsMap2.iterator(); it.hasNext();) {
IParameterReact ipr = it.next();
if (ipr.getClass().equals(paramClass)) return ipr;
}
return null;
} | java | public IParameterReact getParameterClass(Class<?> paramClass) {
for (Iterator<IParameterReact> it = paramsMap2.iterator(); it.hasNext();) {
IParameterReact ipr = it.next();
if (ipr.getClass().equals(paramClass)) return ipr;
}
return null;
} | [
"public",
"IParameterReact",
"getParameterClass",
"(",
"Class",
"<",
"?",
">",
"paramClass",
")",
"{",
"for",
"(",
"Iterator",
"<",
"IParameterReact",
">",
"it",
"=",
"paramsMap2",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",... | Return the IParameterReact if it exists given the class.
@param paramClass The class
@return The IParameterReact | [
"Return",
"the",
"IParameterReact",
"if",
"it",
"exists",
"given",
"the",
"class",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/reaction/src/main/java/org/openscience/cdk/reaction/ReactionEngine.java#L171-L178 |
114,979 | cdk/cdk | storage/ctab/src/main/java/org/openscience/cdk/io/RGroupQueryWriter.java | RGroupQueryWriter.getCTAB | private String getCTAB(IAtomContainer atomContainer) throws CDKException {
StringWriter strWriter = new StringWriter();
MDLV2000Writer mdlWriter = new MDLV2000Writer(strWriter);
mdlWriter.write(atomContainer);
try {
mdlWriter.close();
} catch (IOException exception) {... | java | private String getCTAB(IAtomContainer atomContainer) throws CDKException {
StringWriter strWriter = new StringWriter();
MDLV2000Writer mdlWriter = new MDLV2000Writer(strWriter);
mdlWriter.write(atomContainer);
try {
mdlWriter.close();
} catch (IOException exception) {... | [
"private",
"String",
"getCTAB",
"(",
"IAtomContainer",
"atomContainer",
")",
"throws",
"CDKException",
"{",
"StringWriter",
"strWriter",
"=",
"new",
"StringWriter",
"(",
")",
";",
"MDLV2000Writer",
"mdlWriter",
"=",
"new",
"MDLV2000Writer",
"(",
"strWriter",
")",
... | Produces a CTAB block for an atomContainer, without the header lines.
@param atomContainer
@return CTAB block
@throws CDKException | [
"Produces",
"a",
"CTAB",
"block",
"for",
"an",
"atomContainer",
"without",
"the",
"header",
"lines",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/ctab/src/main/java/org/openscience/cdk/io/RGroupQueryWriter.java#L121-L136 |
114,980 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/requests/data/playlists/GetPlaylistsTracksRequest.java | GetPlaylistsTracksRequest.execute | @SuppressWarnings("unchecked")
public Paging<PlaylistTrack> execute() throws
IOException,
SpotifyWebApiException {
return new PlaylistTrack.JsonUtil().createModelObjectPaging(getJson());
} | java | @SuppressWarnings("unchecked")
public Paging<PlaylistTrack> execute() throws
IOException,
SpotifyWebApiException {
return new PlaylistTrack.JsonUtil().createModelObjectPaging(getJson());
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"Paging",
"<",
"PlaylistTrack",
">",
"execute",
"(",
")",
"throws",
"IOException",
",",
"SpotifyWebApiException",
"{",
"return",
"new",
"PlaylistTrack",
".",
"JsonUtil",
"(",
")",
".",
"createModelObjec... | Get a playlist's tracks.
@return A playlist's tracks.
@throws IOException In case of networking issues.
@throws SpotifyWebApiException The Web API returned an error further specified in this exception's root cause. | [
"Get",
"a",
"playlist",
"s",
"tracks",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/requests/data/playlists/GetPlaylistsTracksRequest.java#L32-L37 |
114,981 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.concat | public static String concat(String[] parts, char character) {
StringBuilder stringBuilder = new StringBuilder();
for (String part : parts) {
stringBuilder.append(part).append(character);
}
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
return stringBuilder.toString();
} | java | public static String concat(String[] parts, char character) {
StringBuilder stringBuilder = new StringBuilder();
for (String part : parts) {
stringBuilder.append(part).append(character);
}
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
return stringBuilder.toString();
} | [
"public",
"static",
"String",
"concat",
"(",
"String",
"[",
"]",
"parts",
",",
"char",
"character",
")",
"{",
"StringBuilder",
"stringBuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"String",
"part",
":",
"parts",
")",
"{",
"stringBuilder... | String concatenation helper method.
@param parts String parts.
@param character Separation character.
@return A string. | [
"String",
"concatenation",
"helper",
"method",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L141-L151 |
114,982 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.authorizationCodeRefresh | public AuthorizationCodeRefreshRequest.Builder authorizationCodeRefresh() {
return new AuthorizationCodeRefreshRequest.Builder(clientId, clientSecret)
.setDefaults(httpManager, scheme, host, port)
.grant_type("refresh_token")
.refresh_token(refreshToken);
} | java | public AuthorizationCodeRefreshRequest.Builder authorizationCodeRefresh() {
return new AuthorizationCodeRefreshRequest.Builder(clientId, clientSecret)
.setDefaults(httpManager, scheme, host, port)
.grant_type("refresh_token")
.refresh_token(refreshToken);
} | [
"public",
"AuthorizationCodeRefreshRequest",
".",
"Builder",
"authorizationCodeRefresh",
"(",
")",
"{",
"return",
"new",
"AuthorizationCodeRefreshRequest",
".",
"Builder",
"(",
"clientId",
",",
"clientSecret",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
... | Refresh the access token by using authorization code grant.
@return An {@link AuthorizationCodeRequest.Builder}. | [
"Refresh",
"the",
"access",
"token",
"by",
"using",
"authorization",
"code",
"grant",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L337-L342 |
114,983 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getAlbum | public GetAlbumRequest.Builder getAlbum(String id) {
return new GetAlbumRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.id(id);
} | java | public GetAlbumRequest.Builder getAlbum(String id) {
return new GetAlbumRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.id(id);
} | [
"public",
"GetAlbumRequest",
".",
"Builder",
"getAlbum",
"(",
"String",
"id",
")",
"{",
"return",
"new",
"GetAlbumRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"host",
",",
"port",
")",
".",
... | Returns an album with the ID given below.
@param id The Spotify album ID of the album you're trying to retrieve.
@return A {@link GetAlbumRequest.Builder}.
@see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URLs & IDs</a> | [
"Returns",
"an",
"album",
"with",
"the",
"ID",
"given",
"below",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L428-L432 |
114,984 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getAlbumsTracks | public GetAlbumsTracksRequest.Builder getAlbumsTracks(String id) {
return new GetAlbumsTracksRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.id(id);
} | java | public GetAlbumsTracksRequest.Builder getAlbumsTracks(String id) {
return new GetAlbumsTracksRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.id(id);
} | [
"public",
"GetAlbumsTracksRequest",
".",
"Builder",
"getAlbumsTracks",
"(",
"String",
"id",
")",
"{",
"return",
"new",
"GetAlbumsTracksRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"host",
",",
"po... | Returns the tracks of the album with the ID given below.
@param id The Spotify ID of the album you're trying to retrieve.
@return A {@link GetAlbumsTracksRequest.Builder}.
@see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URLs & IDs</a> | [
"Returns",
"the",
"tracks",
"of",
"the",
"album",
"with",
"the",
"ID",
"given",
"below",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L441-L445 |
114,985 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getSeveralAlbums | public GetSeveralAlbumsRequest.Builder getSeveralAlbums(String... ids) {
return new GetSeveralAlbumsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.ids(concat(ids, ','));
} | java | public GetSeveralAlbumsRequest.Builder getSeveralAlbums(String... ids) {
return new GetSeveralAlbumsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.ids(concat(ids, ','));
} | [
"public",
"GetSeveralAlbumsRequest",
".",
"Builder",
"getSeveralAlbums",
"(",
"String",
"...",
"ids",
")",
"{",
"return",
"new",
"GetSeveralAlbumsRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"host",... | Get multiple albums.
@param ids The Spotify IDs of all albums you're trying to retrieve. Maximum: 20 IDs.
@return A {@link GetSeveralAlbumsRequest.Builder}.
@see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URLs & IDs</a> | [
"Get",
"multiple",
"albums",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L454-L458 |
114,986 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getArtist | public GetArtistRequest.Builder getArtist(String id) {
return new GetArtistRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.id(id);
} | java | public GetArtistRequest.Builder getArtist(String id) {
return new GetArtistRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.id(id);
} | [
"public",
"GetArtistRequest",
".",
"Builder",
"getArtist",
"(",
"String",
"id",
")",
"{",
"return",
"new",
"GetArtistRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"host",
",",
"port",
")",
".",... | Get an artist.
@param id The Spotify ID of the artist.
@return A {@link GetArtistRequest.Builder}.
@see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URLs & IDs</a> | [
"Get",
"an",
"artist",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L467-L471 |
114,987 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getArtistsAlbums | public GetArtistsAlbumsRequest.Builder getArtistsAlbums(String id) {
return new GetArtistsAlbumsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.id(id);
} | java | public GetArtistsAlbumsRequest.Builder getArtistsAlbums(String id) {
return new GetArtistsAlbumsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.id(id);
} | [
"public",
"GetArtistsAlbumsRequest",
".",
"Builder",
"getArtistsAlbums",
"(",
"String",
"id",
")",
"{",
"return",
"new",
"GetArtistsAlbumsRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"host",
",",
... | Get the albums of a specific artist.
@param id The Spotify ID of the artist.
@return A {@link GetArtistsAlbumsRequest.Builder}.
@see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URLs & IDs</a> | [
"Get",
"the",
"albums",
"of",
"a",
"specific",
"artist",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L480-L484 |
114,988 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getArtistsTopTracks | public GetArtistsTopTracksRequest.Builder getArtistsTopTracks(String id, CountryCode country) {
return new GetArtistsTopTracksRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.id(id)
.country(country);
} | java | public GetArtistsTopTracksRequest.Builder getArtistsTopTracks(String id, CountryCode country) {
return new GetArtistsTopTracksRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.id(id)
.country(country);
} | [
"public",
"GetArtistsTopTracksRequest",
".",
"Builder",
"getArtistsTopTracks",
"(",
"String",
"id",
",",
"CountryCode",
"country",
")",
"{",
"return",
"new",
"GetArtistsTopTracksRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",... | Get the top tracks of an artist in a specific country.
@param id The Spotify ID of the artist.
@param country The ISO 3166-1 alpha-2 country code of the specific country.
@return A {@link GetArtistsTopTracksRequest.Builder}.
@see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spo... | [
"Get",
"the",
"top",
"tracks",
"of",
"an",
"artist",
"in",
"a",
"specific",
"country",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L495-L500 |
114,989 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getSeveralArtists | public GetSeveralArtistsRequest.Builder getSeveralArtists(String... ids) {
return new GetSeveralArtistsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.ids(concat(ids, ','));
} | java | public GetSeveralArtistsRequest.Builder getSeveralArtists(String... ids) {
return new GetSeveralArtistsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.ids(concat(ids, ','));
} | [
"public",
"GetSeveralArtistsRequest",
".",
"Builder",
"getSeveralArtists",
"(",
"String",
"...",
"ids",
")",
"{",
"return",
"new",
"GetSeveralArtistsRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"hos... | Get multiple artists.
@param ids The Spotify IDs of all artists you're trying to retrieve. Maximum: 50 IDs.
@return A {@link GetSeveralArtistsRequest.Builder}.
@see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URLs & IDs</a> | [
"Get",
"multiple",
"artists",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L522-L526 |
114,990 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getCategory | public GetCategoryRequest.Builder getCategory(String category_id) {
return new GetCategoryRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.category_id(category_id);
} | java | public GetCategoryRequest.Builder getCategory(String category_id) {
return new GetCategoryRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.category_id(category_id);
} | [
"public",
"GetCategoryRequest",
".",
"Builder",
"getCategory",
"(",
"String",
"category_id",
")",
"{",
"return",
"new",
"GetCategoryRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"host",
",",
"port"... | Get a category.
@param category_id The Spotify category ID for the category.
@return A {@link GetCategoryRequest.Builder}.
@see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URLs & IDs</a> | [
"Get",
"a",
"category",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L535-L539 |
114,991 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getCategorysPlaylists | public GetCategorysPlaylistsRequest.Builder getCategorysPlaylists(String category_id) {
return new GetCategorysPlaylistsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.category_id(category_id);
} | java | public GetCategorysPlaylistsRequest.Builder getCategorysPlaylists(String category_id) {
return new GetCategorysPlaylistsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.category_id(category_id);
} | [
"public",
"GetCategorysPlaylistsRequest",
".",
"Builder",
"getCategorysPlaylists",
"(",
"String",
"category_id",
")",
"{",
"return",
"new",
"GetCategorysPlaylistsRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
... | Get the playlists from a specific category.
@param category_id The Spotify category ID for the category.
@return A {@link GetCategorysPlaylistsRequest.Builder}.
@see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URLs & IDs</a> | [
"Get",
"the",
"playlists",
"from",
"a",
"specific",
"category",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L548-L552 |
114,992 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getListOfCategories | public GetListOfCategoriesRequest.Builder getListOfCategories() {
return new GetListOfCategoriesRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port);
} | java | public GetListOfCategoriesRequest.Builder getListOfCategories() {
return new GetListOfCategoriesRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port);
} | [
"public",
"GetListOfCategoriesRequest",
".",
"Builder",
"getListOfCategories",
"(",
")",
"{",
"return",
"new",
"GetListOfCategoriesRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"host",
",",
"port",
"... | Get a list of categories.
@return A {@link GetListOfCategoriesRequest.Builder}. | [
"Get",
"a",
"list",
"of",
"categories",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L559-L562 |
114,993 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getListOfFeaturedPlaylists | public GetListOfFeaturedPlaylistsRequest.Builder getListOfFeaturedPlaylists() {
return new GetListOfFeaturedPlaylistsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port);
} | java | public GetListOfFeaturedPlaylistsRequest.Builder getListOfFeaturedPlaylists() {
return new GetListOfFeaturedPlaylistsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port);
} | [
"public",
"GetListOfFeaturedPlaylistsRequest",
".",
"Builder",
"getListOfFeaturedPlaylists",
"(",
")",
"{",
"return",
"new",
"GetListOfFeaturedPlaylistsRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"host",... | Get "Featured Playlists" of different countries which may match a specific language.
@return A {@link GetListOfFeaturedPlaylistsRequest.Builder}. | [
"Get",
"Featured",
"Playlists",
"of",
"different",
"countries",
"which",
"may",
"match",
"a",
"specific",
"language",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L569-L572 |
114,994 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getListOfNewReleases | public GetListOfNewReleasesRequest.Builder getListOfNewReleases() {
return new GetListOfNewReleasesRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port);
} | java | public GetListOfNewReleasesRequest.Builder getListOfNewReleases() {
return new GetListOfNewReleasesRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port);
} | [
"public",
"GetListOfNewReleasesRequest",
".",
"Builder",
"getListOfNewReleases",
"(",
")",
"{",
"return",
"new",
"GetListOfNewReleasesRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"host",
",",
"port",
... | Get the newest releases from a specific country.
@return A {@link GetListOfNewReleasesRequest.Builder}. | [
"Get",
"the",
"newest",
"releases",
"from",
"a",
"specific",
"country",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L579-L582 |
114,995 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getRecommendations | public GetRecommendationsRequest.Builder getRecommendations() {
return new GetRecommendationsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port);
} | java | public GetRecommendationsRequest.Builder getRecommendations() {
return new GetRecommendationsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port);
} | [
"public",
"GetRecommendationsRequest",
".",
"Builder",
"getRecommendations",
"(",
")",
"{",
"return",
"new",
"GetRecommendationsRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"host",
",",
"port",
")",... | Create a playlist-style listening experience based on seed artists, tracks and genres.
@return A {@link GetRecommendationsRequest.Builder}. | [
"Create",
"a",
"playlist",
"-",
"style",
"listening",
"experience",
"based",
"on",
"seed",
"artists",
"tracks",
"and",
"genres",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L589-L592 |
114,996 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getAvailableGenreSeeds | public GetAvailableGenreSeedsRequest.Builder getAvailableGenreSeeds() {
return new GetAvailableGenreSeedsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port);
} | java | public GetAvailableGenreSeedsRequest.Builder getAvailableGenreSeeds() {
return new GetAvailableGenreSeedsRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port);
} | [
"public",
"GetAvailableGenreSeedsRequest",
".",
"Builder",
"getAvailableGenreSeeds",
"(",
")",
"{",
"return",
"new",
"GetAvailableGenreSeedsRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManager",
",",
"scheme",
",",
"host",
",",
"p... | Retrieve a list of available genres seed parameter values for recommendations.
@return A {@link GetAvailableGenreSeedsRequest.Builder}. | [
"Retrieve",
"a",
"list",
"of",
"available",
"genres",
"seed",
"parameter",
"values",
"for",
"recommendations",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L599-L602 |
114,997 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.checkCurrentUserFollowsArtistsOrUsers | public CheckCurrentUserFollowsArtistsOrUsersRequest.Builder checkCurrentUserFollowsArtistsOrUsers(
ModelObjectType type, String[] ids) {
return new CheckCurrentUserFollowsArtistsOrUsersRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.type(type)
... | java | public CheckCurrentUserFollowsArtistsOrUsersRequest.Builder checkCurrentUserFollowsArtistsOrUsers(
ModelObjectType type, String[] ids) {
return new CheckCurrentUserFollowsArtistsOrUsersRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.type(type)
... | [
"public",
"CheckCurrentUserFollowsArtistsOrUsersRequest",
".",
"Builder",
"checkCurrentUserFollowsArtistsOrUsers",
"(",
"ModelObjectType",
"type",
",",
"String",
"[",
"]",
"ids",
")",
"{",
"return",
"new",
"CheckCurrentUserFollowsArtistsOrUsersRequest",
".",
"Builder",
"(",
... | Check to see if the current user is following one or more artists or other Spotify users.
@param type The ID type: either artist or user.
@param ids A list of the artist or the user Spotify IDs to check. Maximum: 50 IDs.
@return A {@link CheckCurrentUserFollowsArtistsOrUsersRequest.Builder}.
@see <a href="https://dev... | [
"Check",
"to",
"see",
"if",
"the",
"current",
"user",
"is",
"following",
"one",
"or",
"more",
"artists",
"or",
"other",
"Spotify",
"users",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L612-L618 |
114,998 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.checkUsersFollowPlaylist | public CheckUsersFollowPlaylistRequest.Builder checkUsersFollowPlaylist(
String owner_id, String playlist_id, String[] ids) {
return new CheckUsersFollowPlaylistRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.owner_id(owner_id)
.playlist_id(p... | java | public CheckUsersFollowPlaylistRequest.Builder checkUsersFollowPlaylist(
String owner_id, String playlist_id, String[] ids) {
return new CheckUsersFollowPlaylistRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.owner_id(owner_id)
.playlist_id(p... | [
"public",
"CheckUsersFollowPlaylistRequest",
".",
"Builder",
"checkUsersFollowPlaylist",
"(",
"String",
"owner_id",
",",
"String",
"playlist_id",
",",
"String",
"[",
"]",
"ids",
")",
"{",
"return",
"new",
"CheckUsersFollowPlaylistRequest",
".",
"Builder",
"(",
"access... | Check to see if one or more Spotify users are following a specified playlist.
@param owner_id The Spotify User ID of the person who owns the playlist.
@param playlist_id The Spotify ID of the playlist.
@param ids A list of Spotify User IDs; the IDs of the users that you want to check to see if they
follow t... | [
"Check",
"to",
"see",
"if",
"one",
"or",
"more",
"Spotify",
"users",
"are",
"following",
"a",
"specified",
"playlist",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L630-L637 |
114,999 | thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.followArtistsOrUsers | public FollowArtistsOrUsersRequest.Builder followArtistsOrUsers(ModelObjectType type, String[] ids) {
return new FollowArtistsOrUsersRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.type(type)
.ids(concat(ids, ','));
} | java | public FollowArtistsOrUsersRequest.Builder followArtistsOrUsers(ModelObjectType type, String[] ids) {
return new FollowArtistsOrUsersRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.type(type)
.ids(concat(ids, ','));
} | [
"public",
"FollowArtistsOrUsersRequest",
".",
"Builder",
"followArtistsOrUsers",
"(",
"ModelObjectType",
"type",
",",
"String",
"[",
"]",
"ids",
")",
"{",
"return",
"new",
"FollowArtistsOrUsersRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(... | Add the current user as a follower of one or more artists or other Spotify users.
@param type The ID type: either artist or user.
@param ids A list of the artist or the user Spotify IDs. Maximum: 50 IDs.
@return A {@link FollowArtistsOrUsersRequest.Builder}.
@see <a href="https://developer.spotify.com/web-api/user-gu... | [
"Add",
"the",
"current",
"user",
"as",
"a",
"follower",
"of",
"one",
"or",
"more",
"artists",
"or",
"other",
"Spotify",
"users",
"."
] | c06b8512344c0310d0c1df362fa267879021da2e | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L647-L652 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.