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,700 | cdk/cdk | tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomPlacer3D.java | AtomPlacer3D.allHeavyAtomsPlaced | public boolean allHeavyAtomsPlaced(IAtomContainer ac) {
for (int i = 0; i < ac.getAtomCount(); i++) {
if (isUnplacedHeavyAtom(ac.getAtom(i))) {
return false;
}
}
return true;
} | java | public boolean allHeavyAtomsPlaced(IAtomContainer ac) {
for (int i = 0; i < ac.getAtomCount(); i++) {
if (isUnplacedHeavyAtom(ac.getAtom(i))) {
return false;
}
}
return true;
} | [
"public",
"boolean",
"allHeavyAtomsPlaced",
"(",
"IAtomContainer",
"ac",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ac",
".",
"getAtomCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"isUnplacedHeavyAtom",
"(",
"ac",
".",
"getA... | True is all the atoms in the given AtomContainer have been placed.
@param ac The AtomContainer to be searched
@return True is all the atoms in the given AtomContainer have been placed | [
"True",
"is",
"all",
"the",
"atoms",
"in",
"the",
"given",
"AtomContainer",
"have",
"been",
"placed",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomPlacer3D.java#L609-L616 |
114,701 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/MannholdLogPDescriptor.java | MannholdLogPDescriptor.calculate | @Override
public DescriptorValue calculate(IAtomContainer atomContainer) {
IAtomContainer ac = null;
try {
ac = (IAtomContainer) atomContainer.clone();
} catch (CloneNotSupportedException e) {
return getDummyDescriptorValue(e);
}
int carbonCount = 0;
... | java | @Override
public DescriptorValue calculate(IAtomContainer atomContainer) {
IAtomContainer ac = null;
try {
ac = (IAtomContainer) atomContainer.clone();
} catch (CloneNotSupportedException e) {
return getDummyDescriptorValue(e);
}
int carbonCount = 0;
... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtomContainer",
"atomContainer",
")",
"{",
"IAtomContainer",
"ac",
"=",
"null",
";",
"try",
"{",
"ac",
"=",
"(",
"IAtomContainer",
")",
"atomContainer",
".",
"clone",
"(",
")",
";",
"}",
"catc... | Calculates the Mannhold LogP for an atom container.
@param atomContainer {@link IAtomContainer} to calculate the
descriptor value for.
@return A descriptor value wrapping a {@link DoubleResult}. | [
"Calculates",
"the",
"Mannhold",
"LogP",
"for",
"an",
"atom",
"container",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/MannholdLogPDescriptor.java#L105-L129 |
114,702 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/validate/Geometry3DValidator.java | Geometry3DValidator.validateBond | @Override
public ValidationReport validateBond(IBond subject) {
ValidationReport report = new ValidationReport();
// only consider two atom bonds
if (subject.getAtomCount() == 2) {
double distance = subject.getBegin().getPoint3d().distance(subject.getEnd().getPoint3d());
... | java | @Override
public ValidationReport validateBond(IBond subject) {
ValidationReport report = new ValidationReport();
// only consider two atom bonds
if (subject.getAtomCount() == 2) {
double distance = subject.getBegin().getPoint3d().distance(subject.getEnd().getPoint3d());
... | [
"@",
"Override",
"public",
"ValidationReport",
"validateBond",
"(",
"IBond",
"subject",
")",
"{",
"ValidationReport",
"report",
"=",
"new",
"ValidationReport",
"(",
")",
";",
"// only consider two atom bonds",
"if",
"(",
"subject",
".",
"getAtomCount",
"(",
")",
"... | assumes 1 unit in the coordinate system is one angstrom | [
"assumes",
"1",
"unit",
"in",
"the",
"coordinate",
"system",
"is",
"one",
"angstrom"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/validate/Geometry3DValidator.java#L37-L51 |
114,703 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/stereo/AbstractStereo.java | AbstractStereo.invapply | protected static <T> T[] invapply(T[] src, int[] perm) {
T[] res = src.clone();
for (int i = 0; i < src.length; i++)
res[i] = src[perm[i]];
return res;
} | java | protected static <T> T[] invapply(T[] src, int[] perm) {
T[] res = src.clone();
for (int i = 0; i < src.length; i++)
res[i] = src[perm[i]];
return res;
} | [
"protected",
"static",
"<",
"T",
">",
"T",
"[",
"]",
"invapply",
"(",
"T",
"[",
"]",
"src",
",",
"int",
"[",
"]",
"perm",
")",
"{",
"T",
"[",
"]",
"res",
"=",
"src",
".",
"clone",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",... | apply the inverse of a permutation | [
"apply",
"the",
"inverse",
"of",
"a",
"permutation"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/stereo/AbstractStereo.java#L190-L195 |
114,704 | cdk/cdk | display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/HighlightGenerator.java | HighlightGenerator.createAtomHighlight | private static Shape createAtomHighlight(IAtom atom, double radius) {
double x = atom.getPoint2d().x;
double y = atom.getPoint2d().y;
return new RoundRectangle2D.Double(x - radius, y - radius, 2 * radius, 2 * radius, 2 * radius, 2 * radius);
} | java | private static Shape createAtomHighlight(IAtom atom, double radius) {
double x = atom.getPoint2d().x;
double y = atom.getPoint2d().y;
return new RoundRectangle2D.Double(x - radius, y - radius, 2 * radius, 2 * radius, 2 * radius, 2 * radius);
} | [
"private",
"static",
"Shape",
"createAtomHighlight",
"(",
"IAtom",
"atom",
",",
"double",
"radius",
")",
"{",
"double",
"x",
"=",
"atom",
".",
"getPoint2d",
"(",
")",
".",
"x",
";",
"double",
"y",
"=",
"atom",
".",
"getPoint2d",
"(",
")",
".",
"y",
"... | Create the shape which will highlight the provided atom.
@param atom the atom to highlight
@param radius the specified radius
@return the shape which will highlight the atom | [
"Create",
"the",
"shape",
"which",
"will",
"highlight",
"the",
"provided",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/HighlightGenerator.java#L190-L195 |
114,705 | cdk/cdk | display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/HighlightGenerator.java | HighlightGenerator.createBondHighlight | private static Shape createBondHighlight(IBond bond, double radius) {
double x1 = bond.getBegin().getPoint2d().x;
double x2 = bond.getEnd().getPoint2d().x;
double y1 = bond.getBegin().getPoint2d().y;
double y2 = bond.getEnd().getPoint2d().y;
double dx = x2 - x1;
double ... | java | private static Shape createBondHighlight(IBond bond, double radius) {
double x1 = bond.getBegin().getPoint2d().x;
double x2 = bond.getEnd().getPoint2d().x;
double y1 = bond.getBegin().getPoint2d().y;
double y2 = bond.getEnd().getPoint2d().y;
double dx = x2 - x1;
double ... | [
"private",
"static",
"Shape",
"createBondHighlight",
"(",
"IBond",
"bond",
",",
"double",
"radius",
")",
"{",
"double",
"x1",
"=",
"bond",
".",
"getBegin",
"(",
")",
".",
"getPoint2d",
"(",
")",
".",
"x",
";",
"double",
"x2",
"=",
"bond",
".",
"getEnd"... | Create the shape which will highlight the provided bond.
@param bond the bond to highlight
@param radius the specified radius
@return the shape which will highlight the atom | [
"Create",
"the",
"shape",
"which",
"will",
"highlight",
"the",
"provided",
"bond",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/HighlightGenerator.java#L204-L226 |
114,706 | cdk/cdk | display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/HighlightGenerator.java | HighlightGenerator.createPalette | public static Palette createPalette(final Color color, final Color... colors) {
Color[] cs = new Color[colors.length + 1];
cs[0] = color;
System.arraycopy(colors, 0, cs, 1, colors.length);
return new FixedPalette(cs);
} | java | public static Palette createPalette(final Color color, final Color... colors) {
Color[] cs = new Color[colors.length + 1];
cs[0] = color;
System.arraycopy(colors, 0, cs, 1, colors.length);
return new FixedPalette(cs);
} | [
"public",
"static",
"Palette",
"createPalette",
"(",
"final",
"Color",
"color",
",",
"final",
"Color",
"...",
"colors",
")",
"{",
"Color",
"[",
"]",
"cs",
"=",
"new",
"Color",
"[",
"colors",
".",
"length",
"+",
"1",
"]",
";",
"cs",
"[",
"0",
"]",
"... | Create a palette which uses the provided colors.
@param colors colors to use in the palette
@return a palette to use in highlighting | [
"Create",
"a",
"palette",
"which",
"uses",
"the",
"provided",
"colors",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/HighlightGenerator.java#L250-L255 |
114,707 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/math/IVector.java | IVector.sub | public IVector sub(IVector b) {
IVector result = new IVector(size);
sub(b, result);
return result;
} | java | public IVector sub(IVector b) {
IVector result = new IVector(size);
sub(b, result);
return result;
} | [
"public",
"IVector",
"sub",
"(",
"IVector",
"b",
")",
"{",
"IVector",
"result",
"=",
"new",
"IVector",
"(",
"size",
")",
";",
"sub",
"(",
"b",
",",
"result",
")",
";",
"return",
"result",
";",
"}"
] | Subtraction from two vectors | [
"Subtraction",
"from",
"two",
"vectors"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/IVector.java#L85-L89 |
114,708 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/math/IVector.java | IVector.dot | public Complex dot(IVector b) {
if ((b == null) || (size != b.size)) return new Complex(Double.NaN, Double.NaN);
Complex result = new Complex(0d, 0d);
int i;
for (i = 0; i < size; i++) {
result.real += realvector[i] * b.realvector[i] - imagvector[i] * b.imagvector[i];
... | java | public Complex dot(IVector b) {
if ((b == null) || (size != b.size)) return new Complex(Double.NaN, Double.NaN);
Complex result = new Complex(0d, 0d);
int i;
for (i = 0; i < size; i++) {
result.real += realvector[i] * b.realvector[i] - imagvector[i] * b.imagvector[i];
... | [
"public",
"Complex",
"dot",
"(",
"IVector",
"b",
")",
"{",
"if",
"(",
"(",
"b",
"==",
"null",
")",
"||",
"(",
"size",
"!=",
"b",
".",
"size",
")",
")",
"return",
"new",
"Complex",
"(",
"Double",
".",
"NaN",
",",
"Double",
".",
"NaN",
")",
";",
... | Multiplication from two vectors | [
"Multiplication",
"from",
"two",
"vectors"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/IVector.java#L131-L141 |
114,709 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/math/IVector.java | IVector.duplicate | public void duplicate(IVector result) {
if (result.size != size) result.reshape(size);
int i;
for (i = 0; i < size; i++) {
result.realvector[i] = realvector[i];
result.imagvector[i] = imagvector[i];
}
} | java | public void duplicate(IVector result) {
if (result.size != size) result.reshape(size);
int i;
for (i = 0; i < size; i++) {
result.realvector[i] = realvector[i];
result.imagvector[i] = imagvector[i];
}
} | [
"public",
"void",
"duplicate",
"(",
"IVector",
"result",
")",
"{",
"if",
"(",
"result",
".",
"size",
"!=",
"size",
")",
"result",
".",
"reshape",
"(",
"size",
")",
";",
"int",
"i",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"size",
";",
"i"... | Copy a vector | [
"Copy",
"a",
"vector"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/IVector.java#L155-L163 |
114,710 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/math/IVector.java | IVector.reshape | public void reshape(int newsize) {
if ((newsize == size) || (newsize <= 0)) return;
double[] newrealvector = new double[newsize];
double[] newimagvector = new double[newsize];
int min = Math.min(size, newsize);
int i;
for (i = 0; i < min; i++) {
newrealvector... | java | public void reshape(int newsize) {
if ((newsize == size) || (newsize <= 0)) return;
double[] newrealvector = new double[newsize];
double[] newimagvector = new double[newsize];
int min = Math.min(size, newsize);
int i;
for (i = 0; i < min; i++) {
newrealvector... | [
"public",
"void",
"reshape",
"(",
"int",
"newsize",
")",
"{",
"if",
"(",
"(",
"newsize",
"==",
"size",
")",
"||",
"(",
"newsize",
"<=",
"0",
")",
")",
"return",
";",
"double",
"[",
"]",
"newrealvector",
"=",
"new",
"double",
"[",
"newsize",
"]",
";... | Resize this vector | [
"Resize",
"this",
"vector"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/math/IVector.java#L182-L201 |
114,711 | cdk/cdk | storage/inchi/src/main/java/org/openscience/cdk/inchi/InChIGenerator.java | InChIGenerator.getInchiKey | public String getInchiKey() throws CDKException {
JniInchiOutputKey key;
try {
key = JniInchiWrapper.getInchiKey(output.getInchi());
if (key.getReturnStatus() == INCHI_KEY.OK) {
return key.getKey();
} else {
throw new CDKException("Erro... | java | public String getInchiKey() throws CDKException {
JniInchiOutputKey key;
try {
key = JniInchiWrapper.getInchiKey(output.getInchi());
if (key.getReturnStatus() == INCHI_KEY.OK) {
return key.getKey();
} else {
throw new CDKException("Erro... | [
"public",
"String",
"getInchiKey",
"(",
")",
"throws",
"CDKException",
"{",
"JniInchiOutputKey",
"key",
";",
"try",
"{",
"key",
"=",
"JniInchiWrapper",
".",
"getInchiKey",
"(",
"output",
".",
"getInchi",
"(",
")",
")",
";",
"if",
"(",
"key",
".",
"getRetur... | Gets generated InChIKey string. | [
"Gets",
"generated",
"InChIKey",
"string",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/inchi/src/main/java/org/openscience/cdk/inchi/InChIGenerator.java#L522-L534 |
114,712 | cdk/cdk | storage/io/src/main/java/org/openscience/cdk/io/cml/CMLModuleStack.java | CMLModuleStack.push | public void push(ICMLModule item) {
if (sp == stack.length) {
ICMLModule[] temp = new ICMLModule[2 * sp];
System.arraycopy(stack, 0, temp, 0, sp);
stack = temp;
}
stack[sp++] = item;
} | java | public void push(ICMLModule item) {
if (sp == stack.length) {
ICMLModule[] temp = new ICMLModule[2 * sp];
System.arraycopy(stack, 0, temp, 0, sp);
stack = temp;
}
stack[sp++] = item;
} | [
"public",
"void",
"push",
"(",
"ICMLModule",
"item",
")",
"{",
"if",
"(",
"sp",
"==",
"stack",
".",
"length",
")",
"{",
"ICMLModule",
"[",
"]",
"temp",
"=",
"new",
"ICMLModule",
"[",
"2",
"*",
"sp",
"]",
";",
"System",
".",
"arraycopy",
"(",
"stack... | Adds an entry to the stack. | [
"Adds",
"an",
"entry",
"to",
"the",
"stack",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/cml/CMLModuleStack.java#L42-L49 |
114,713 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/AtomContainerDiscretePartitionRefinerImpl.java | AtomContainerDiscretePartitionRefinerImpl.getAutomorphismGroup | public PermutationGroup getAutomorphismGroup(IAtomContainer atomContainer, Partition initialPartition) {
setup(atomContainer);
super.refine(initialPartition);
return super.getAutomorphismGroup();
} | java | public PermutationGroup getAutomorphismGroup(IAtomContainer atomContainer, Partition initialPartition) {
setup(atomContainer);
super.refine(initialPartition);
return super.getAutomorphismGroup();
} | [
"public",
"PermutationGroup",
"getAutomorphismGroup",
"(",
"IAtomContainer",
"atomContainer",
",",
"Partition",
"initialPartition",
")",
"{",
"setup",
"(",
"atomContainer",
")",
";",
"super",
".",
"refine",
"(",
"initialPartition",
")",
";",
"return",
"super",
".",
... | Get the automorphism group of the molecule given an initial partition.
@param atomContainer the atom container to use
@param initialPartition an initial partition of the atoms
@return the automorphism group starting with this partition | [
"Get",
"the",
"automorphism",
"group",
"of",
"the",
"molecule",
"given",
"an",
"initial",
"partition",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/AtomContainerDiscretePartitionRefinerImpl.java#L115-L119 |
114,714 | cdk/cdk | tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java | InductivePartialCharges.assignInductivePartialCharges | public IAtomContainer assignInductivePartialCharges(IAtomContainer ac) throws Exception {
if (factory == null) {
factory = AtomTypeFactory
.getInstance("org/openscience/cdk/config/data/jmol_atomtypes.txt", ac.getBuilder());
}
int stepsLimit = 9;
IAtom[] a... | java | public IAtomContainer assignInductivePartialCharges(IAtomContainer ac) throws Exception {
if (factory == null) {
factory = AtomTypeFactory
.getInstance("org/openscience/cdk/config/data/jmol_atomtypes.txt", ac.getBuilder());
}
int stepsLimit = 9;
IAtom[] a... | [
"public",
"IAtomContainer",
"assignInductivePartialCharges",
"(",
"IAtomContainer",
"ac",
")",
"throws",
"Exception",
"{",
"if",
"(",
"factory",
"==",
"null",
")",
"{",
"factory",
"=",
"AtomTypeFactory",
".",
"getInstance",
"(",
"\"org/openscience/cdk/config/data/jmol_a... | Main method, set charge as atom properties.
@param ac AtomContainer
@return AtomContainer
@exception Exception Description of the Exception | [
"Main",
"method",
"set",
"charge",
"as",
"atom",
"properties",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java#L82-L116 |
114,715 | cdk/cdk | tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java | InductivePartialCharges.getPaulingElectronegativities | public double[] getPaulingElectronegativities(IAtomContainer ac, boolean modified) throws CDKException {
double[] paulingElectronegativities = new double[ac.getAtomCount()];
IElement element = null;
String symbol = null;
int atomicNumber = 0;
try {
ifac = Isotopes.get... | java | public double[] getPaulingElectronegativities(IAtomContainer ac, boolean modified) throws CDKException {
double[] paulingElectronegativities = new double[ac.getAtomCount()];
IElement element = null;
String symbol = null;
int atomicNumber = 0;
try {
ifac = Isotopes.get... | [
"public",
"double",
"[",
"]",
"getPaulingElectronegativities",
"(",
"IAtomContainer",
"ac",
",",
"boolean",
"modified",
")",
"throws",
"CDKException",
"{",
"double",
"[",
"]",
"paulingElectronegativities",
"=",
"new",
"double",
"[",
"ac",
".",
"getAtomCount",
"(",... | Gets the paulingElectronegativities attribute of the
InductivePartialCharges object.
@param ac AtomContainer
@param modified if true, some values are modified by following the reference
@return The pauling electronegativities | [
"Gets",
"the",
"paulingElectronegativities",
"attribute",
"of",
"the",
"InductivePartialCharges",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java#L136-L191 |
114,716 | cdk/cdk | tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java | InductivePartialCharges.getAtomicSoftnessCore | public double getAtomicSoftnessCore(IAtomContainer ac, int atomPosition) throws CDKException {
if (factory == null) {
factory = AtomTypeFactory
.getInstance("org/openscience/cdk/config/data/jmol_atomtypes.txt", ac.getBuilder());
}
IAtom target = null;
doub... | java | public double getAtomicSoftnessCore(IAtomContainer ac, int atomPosition) throws CDKException {
if (factory == null) {
factory = AtomTypeFactory
.getInstance("org/openscience/cdk/config/data/jmol_atomtypes.txt", ac.getBuilder());
}
IAtom target = null;
doub... | [
"public",
"double",
"getAtomicSoftnessCore",
"(",
"IAtomContainer",
"ac",
",",
"int",
"atomPosition",
")",
"throws",
"CDKException",
"{",
"if",
"(",
"factory",
"==",
"null",
")",
"{",
"factory",
"=",
"AtomTypeFactory",
".",
"getInstance",
"(",
"\"org/openscience/c... | of effective electronegativity | [
"of",
"effective",
"electronegativity"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java#L204-L257 |
114,717 | cdk/cdk | tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java | InductivePartialCharges.getAtomicChargeIncrement | private double getAtomicChargeIncrement(IAtomContainer ac, int atomPosition, double[] ElEn, int as)
throws CDKException {
IAtom[] allAtoms = null;
IAtom target = null;
double incrementedCharge = 0;
double radiusTarget = 0;
target = ac.getAtom(atomPosition);
//... | java | private double getAtomicChargeIncrement(IAtomContainer ac, int atomPosition, double[] ElEn, int as)
throws CDKException {
IAtom[] allAtoms = null;
IAtom target = null;
double incrementedCharge = 0;
double radiusTarget = 0;
target = ac.getAtom(atomPosition);
//... | [
"private",
"double",
"getAtomicChargeIncrement",
"(",
"IAtomContainer",
"ac",
",",
"int",
"atomPosition",
",",
"double",
"[",
"]",
"ElEn",
",",
"int",
"as",
")",
"throws",
"CDKException",
"{",
"IAtom",
"[",
"]",
"allAtoms",
"=",
"null",
";",
"IAtom",
"target... | Gets the atomicChargeIncrement attribute of the InductivePartialCharges
object.
@param ac AtomContainer
@param atomPosition position of target atom
@param ElEn electronegativity of target atom
@param as step in iteration
@return The atomic charge increment ... | [
"Gets",
"the",
"atomicChargeIncrement",
"attribute",
"of",
"the",
"InductivePartialCharges",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java#L271-L323 |
114,718 | cdk/cdk | tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java | InductivePartialCharges.getCovalentRadius | private double getCovalentRadius(String symbol, IBond.Order maxBondOrder) {
double radiusTarget = 0;
if (symbol.equals("F")) {
radiusTarget = 0.64;
} else if (symbol.equals("Cl")) {
radiusTarget = 0.99;
} else if (symbol.equals("Br")) {
radiusTarget = ... | java | private double getCovalentRadius(String symbol, IBond.Order maxBondOrder) {
double radiusTarget = 0;
if (symbol.equals("F")) {
radiusTarget = 0.64;
} else if (symbol.equals("Cl")) {
radiusTarget = 0.99;
} else if (symbol.equals("Br")) {
radiusTarget = ... | [
"private",
"double",
"getCovalentRadius",
"(",
"String",
"symbol",
",",
"IBond",
".",
"Order",
"maxBondOrder",
")",
"{",
"double",
"radiusTarget",
"=",
"0",
";",
"if",
"(",
"symbol",
".",
"equals",
"(",
"\"F\"",
")",
")",
"{",
"radiusTarget",
"=",
"0.64",
... | Gets the covalentRadius attribute of the InductivePartialCharges object.
@param symbol symbol of the atom
@param maxBondOrder its max bond order
@return The covalentRadius value given by the reference | [
"Gets",
"the",
"covalentRadius",
"attribute",
"of",
"the",
"InductivePartialCharges",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/InductivePartialCharges.java#L332-L370 |
114,719 | cdk/cdk | descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IsProtonInAromaticSystemDescriptor.java | IsProtonInAromaticSystemDescriptor.calculate | @Override
public DescriptorValue calculate(IAtom atom, IAtomContainer atomContainer) {
IAtomContainer clonedAtomContainer;
try {
clonedAtomContainer = (IAtomContainer) atomContainer.clone();
} catch (CloneNotSupportedException e) {
return new DescriptorValue(getSpecif... | java | @Override
public DescriptorValue calculate(IAtom atom, IAtomContainer atomContainer) {
IAtomContainer clonedAtomContainer;
try {
clonedAtomContainer = (IAtomContainer) atomContainer.clone();
} catch (CloneNotSupportedException e) {
return new DescriptorValue(getSpecif... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtom",
"atom",
",",
"IAtomContainer",
"atomContainer",
")",
"{",
"IAtomContainer",
"clonedAtomContainer",
";",
"try",
"{",
"clonedAtomContainer",
"=",
"(",
"IAtomContainer",
")",
"atomContainer",
".",
... | The method is a proton descriptor that evaluate if a proton is bonded to an aromatic system or if there is distance of 2 bonds.
It is needed to call the addExplicitHydrogensToSatisfyValency method from the class tools.HydrogenAdder.
@param atom The IAtom for which the DescriptorValue is requested
@param ... | [
"The",
"method",
"is",
"a",
"proton",
"descriptor",
"that",
"evaluate",
"if",
"a",
"proton",
"is",
"bonded",
"to",
"an",
"aromatic",
"system",
"or",
"if",
"there",
"is",
"distance",
"of",
"2",
"bonds",
".",
"It",
"is",
"needed",
"to",
"call",
"the",
"a... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IsProtonInAromaticSystemDescriptor.java#L129-L172 |
114,720 | cdk/cdk | descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/MACCSFingerprinter.java | MACCSFingerprinter.keys | private MaccsKey[] keys(final IChemObjectBuilder builder) throws CDKException {
MaccsKey[] result = keys;
if (result == null) {
synchronized (lock) {
result = keys;
if (result == null) {
try {
keys = result = readKey... | java | private MaccsKey[] keys(final IChemObjectBuilder builder) throws CDKException {
MaccsKey[] result = keys;
if (result == null) {
synchronized (lock) {
result = keys;
if (result == null) {
try {
keys = result = readKey... | [
"private",
"MaccsKey",
"[",
"]",
"keys",
"(",
"final",
"IChemObjectBuilder",
"builder",
")",
"throws",
"CDKException",
"{",
"MaccsKey",
"[",
"]",
"result",
"=",
"keys",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"synchronized",
"(",
"lock",
")",
"... | Access MACCS keys definitions.
@return array of MACCS keys.
@throws CDKException maccs keys could not be loaded | [
"Access",
"MACCS",
"keys",
"definitions",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/MACCSFingerprinter.java#L290-L305 |
114,721 | cdk/cdk | descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/MACCSFingerprinter.java | MACCSFingerprinter.createPattern | private Pattern createPattern(String smarts, IChemObjectBuilder builder) throws IOException {
SmartsPattern ptrn = SmartsPattern.create(smarts, builder);
ptrn.setPrepare(false); // avoid redoing aromaticity etc
return ptrn;
} | java | private Pattern createPattern(String smarts, IChemObjectBuilder builder) throws IOException {
SmartsPattern ptrn = SmartsPattern.create(smarts, builder);
ptrn.setPrepare(false); // avoid redoing aromaticity etc
return ptrn;
} | [
"private",
"Pattern",
"createPattern",
"(",
"String",
"smarts",
",",
"IChemObjectBuilder",
"builder",
")",
"throws",
"IOException",
"{",
"SmartsPattern",
"ptrn",
"=",
"SmartsPattern",
".",
"create",
"(",
"smarts",
",",
"builder",
")",
";",
"ptrn",
".",
"setPrepa... | Create a pattern for the provided SMARTS - if the SMARTS is '?' a pattern
is not created.
@param smarts a smarts pattern
@param builder chem object builder
@return the pattern to match | [
"Create",
"a",
"pattern",
"for",
"the",
"provided",
"SMARTS",
"-",
"if",
"the",
"SMARTS",
"is",
"?",
"a",
"pattern",
"is",
"not",
"created",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/MACCSFingerprinter.java#L315-L319 |
114,722 | cdk/cdk | storage/io/src/main/java/org/openscience/cdk/io/iterator/event/EventCMLReader.java | EventCMLReader.process | public void process() throws CDKException {
logger.debug("Started parsing from input...");
try {
parser.setFeature("http://xml.org/sax/features/validation", false);
logger.info("Deactivated validation");
} catch (SAXException e) {
logger.warn("Cannot deactivat... | java | public void process() throws CDKException {
logger.debug("Started parsing from input...");
try {
parser.setFeature("http://xml.org/sax/features/validation", false);
logger.info("Deactivated validation");
} catch (SAXException e) {
logger.warn("Cannot deactivat... | [
"public",
"void",
"process",
"(",
")",
"throws",
"CDKException",
"{",
"logger",
".",
"debug",
"(",
"\"Started parsing from input...\"",
")",
";",
"try",
"{",
"parser",
".",
"setFeature",
"(",
"\"http://xml.org/sax/features/validation\"",
",",
"false",
")",
";",
"l... | Starts the reading of the CML file. Whenever a new Molecule is read,
a event is thrown to the ReaderListener. | [
"Starts",
"the",
"reading",
"of",
"the",
"CML",
"file",
".",
"Whenever",
"a",
"new",
"Molecule",
"is",
"read",
"a",
"event",
"is",
"thrown",
"to",
"the",
"ReaderListener",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/iterator/event/EventCMLReader.java#L149-L180 |
114,723 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/Reaction.java | Reaction.addReactant | @Override
public void addReactant(IAtomContainer reactant, Double coefficient) {
reactants.addAtomContainer(reactant, coefficient);
notifyChanged();
} | java | @Override
public void addReactant(IAtomContainer reactant, Double coefficient) {
reactants.addAtomContainer(reactant, coefficient);
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"addReactant",
"(",
"IAtomContainer",
"reactant",
",",
"Double",
"coefficient",
")",
"{",
"reactants",
".",
"addAtomContainer",
"(",
"reactant",
",",
"coefficient",
")",
";",
"notifyChanged",
"(",
")",
";",
"}"
] | Adds a reactant to this reaction with a stoichiometry coefficient.
@param reactant Molecule added as reactant to this reaction
@param coefficient Stoichiometry coefficient for this molecule
@see #getReactants | [
"Adds",
"a",
"reactant",
"to",
"this",
"reaction",
"with",
"a",
"stoichiometry",
"coefficient",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Reaction.java#L244-L248 |
114,724 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/Reaction.java | Reaction.setReactantCoefficients | @Override
public boolean setReactantCoefficients(Double[] coefficients) {
boolean result = reactants.setMultipliers(coefficients);
notifyChanged();
return result;
} | java | @Override
public boolean setReactantCoefficients(Double[] coefficients) {
boolean result = reactants.setMultipliers(coefficients);
notifyChanged();
return result;
} | [
"@",
"Override",
"public",
"boolean",
"setReactantCoefficients",
"(",
"Double",
"[",
"]",
"coefficients",
")",
"{",
"boolean",
"result",
"=",
"reactants",
".",
"setMultipliers",
"(",
"coefficients",
")",
";",
"notifyChanged",
"(",
")",
";",
"return",
"result",
... | Sets the coefficients of the reactants.
@param coefficients An array of double's containing the coefficients of the reactants
@return true if coefficients have been set.
@see #getReactantCoefficients | [
"Sets",
"the",
"coefficients",
"of",
"the",
"reactants",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Reaction.java#L366-L371 |
114,725 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/Reaction.java | Reaction.setProductCoefficients | @Override
public boolean setProductCoefficients(Double[] coefficients) {
boolean result = products.setMultipliers(coefficients);
notifyChanged();
return result;
} | java | @Override
public boolean setProductCoefficients(Double[] coefficients) {
boolean result = products.setMultipliers(coefficients);
notifyChanged();
return result;
} | [
"@",
"Override",
"public",
"boolean",
"setProductCoefficients",
"(",
"Double",
"[",
"]",
"coefficients",
")",
"{",
"boolean",
"result",
"=",
"products",
".",
"setMultipliers",
"(",
"coefficients",
")",
";",
"notifyChanged",
"(",
")",
";",
"return",
"result",
"... | Sets the coefficient of the products.
@param coefficients An array of double's containing the coefficients of the products
@return true if coefficients have been set.
@see #getProductCoefficients | [
"Sets",
"the",
"coefficient",
"of",
"the",
"products",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Reaction.java#L380-L385 |
114,726 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/Reaction.java | Reaction.addMapping | @Override
public void addMapping(IMapping mapping) {
if (mappingCount + 1 >= map.length) growMappingArray();
map[mappingCount] = mapping;
mappingCount++;
notifyChanged();
} | java | @Override
public void addMapping(IMapping mapping) {
if (mappingCount + 1 >= map.length) growMappingArray();
map[mappingCount] = mapping;
mappingCount++;
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"addMapping",
"(",
"IMapping",
"mapping",
")",
"{",
"if",
"(",
"mappingCount",
"+",
"1",
">=",
"map",
".",
"length",
")",
"growMappingArray",
"(",
")",
";",
"map",
"[",
"mappingCount",
"]",
"=",
"mapping",
";",
"mapping... | Adds a mapping between the reactant and product side to this
Reaction.
@param mapping Mapping to add.
@see #mappings | [
"Adds",
"a",
"mapping",
"between",
"the",
"reactant",
"and",
"product",
"side",
"to",
"this",
"Reaction",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Reaction.java#L418-L424 |
114,727 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/Reaction.java | Reaction.removeMapping | @Override
public void removeMapping(int pos) {
for (int i = pos; i < mappingCount - 1; i++) {
map[i] = map[i + 1];
}
map[mappingCount - 1] = null;
mappingCount--;
notifyChanged();
} | java | @Override
public void removeMapping(int pos) {
for (int i = pos; i < mappingCount - 1; i++) {
map[i] = map[i + 1];
}
map[mappingCount - 1] = null;
mappingCount--;
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"removeMapping",
"(",
"int",
"pos",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"pos",
";",
"i",
"<",
"mappingCount",
"-",
"1",
";",
"i",
"++",
")",
"{",
"map",
"[",
"i",
"]",
"=",
"map",
"[",
"i",
"+",
"1",
"]",... | Removes a mapping between the reactant and product side to this
Reaction.
@param pos Position of the Mapping to remove.
@see #mappings | [
"Removes",
"a",
"mapping",
"between",
"the",
"reactant",
"and",
"product",
"side",
"to",
"this",
"Reaction",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Reaction.java#L433-L441 |
114,728 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaRangeManipulator.java | MolecularFormulaRangeManipulator.getRange | public static MolecularFormulaRange getRange(IMolecularFormulaSet mfSet) {
MolecularFormulaRange mfRange = new MolecularFormulaRange();
for (IMolecularFormula mf : mfSet.molecularFormulas()) {
for (IIsotope isotope : mf.isotopes()) {
int occur_new = mf.getIsotopeCount(isotop... | java | public static MolecularFormulaRange getRange(IMolecularFormulaSet mfSet) {
MolecularFormulaRange mfRange = new MolecularFormulaRange();
for (IMolecularFormula mf : mfSet.molecularFormulas()) {
for (IIsotope isotope : mf.isotopes()) {
int occur_new = mf.getIsotopeCount(isotop... | [
"public",
"static",
"MolecularFormulaRange",
"getRange",
"(",
"IMolecularFormulaSet",
"mfSet",
")",
"{",
"MolecularFormulaRange",
"mfRange",
"=",
"new",
"MolecularFormulaRange",
"(",
")",
";",
"for",
"(",
"IMolecularFormula",
"mf",
":",
"mfSet",
".",
"molecularFormula... | Extract from a set of MolecularFormula the range of each each element found and
put the element and occurrence in a new MolecularFormulaRange.
@param mfSet The set of molecularFormules to inspect
@return A MolecularFormulaRange containing range occurrence of the elements | [
"Extract",
"from",
"a",
"set",
"of",
"MolecularFormula",
"the",
"range",
"of",
"each",
"each",
"element",
"found",
"and",
"put",
"the",
"element",
"and",
"occurrence",
"in",
"a",
"new",
"MolecularFormulaRange",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaRangeManipulator.java#L49-L82 |
114,729 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaRangeManipulator.java | MolecularFormulaRangeManipulator.getMaximalFormula | public static IMolecularFormula getMaximalFormula(MolecularFormulaRange mfRange, IChemObjectBuilder builder) {
IMolecularFormula formula = builder.newInstance(IMolecularFormula.class);
for (IIsotope isotope : mfRange.isotopes()) {
formula.addIsotope(isotope, mfRange.getIsotopeCountMax(isoto... | java | public static IMolecularFormula getMaximalFormula(MolecularFormulaRange mfRange, IChemObjectBuilder builder) {
IMolecularFormula formula = builder.newInstance(IMolecularFormula.class);
for (IIsotope isotope : mfRange.isotopes()) {
formula.addIsotope(isotope, mfRange.getIsotopeCountMax(isoto... | [
"public",
"static",
"IMolecularFormula",
"getMaximalFormula",
"(",
"MolecularFormulaRange",
"mfRange",
",",
"IChemObjectBuilder",
"builder",
")",
"{",
"IMolecularFormula",
"formula",
"=",
"builder",
".",
"newInstance",
"(",
"IMolecularFormula",
".",
"class",
")",
";",
... | Returns the maximal occurrence of the IIsotope into IMolecularFormula
from this MolelecularFormulaRange.
@param mfRange The MolecularFormulaRange to analyze
@return A IMolecularFormula containing the maximal occurrence of each isotope | [
"Returns",
"the",
"maximal",
"occurrence",
"of",
"the",
"IIsotope",
"into",
"IMolecularFormula",
"from",
"this",
"MolelecularFormulaRange",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaRangeManipulator.java#L91-L99 |
114,730 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaRangeManipulator.java | MolecularFormulaRangeManipulator.getMinimalFormula | public static IMolecularFormula getMinimalFormula(MolecularFormulaRange mfRange, IChemObjectBuilder builder) {
IMolecularFormula formula = builder.newInstance(IMolecularFormula.class);
for (IIsotope isotope : mfRange.isotopes()) {
formula.addIsotope(isotope, mfRange.getIsotopeCountMin(isoto... | java | public static IMolecularFormula getMinimalFormula(MolecularFormulaRange mfRange, IChemObjectBuilder builder) {
IMolecularFormula formula = builder.newInstance(IMolecularFormula.class);
for (IIsotope isotope : mfRange.isotopes()) {
formula.addIsotope(isotope, mfRange.getIsotopeCountMin(isoto... | [
"public",
"static",
"IMolecularFormula",
"getMinimalFormula",
"(",
"MolecularFormulaRange",
"mfRange",
",",
"IChemObjectBuilder",
"builder",
")",
"{",
"IMolecularFormula",
"formula",
"=",
"builder",
".",
"newInstance",
"(",
"IMolecularFormula",
".",
"class",
")",
";",
... | Returns the minimal occurrence of the IIsotope into IMolecularFormula
from this MolelecularFormulaRange.
@param mfRange The MolecularFormulaRange to analyze
@return A IMolecularFormula containing the minimal occurrence of each isotope | [
"Returns",
"the",
"minimal",
"occurrence",
"of",
"the",
"IIsotope",
"into",
"IMolecularFormula",
"from",
"this",
"MolelecularFormulaRange",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaRangeManipulator.java#L108-L116 |
114,731 | cdk/cdk | display/renderawt/src/main/java/org/openscience/cdk/renderer/visitor/AbstractAWTDrawVisitor.java | AbstractAWTDrawVisitor.transformPoint | public int[] transformPoint(double xCoord, double yCoord) {
double[] src = new double[]{xCoord, yCoord};
double[] dest = new double[2];
this.transform.transform(src, 0, dest, 0, 1);
return new int[]{(int) dest[0], (int) dest[1]};
} | java | public int[] transformPoint(double xCoord, double yCoord) {
double[] src = new double[]{xCoord, yCoord};
double[] dest = new double[2];
this.transform.transform(src, 0, dest, 0, 1);
return new int[]{(int) dest[0], (int) dest[1]};
} | [
"public",
"int",
"[",
"]",
"transformPoint",
"(",
"double",
"xCoord",
",",
"double",
"yCoord",
")",
"{",
"double",
"[",
"]",
"src",
"=",
"new",
"double",
"[",
"]",
"{",
"xCoord",
",",
"yCoord",
"}",
";",
"double",
"[",
"]",
"dest",
"=",
"new",
"dou... | Transforms a point according to the current affine transformation,
converting a world coordinate into a screen coordinate.
@param xCoord x-coordinate of the world point to transform
@param yCoord y-coordinate of the world point to transform
@return the transformed screen coordinate | [
"Transforms",
"a",
"point",
"according",
"to",
"the",
"current",
"affine",
"transformation",
"converting",
"a",
"world",
"coordinate",
"into",
"a",
"screen",
"coordinate",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderawt/src/main/java/org/openscience/cdk/renderer/visitor/AbstractAWTDrawVisitor.java#L53-L58 |
114,732 | cdk/cdk | display/renderawt/src/main/java/org/openscience/cdk/renderer/visitor/AbstractAWTDrawVisitor.java | AbstractAWTDrawVisitor.getTextBounds | protected Rectangle2D getTextBounds(String text, double xCoord, double yCoord, Graphics2D graphics) {
FontMetrics fontMetrics = graphics.getFontMetrics();
Rectangle2D bounds = fontMetrics.getStringBounds(text, graphics);
double widthPad = 3;
double heightPad = 1;
double width =... | java | protected Rectangle2D getTextBounds(String text, double xCoord, double yCoord, Graphics2D graphics) {
FontMetrics fontMetrics = graphics.getFontMetrics();
Rectangle2D bounds = fontMetrics.getStringBounds(text, graphics);
double widthPad = 3;
double heightPad = 1;
double width =... | [
"protected",
"Rectangle2D",
"getTextBounds",
"(",
"String",
"text",
",",
"double",
"xCoord",
",",
"double",
"yCoord",
",",
"Graphics2D",
"graphics",
")",
"{",
"FontMetrics",
"fontMetrics",
"=",
"graphics",
".",
"getFontMetrics",
"(",
")",
";",
"Rectangle2D",
"bo... | Calculates the boundaries of a text string in screen coordinates.
@param text the text string
@param xCoord the world x-coordinate of where the text should be placed
@param yCoord the world y-coordinate of where the text should be placed
@param graphics the graphics to which the text is provided as output
@ret... | [
"Calculates",
"the",
"boundaries",
"of",
"a",
"text",
"string",
"in",
"screen",
"coordinates",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderawt/src/main/java/org/openscience/cdk/renderer/visitor/AbstractAWTDrawVisitor.java#L73-L84 |
114,733 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LargestChainDescriptor.java | LargestChainDescriptor.getParameters | @Override
public Object[] getParameters() {
// return the parameters as used for the descriptor calculation
Object[] params = new Object[2];
params[0] = checkAromaticity;
params[1] = checkRingSystem;
return params;
} | java | @Override
public Object[] getParameters() {
// return the parameters as used for the descriptor calculation
Object[] params = new Object[2];
params[0] = checkAromaticity;
params[1] = checkRingSystem;
return params;
} | [
"@",
"Override",
"public",
"Object",
"[",
"]",
"getParameters",
"(",
")",
"{",
"// return the parameters as used for the descriptor calculation",
"Object",
"[",
"]",
"params",
"=",
"new",
"Object",
"[",
"2",
"]",
";",
"params",
"[",
"0",
"]",
"=",
"checkAromatic... | Gets the parameters attribute of the LargestChainDescriptor object.
@return The parameters value
@see #setParameters | [
"Gets",
"the",
"parameters",
"attribute",
"of",
"the",
"LargestChainDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LargestChainDescriptor.java#L130-L137 |
114,734 | cdk/cdk | tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java | SmartsFragmentExtractor.setMode | public void setMode(int mode) {
// check arg
switch (mode) {
case MODE_EXACT:
case MODE_JCOMPOUNDMAPPER:
break;
default:
throw new IllegalArgumentException("Invalid mode specified!");
}
this.mode = mode;
// re-g... | java | public void setMode(int mode) {
// check arg
switch (mode) {
case MODE_EXACT:
case MODE_JCOMPOUNDMAPPER:
break;
default:
throw new IllegalArgumentException("Invalid mode specified!");
}
this.mode = mode;
// re-g... | [
"public",
"void",
"setMode",
"(",
"int",
"mode",
")",
"{",
"// check arg",
"switch",
"(",
"mode",
")",
"{",
"case",
"MODE_EXACT",
":",
"case",
"MODE_JCOMPOUNDMAPPER",
":",
"break",
";",
"default",
":",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invali... | Set the mode of SMARTS substructure selection
@param mode the mode | [
"Set",
"the",
"mode",
"of",
"SMARTS",
"substructure",
"selection"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java#L172-L187 |
114,735 | cdk/cdk | tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java | SmartsFragmentExtractor.generate | public String generate(int[] atomIdxs) {
if (atomIdxs == null)
throw new NullPointerException("No atom indexes provided");
if (atomIdxs.length == 0)
return null; // makes sense?
// special case
if (atomIdxs.length == 1 && mode == MODE_EXACT)
return a... | java | public String generate(int[] atomIdxs) {
if (atomIdxs == null)
throw new NullPointerException("No atom indexes provided");
if (atomIdxs.length == 0)
return null; // makes sense?
// special case
if (atomIdxs.length == 1 && mode == MODE_EXACT)
return a... | [
"public",
"String",
"generate",
"(",
"int",
"[",
"]",
"atomIdxs",
")",
"{",
"if",
"(",
"atomIdxs",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
"\"No atom indexes provided\"",
")",
";",
"if",
"(",
"atomIdxs",
".",
"length",
"==",
"0",
")... | Generate a SMARTS for the substructure formed of the provided
atoms.
@param atomIdxs atom indexes
@return SMARTS, null if an empty array is passed | [
"Generate",
"a",
"SMARTS",
"for",
"the",
"substructure",
"formed",
"of",
"the",
"provided",
"atoms",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java#L196-L235 |
114,736 | cdk/cdk | tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java | SmartsFragmentExtractor.encodeExpr | private void encodeExpr(int idx, int bprev, StringBuilder sb) {
avisit[idx] = numVisit++;
sb.append(aexpr[idx]);
final int d = deg[idx];
int remain = d;
for (int j = 0; j < d; j++) {
int nbr = atomAdj[idx][j];
int bidx = bondAdj[idx][j];
// r... | java | private void encodeExpr(int idx, int bprev, StringBuilder sb) {
avisit[idx] = numVisit++;
sb.append(aexpr[idx]);
final int d = deg[idx];
int remain = d;
for (int j = 0; j < d; j++) {
int nbr = atomAdj[idx][j];
int bidx = bondAdj[idx][j];
// r... | [
"private",
"void",
"encodeExpr",
"(",
"int",
"idx",
",",
"int",
"bprev",
",",
"StringBuilder",
"sb",
")",
"{",
"avisit",
"[",
"idx",
"]",
"=",
"numVisit",
"++",
";",
"sb",
".",
"append",
"(",
"aexpr",
"[",
"idx",
"]",
")",
";",
"final",
"int",
"d",... | Recursively encodes a SMARTS expression into the provides
string builder.
@param idx atom index
@param bprev previous bond
@param sb destition to write SMARTS to | [
"Recursively",
"encodes",
"a",
"SMARTS",
"expression",
"into",
"the",
"provides",
"string",
"builder",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java#L267-L319 |
114,737 | cdk/cdk | tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java | SmartsFragmentExtractor.chooseRingNumber | private int chooseRingNumber() {
for (int i = 1; i < rnums.length; i++) {
if (rnums[i] == 0) {
rnums[i] = 1;
return i;
}
}
throw new IllegalStateException("No more ring numbers available!");
} | java | private int chooseRingNumber() {
for (int i = 1; i < rnums.length; i++) {
if (rnums[i] == 0) {
rnums[i] = 1;
return i;
}
}
throw new IllegalStateException("No more ring numbers available!");
} | [
"private",
"int",
"chooseRingNumber",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"rnums",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"rnums",
"[",
"i",
"]",
"==",
"0",
")",
"{",
"rnums",
"[",
"i",
"]",
"=",
"1"... | Select the lowest ring number for use in SMARTS.
@return ring number
@throws IllegalStateException all ring numbers are used | [
"Select",
"the",
"lowest",
"ring",
"number",
"for",
"use",
"in",
"SMARTS",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java#L327-L335 |
114,738 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/graph/MoleculeGraphs.java | MoleculeGraphs.getMoleculeGraph | static public SimpleGraph getMoleculeGraph(IAtomContainer molecule) {
SimpleGraph graph = new SimpleGraph();
for (int i = 0; i < molecule.getAtomCount(); i++) {
IAtom atom = molecule.getAtom(i);
graph.addVertex(atom);
}
for (int i = 0; i < molecule.getBondCount()... | java | static public SimpleGraph getMoleculeGraph(IAtomContainer molecule) {
SimpleGraph graph = new SimpleGraph();
for (int i = 0; i < molecule.getAtomCount(); i++) {
IAtom atom = molecule.getAtom(i);
graph.addVertex(atom);
}
for (int i = 0; i < molecule.getBondCount()... | [
"static",
"public",
"SimpleGraph",
"getMoleculeGraph",
"(",
"IAtomContainer",
"molecule",
")",
"{",
"SimpleGraph",
"graph",
"=",
"new",
"SimpleGraph",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"molecule",
".",
"getAtomCount",
"(",
")"... | Creates a molecule graph for use with jgrapht.
Bond orders are not respected.
@param molecule the specified molecule
@return a graph representing the molecule | [
"Creates",
"a",
"molecule",
"graph",
"for",
"use",
"with",
"jgrapht",
".",
"Bond",
"orders",
"are",
"not",
"respected",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/graph/MoleculeGraphs.java#L55-L72 |
114,739 | cdk/cdk | descriptor/qsarprotein/src/main/java/org/openscience/cdk/qsar/descriptors/protein/TaeAminoAcidDescriptor.java | TaeAminoAcidDescriptor.calculate | @Override
public DescriptorValue calculate(IAtomContainer container) {
if (taeParams == null) return getDummyDescriptorValue(new CDKException("TAE parameters were not initialized"));
if (!(container instanceof IBioPolymer))
return getDummyDescriptorValue(new CDKException("The molecule sh... | java | @Override
public DescriptorValue calculate(IAtomContainer container) {
if (taeParams == null) return getDummyDescriptorValue(new CDKException("TAE parameters were not initialized"));
if (!(container instanceof IBioPolymer))
return getDummyDescriptorValue(new CDKException("The molecule sh... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtomContainer",
"container",
")",
"{",
"if",
"(",
"taeParams",
"==",
"null",
")",
"return",
"getDummyDescriptorValue",
"(",
"new",
"CDKException",
"(",
"\"TAE parameters were not initialized\"",
")",
")... | Calculates the 147 TAE descriptors for amino acids.
@param container Parameter is the atom container which should implement {@link IBioPolymer}.
@return A DoubleArrayResult value representing the 147 TAE descriptors | [
"Calculates",
"the",
"147",
"TAE",
"descriptors",
"for",
"amino",
"acids",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarprotein/src/main/java/org/openscience/cdk/qsar/descriptors/protein/TaeAminoAcidDescriptor.java#L279-L321 |
114,740 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java | MacroCycleLayout.getAttachedInOrder | private List<Integer> getAttachedInOrder(IRing macrocycle, IAtomContainer shared) {
List<Integer> ringAttach = new ArrayList<>();
Set<IAtom> visit = new HashSet<>();
IAtom atom = shared.getAtom(0);
while (atom != null) {
visit.add(atom);
ringAttach.add(macrocycle.... | java | private List<Integer> getAttachedInOrder(IRing macrocycle, IAtomContainer shared) {
List<Integer> ringAttach = new ArrayList<>();
Set<IAtom> visit = new HashSet<>();
IAtom atom = shared.getAtom(0);
while (atom != null) {
visit.add(atom);
ringAttach.add(macrocycle.... | [
"private",
"List",
"<",
"Integer",
">",
"getAttachedInOrder",
"(",
"IRing",
"macrocycle",
",",
"IAtomContainer",
"shared",
")",
"{",
"List",
"<",
"Integer",
">",
"ringAttach",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"Set",
"<",
"IAtom",
">",
"visit",... | Get the shared indices of a macrocycle and atoms shared with another ring.
@param macrocycle macrocycle ring
@param shared shared atoms
@return the integers | [
"Get",
"the",
"shared",
"indices",
"of",
"a",
"macrocycle",
"and",
"atoms",
"shared",
"with",
"another",
"ring",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java#L240-L257 |
114,741 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java | MacroCycleLayout.selectCoords | private int selectCoords(Collection<Point2d[]> ps, Point2d[] coords, IRing macrocycle, IRingSet ringset) {
assert ps.size() != 0;
final int[] winding = new int[coords.length];
MacroScore best = null;
for (Point2d[] p : ps) {
final int wind = winding(p, winding);
... | java | private int selectCoords(Collection<Point2d[]> ps, Point2d[] coords, IRing macrocycle, IRingSet ringset) {
assert ps.size() != 0;
final int[] winding = new int[coords.length];
MacroScore best = null;
for (Point2d[] p : ps) {
final int wind = winding(p, winding);
... | [
"private",
"int",
"selectCoords",
"(",
"Collection",
"<",
"Point2d",
"[",
"]",
">",
"ps",
",",
"Point2d",
"[",
"]",
"coords",
",",
"IRing",
"macrocycle",
",",
"IRingSet",
"ringset",
")",
"{",
"assert",
"ps",
".",
"size",
"(",
")",
"!=",
"0",
";",
"fi... | Select the best coordinates
@param ps template points
@param coords best coordinates (updated by this method)
@param macrocycle the macrocycle
@param ringset rest of the ring system
@return offset into the coordinates | [
"Select",
"the",
"best",
"coordinates"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java#L268-L284 |
114,742 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java | MacroCycleLayout.winding | private static int winding(final Point2d[] coords, final int[] winding) {
int cw = 0, ccw = 0;
Point2d prev = coords[coords.length - 1];
for (int i = 0; i < coords.length; i++) {
Point2d curr = coords[i];
Point2d next = coords[(i + 1) % coords.length];
windin... | java | private static int winding(final Point2d[] coords, final int[] winding) {
int cw = 0, ccw = 0;
Point2d prev = coords[coords.length - 1];
for (int i = 0; i < coords.length; i++) {
Point2d curr = coords[i];
Point2d next = coords[(i + 1) % coords.length];
windin... | [
"private",
"static",
"int",
"winding",
"(",
"final",
"Point2d",
"[",
"]",
"coords",
",",
"final",
"int",
"[",
"]",
"winding",
")",
"{",
"int",
"cw",
"=",
"0",
",",
"ccw",
"=",
"0",
";",
"Point2d",
"prev",
"=",
"coords",
"[",
"coords",
".",
"length"... | Determine the overall winding and the vertex of a ring template.
@param coords ring coordinates
@param winding winding result for each atom (cw/ccw)
@return global winding | [
"Determine",
"the",
"overall",
"winding",
"and",
"the",
"vertex",
"of",
"a",
"ring",
"template",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java#L293-L316 |
114,743 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java | MacroCycleLayout.winding | private static int winding(Point2d a, Point2d b, Point2d c) {
return (int) Math.signum((b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x));
} | java | private static int winding(Point2d a, Point2d b, Point2d c) {
return (int) Math.signum((b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x));
} | [
"private",
"static",
"int",
"winding",
"(",
"Point2d",
"a",
",",
"Point2d",
"b",
",",
"Point2d",
"c",
")",
"{",
"return",
"(",
"int",
")",
"Math",
".",
"signum",
"(",
"(",
"b",
".",
"x",
"-",
"a",
".",
"x",
")",
"*",
"(",
"c",
".",
"y",
"-",
... | Determine the winding of three points using the determinant.
@param a first point
@param b second point
@param c third point
@return < 0 = clockwise, 0 = linear, > 0 anti-clockwise | [
"Determine",
"the",
"winding",
"of",
"three",
"points",
"using",
"the",
"determinant",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java#L326-L328 |
114,744 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java | MacroCycleLayout.roundUpIfNeeded | private static IAtomContainer roundUpIfNeeded(IAtomContainer anon) {
IChemObjectBuilder bldr = anon.getBuilder();
if ((anon.getAtomCount() & 0x1) != 0) {
IBond bond = anon.removeBond(anon.getBondCount() - 1);
IAtom dummy = bldr.newInstance(IAtom.class, "C");
anon.addA... | java | private static IAtomContainer roundUpIfNeeded(IAtomContainer anon) {
IChemObjectBuilder bldr = anon.getBuilder();
if ((anon.getAtomCount() & 0x1) != 0) {
IBond bond = anon.removeBond(anon.getBondCount() - 1);
IAtom dummy = bldr.newInstance(IAtom.class, "C");
anon.addA... | [
"private",
"static",
"IAtomContainer",
"roundUpIfNeeded",
"(",
"IAtomContainer",
"anon",
")",
"{",
"IChemObjectBuilder",
"bldr",
"=",
"anon",
".",
"getBuilder",
"(",
")",
";",
"if",
"(",
"(",
"anon",
".",
"getAtomCount",
"(",
")",
"&",
"0x1",
")",
"!=",
"0... | Make a ring one atom bigger if it's of an odd size.
@param anon ring
@return 'anon' returned of chaining convenience | [
"Make",
"a",
"ring",
"one",
"atom",
"bigger",
"if",
"it",
"s",
"of",
"an",
"odd",
"size",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java#L368-L378 |
114,745 | cdk/cdk | tool/structgen/src/main/java/org/openscience/cdk/atomtype/StructGenMatcher.java | StructGenMatcher.findMatchingAtomType | @Override
public IAtomType findMatchingAtomType(IAtomContainer atomContainer, IAtom atom) throws CDKException {
if (factory == null) {
try {
factory = AtomTypeFactory.getInstance("org/openscience/cdk/config/data/structgen_atomtypes.xml",
atom.getBuilder())... | java | @Override
public IAtomType findMatchingAtomType(IAtomContainer atomContainer, IAtom atom) throws CDKException {
if (factory == null) {
try {
factory = AtomTypeFactory.getInstance("org/openscience/cdk/config/data/structgen_atomtypes.xml",
atom.getBuilder())... | [
"@",
"Override",
"public",
"IAtomType",
"findMatchingAtomType",
"(",
"IAtomContainer",
"atomContainer",
",",
"IAtom",
"atom",
")",
"throws",
"CDKException",
"{",
"if",
"(",
"factory",
"==",
"null",
")",
"{",
"try",
"{",
"factory",
"=",
"AtomTypeFactory",
".",
... | Finds the AtomType matching the Atom's element symbol, formal charge and
hybridization state.
@param atomContainer AtomContainer
@param atom the target atom
@exception CDKException Exception thrown if something goes wrong
@return the matching AtomType | [
"Finds",
"the",
"AtomType",
"matching",
"the",
"Atom",
"s",
"element",
"symbol",
"formal",
"charge",
"and",
"hybridization",
"state",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/structgen/src/main/java/org/openscience/cdk/atomtype/StructGenMatcher.java#L74-L103 |
114,746 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/qsar/descriptors/bond/IPBondLearningDescriptor.java | IPBondLearningDescriptor.calculate | @Override
public DescriptorValue calculate(IBond bond, IAtomContainer atomContainer) {
double value = 0;
// FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method
String originalAtomtypeName1 = bond.getBegin().getAtomTypeName();
Integer... | java | @Override
public DescriptorValue calculate(IBond bond, IAtomContainer atomContainer) {
double value = 0;
// FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method
String originalAtomtypeName1 = bond.getBegin().getAtomTypeName();
Integer... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IBond",
"bond",
",",
"IAtomContainer",
"atomContainer",
")",
"{",
"double",
"value",
"=",
"0",
";",
"// FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method",
"Str... | This method calculates the ionization potential of a bond.
@param atomContainer Parameter is the IAtomContainer.
@return The ionization potential | [
"This",
"method",
"calculates",
"the",
"ionization",
"potential",
"of",
"a",
"bond",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/qsar/descriptors/bond/IPBondLearningDescriptor.java#L114-L163 |
114,747 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/BondRefinable.java | BondRefinable.getInitialPartition | public Partition getInitialPartition() {
int bondCount = atomContainer.getBondCount();
Map<String, SortedSet<Integer>> cellMap = new HashMap<String, SortedSet<Integer>>();
// make mini-'descriptors' for bonds like "C=O" or "C#N" etc
for (int bondIndex = 0; bondIndex < bondCount; bondInd... | java | public Partition getInitialPartition() {
int bondCount = atomContainer.getBondCount();
Map<String, SortedSet<Integer>> cellMap = new HashMap<String, SortedSet<Integer>>();
// make mini-'descriptors' for bonds like "C=O" or "C#N" etc
for (int bondIndex = 0; bondIndex < bondCount; bondInd... | [
"public",
"Partition",
"getInitialPartition",
"(",
")",
"{",
"int",
"bondCount",
"=",
"atomContainer",
".",
"getBondCount",
"(",
")",
";",
"Map",
"<",
"String",
",",
"SortedSet",
"<",
"Integer",
">",
">",
"cellMap",
"=",
"new",
"HashMap",
"<",
"String",
",... | Get the bond partition, based on the element types of the atoms at either end
of the bond, and the bond order.
@return a partition of the bonds based on the element types and bond order | [
"Get",
"the",
"bond",
"partition",
"based",
"on",
"the",
"element",
"types",
"of",
"the",
"atoms",
"at",
"either",
"end",
"of",
"the",
"bond",
"and",
"the",
"bond",
"order",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/BondRefinable.java#L108-L154 |
114,748 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/tools/AtomTypeTools.java | AtomTypeTools.ringSystemClassifier | private int ringSystemClassifier(IRing ring, String smile) throws CDKException {
/* System.out.println("IN AtomTypeTools Smile:"+smile); */
logger.debug("Comparing ring systems: SMILES=", smile);
if (PYRROLE_SMI == null) {
final SmilesParser smipar = new SmilesParser(ring.ge... | java | private int ringSystemClassifier(IRing ring, String smile) throws CDKException {
/* System.out.println("IN AtomTypeTools Smile:"+smile); */
logger.debug("Comparing ring systems: SMILES=", smile);
if (PYRROLE_SMI == null) {
final SmilesParser smipar = new SmilesParser(ring.ge... | [
"private",
"int",
"ringSystemClassifier",
"(",
"IRing",
"ring",
",",
"String",
"smile",
")",
"throws",
"CDKException",
"{",
"/* System.out.println(\"IN AtomTypeTools Smile:\"+smile); */",
"logger",
".",
"debug",
"(",
"\"Comparing ring systems: SMILES=\"",
",",
"smile",
")",... | Identifies ringSystem and returns a number which corresponds to
CDKChemicalRingConstant
@param ring Ring class with the ring system
@param smile smile of the ring system
@return chemicalRingConstant | [
"Identifies",
"ringSystem",
"and",
"returns",
"a",
"number",
"which",
"corresponds",
"to",
"CDKChemicalRingConstant"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/tools/AtomTypeTools.java#L208-L248 |
114,749 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.setAtoms | @Override
public void setAtoms(IAtom[] atoms) {
this.atoms = atoms;
for (IAtom atom : atoms) {
atom.addListener(this);
}
this.atomCount = atoms.length;
notifyChanged();
} | java | @Override
public void setAtoms(IAtom[] atoms) {
this.atoms = atoms;
for (IAtom atom : atoms) {
atom.addListener(this);
}
this.atomCount = atoms.length;
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"setAtoms",
"(",
"IAtom",
"[",
"]",
"atoms",
")",
"{",
"this",
".",
"atoms",
"=",
"atoms",
";",
"for",
"(",
"IAtom",
"atom",
":",
"atoms",
")",
"{",
"atom",
".",
"addListener",
"(",
"this",
")",
";",
"}",
"this",
... | Sets the array of atoms of this AtomContainer.
@param atoms The array of atoms to be assigned to this AtomContainer
@see #getAtom | [
"Sets",
"the",
"array",
"of",
"atoms",
"of",
"this",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L221-L229 |
114,750 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.setBonds | @Override
public void setBonds(IBond[] bonds) {
this.bonds = bonds;
for (IBond bond : bonds) {
bond.addListener(this);
}
this.bondCount = bonds.length;
} | java | @Override
public void setBonds(IBond[] bonds) {
this.bonds = bonds;
for (IBond bond : bonds) {
bond.addListener(this);
}
this.bondCount = bonds.length;
} | [
"@",
"Override",
"public",
"void",
"setBonds",
"(",
"IBond",
"[",
"]",
"bonds",
")",
"{",
"this",
".",
"bonds",
"=",
"bonds",
";",
"for",
"(",
"IBond",
"bond",
":",
"bonds",
")",
"{",
"bond",
".",
"addListener",
"(",
"this",
")",
";",
"}",
"this",
... | Sets the array of bonds of this AtomContainer.
@param bonds The array of bonds to be assigned to
this AtomContainer
@see #getBond | [
"Sets",
"the",
"array",
"of",
"bonds",
"of",
"this",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L238-L245 |
114,751 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.getConnectedAtomsList | @Override
public List<IAtom> getConnectedAtomsList(IAtom atom) {
List<IAtom> atomsList = new ArrayList<IAtom>();
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom)) atomsList.add(bonds[i].getOther(atom));
}
return atomsList;
} | java | @Override
public List<IAtom> getConnectedAtomsList(IAtom atom) {
List<IAtom> atomsList = new ArrayList<IAtom>();
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom)) atomsList.add(bonds[i].getOther(atom));
}
return atomsList;
} | [
"@",
"Override",
"public",
"List",
"<",
"IAtom",
">",
"getConnectedAtomsList",
"(",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"atomsList",
"=",
"new",
"ArrayList",
"<",
"IAtom",
">",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
... | Returns an ArrayList of all atoms connected to the given atom.
@param atom The atom the bond partners are searched of.
@return The ArrayList with the connected atoms | [
"Returns",
"an",
"ArrayList",
"of",
"all",
"atoms",
"connected",
"to",
"the",
"given",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L762-L769 |
114,752 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.getConnectedBondsList | @Override
public List<IBond> getConnectedBondsList(IAtom atom) {
List<IBond> bondsList = new ArrayList<IBond>();
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom)) bondsList.add(bonds[i]);
}
return bondsList;
} | java | @Override
public List<IBond> getConnectedBondsList(IAtom atom) {
List<IBond> bondsList = new ArrayList<IBond>();
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom)) bondsList.add(bonds[i]);
}
return bondsList;
} | [
"@",
"Override",
"public",
"List",
"<",
"IBond",
">",
"getConnectedBondsList",
"(",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IBond",
">",
"bondsList",
"=",
"new",
"ArrayList",
"<",
"IBond",
">",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
... | Returns an ArrayList of all Bonds connected to the given atom.
@param atom The atom the connected bonds are searched of
@return The ArrayList with connected atoms | [
"Returns",
"an",
"ArrayList",
"of",
"all",
"Bonds",
"connected",
"to",
"the",
"given",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L777-L784 |
114,753 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.getConnectedSingleElectronsList | @Override
public List<ISingleElectron> getConnectedSingleElectronsList(IAtom atom) {
List<ISingleElectron> lps = new ArrayList<ISingleElectron>();
for (int i = 0; i < singleElectronCount; i++) {
if (singleElectrons[i].contains(atom)) lps.add(singleElectrons[i]);
}
return ... | java | @Override
public List<ISingleElectron> getConnectedSingleElectronsList(IAtom atom) {
List<ISingleElectron> lps = new ArrayList<ISingleElectron>();
for (int i = 0; i < singleElectronCount; i++) {
if (singleElectrons[i].contains(atom)) lps.add(singleElectrons[i]);
}
return ... | [
"@",
"Override",
"public",
"List",
"<",
"ISingleElectron",
">",
"getConnectedSingleElectronsList",
"(",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"ISingleElectron",
">",
"lps",
"=",
"new",
"ArrayList",
"<",
"ISingleElectron",
">",
"(",
")",
";",
"for",
"(",
"i... | Returns an array of all SingleElectron connected to the given atom.
@param atom The atom on which the single electron is located
@return The array of SingleElectron of this AtomContainer | [
"Returns",
"an",
"array",
"of",
"all",
"SingleElectron",
"connected",
"to",
"the",
"given",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L810-L817 |
114,754 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.getConnectedAtomsCount | @Override
public int getConnectedAtomsCount(IAtom atom) {
int count = 0;
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom)) ++count;
}
return count;
} | java | @Override
public int getConnectedAtomsCount(IAtom atom) {
int count = 0;
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom)) ++count;
}
return count;
} | [
"@",
"Override",
"public",
"int",
"getConnectedAtomsCount",
"(",
"IAtom",
"atom",
")",
"{",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"bondCount",
";",
"i",
"++",
")",
"{",
"if",
"(",
"bonds",
"[",
"i",
"]",
... | Returns the number of atoms connected to the given atom.
@param atom The atom the number of bond partners are searched of.
@return The the size of connected atoms | [
"Returns",
"the",
"number",
"of",
"atoms",
"connected",
"to",
"the",
"given",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L846-L853 |
114,755 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.getConnectedLonePairsCount | @Override
public int getConnectedLonePairsCount(IAtom atom) {
int count = 0;
for (int i = 0; i < lonePairCount; i++) {
if (lonePairs[i].contains(atom)) ++count;
}
return count;
} | java | @Override
public int getConnectedLonePairsCount(IAtom atom) {
int count = 0;
for (int i = 0; i < lonePairCount; i++) {
if (lonePairs[i].contains(atom)) ++count;
}
return count;
} | [
"@",
"Override",
"public",
"int",
"getConnectedLonePairsCount",
"(",
"IAtom",
"atom",
")",
"{",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"lonePairCount",
";",
"i",
"++",
")",
"{",
"if",
"(",
"lonePairs",
"[",
... | Returns the number of LonePairs for a given Atom.
@param atom The atom
@return The number of LonePairs for this atom | [
"Returns",
"the",
"number",
"of",
"LonePairs",
"for",
"a",
"given",
"Atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L883-L890 |
114,756 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.getConnectedSingleElectronsCount | @Override
public int getConnectedSingleElectronsCount(IAtom atom) {
int count = 0;
for (int i = 0; i < singleElectronCount; i++) {
if (singleElectrons[i].contains(atom)) ++count;
}
return count;
} | java | @Override
public int getConnectedSingleElectronsCount(IAtom atom) {
int count = 0;
for (int i = 0; i < singleElectronCount; i++) {
if (singleElectrons[i].contains(atom)) ++count;
}
return count;
} | [
"@",
"Override",
"public",
"int",
"getConnectedSingleElectronsCount",
"(",
"IAtom",
"atom",
")",
"{",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"singleElectronCount",
";",
"i",
"++",
")",
"{",
"if",
"(",
"singleEle... | Returns the sum of the SingleElectron for a given Atom.
@param atom The atom on which the single electron is located
@return The array of SingleElectron of this AtomContainer | [
"Returns",
"the",
"sum",
"of",
"the",
"SingleElectron",
"for",
"a",
"given",
"Atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L898-L905 |
114,757 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.getBondOrderSum | @Override
public double getBondOrderSum(IAtom atom) {
double count = 0;
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom)) {
if (bonds[i].getOrder() == IBond.Order.SINGLE) {
count += 1;
} else if (bonds[i].getOrder() == ... | java | @Override
public double getBondOrderSum(IAtom atom) {
double count = 0;
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom)) {
if (bonds[i].getOrder() == IBond.Order.SINGLE) {
count += 1;
} else if (bonds[i].getOrder() == ... | [
"@",
"Override",
"public",
"double",
"getBondOrderSum",
"(",
"IAtom",
"atom",
")",
"{",
"double",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"bondCount",
";",
"i",
"++",
")",
"{",
"if",
"(",
"bonds",
"[",
"i",
"]",
... | Returns the sum of the bond orders for a given Atom.
@param atom The atom
@return The number of bond orders for this atom
@deprecated Replaced by <code>AtomContainerManipulator#getBondOrderSum(IAtomContainer, IAtom)</code> | [
"Returns",
"the",
"sum",
"of",
"the",
"bond",
"orders",
"for",
"a",
"given",
"Atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L915-L932 |
114,758 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.getMaximumBondOrder | @Override
public Order getMaximumBondOrder(IAtom atom) {
IBond.Order max = IBond.Order.SINGLE;
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom) && bonds[i].getOrder().ordinal() > max.ordinal()) {
max = bonds[i].getOrder();
}
}
... | java | @Override
public Order getMaximumBondOrder(IAtom atom) {
IBond.Order max = IBond.Order.SINGLE;
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom) && bonds[i].getOrder().ordinal() > max.ordinal()) {
max = bonds[i].getOrder();
}
}
... | [
"@",
"Override",
"public",
"Order",
"getMaximumBondOrder",
"(",
"IAtom",
"atom",
")",
"{",
"IBond",
".",
"Order",
"max",
"=",
"IBond",
".",
"Order",
".",
"SINGLE",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"bondCount",
";",
"i",
"++",
"... | Returns the maximum bond order that this atom currently has in the context
of this AtomContainer.
@param atom The atom
@return The maximum bond order that this atom currently has | [
"Returns",
"the",
"maximum",
"bond",
"order",
"that",
"this",
"atom",
"currently",
"has",
"in",
"the",
"context",
"of",
"this",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L941-L950 |
114,759 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.getMinimumBondOrder | @Override
public Order getMinimumBondOrder(IAtom atom) {
IBond.Order min = IBond.Order.QUADRUPLE;
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom) && bonds[i].getOrder().ordinal() < min.ordinal()) {
min = bonds[i].getOrder();
}
}
... | java | @Override
public Order getMinimumBondOrder(IAtom atom) {
IBond.Order min = IBond.Order.QUADRUPLE;
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom) && bonds[i].getOrder().ordinal() < min.ordinal()) {
min = bonds[i].getOrder();
}
}
... | [
"@",
"Override",
"public",
"Order",
"getMinimumBondOrder",
"(",
"IAtom",
"atom",
")",
"{",
"IBond",
".",
"Order",
"min",
"=",
"IBond",
".",
"Order",
".",
"QUADRUPLE",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"bondCount",
";",
"i",
"++",
... | Returns the minimum bond order that this atom currently has in the context
of this AtomContainer.
@param atom The atom
@return The minimum bond order that this atom currently has | [
"Returns",
"the",
"minimum",
"bond",
"order",
"that",
"this",
"atom",
"currently",
"has",
"in",
"the",
"context",
"of",
"this",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L959-L968 |
114,760 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.add | @Override
public void add(IAtomContainer atomContainer) {
if (atomContainer instanceof QueryAtomContainer) {
for (int f = 0; f < atomContainer.getAtomCount(); f++) {
if (!contains(atomContainer.getAtom(f))) {
addAtom(atomContainer.getAtom(f));
... | java | @Override
public void add(IAtomContainer atomContainer) {
if (atomContainer instanceof QueryAtomContainer) {
for (int f = 0; f < atomContainer.getAtomCount(); f++) {
if (!contains(atomContainer.getAtom(f))) {
addAtom(atomContainer.getAtom(f));
... | [
"@",
"Override",
"public",
"void",
"add",
"(",
"IAtomContainer",
"atomContainer",
")",
"{",
"if",
"(",
"atomContainer",
"instanceof",
"QueryAtomContainer",
")",
"{",
"for",
"(",
"int",
"f",
"=",
"0",
";",
"f",
"<",
"atomContainer",
".",
"getAtomCount",
"(",
... | Adds all atoms and electronContainers of a given atomcontainer to this
container.
@param atomContainer The atomcontainer to be added | [
"Adds",
"all",
"atoms",
"and",
"electronContainers",
"of",
"a",
"given",
"atomcontainer",
"to",
"this",
"container",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L976-L1003 |
114,761 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.addAtom | @Override
public void addAtom(IAtom atom) {
if (contains(atom)) {
return;
}
if (atomCount + 1 >= atoms.length) {
growAtomArray();
}
atom.addListener(this);
atoms[atomCount] = atom;
atomCount++;
notifyChanged();
} | java | @Override
public void addAtom(IAtom atom) {
if (contains(atom)) {
return;
}
if (atomCount + 1 >= atoms.length) {
growAtomArray();
}
atom.addListener(this);
atoms[atomCount] = atom;
atomCount++;
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"addAtom",
"(",
"IAtom",
"atom",
")",
"{",
"if",
"(",
"contains",
"(",
"atom",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"atomCount",
"+",
"1",
">=",
"atoms",
".",
"length",
")",
"{",
"growAtomArray",
"(",
")"... | Adds an atom to this container.
@param atom The atom to be added to this container | [
"Adds",
"an",
"atom",
"to",
"this",
"container",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1010-L1023 |
114,762 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.addBond | @Override
public void addBond(IBond bond) {
if (bondCount >= bonds.length) growBondArray();
bonds[bondCount] = bond;
++bondCount;
notifyChanged();
} | java | @Override
public void addBond(IBond bond) {
if (bondCount >= bonds.length) growBondArray();
bonds[bondCount] = bond;
++bondCount;
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"addBond",
"(",
"IBond",
"bond",
")",
"{",
"if",
"(",
"bondCount",
">=",
"bonds",
".",
"length",
")",
"growBondArray",
"(",
")",
";",
"bonds",
"[",
"bondCount",
"]",
"=",
"bond",
";",
"++",
"bondCount",
";",
"notifyCh... | Adds a Bond to this AtomContainer.
@param bond The bond to added to this container | [
"Adds",
"a",
"Bond",
"to",
"this",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1030-L1036 |
114,763 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.addLonePair | @Override
public void addLonePair(ILonePair lonePair) {
if (lonePairCount >= lonePairs.length) growLonePairArray();
lonePairs[lonePairCount] = lonePair;
++lonePairCount;
notifyChanged();
} | java | @Override
public void addLonePair(ILonePair lonePair) {
if (lonePairCount >= lonePairs.length) growLonePairArray();
lonePairs[lonePairCount] = lonePair;
++lonePairCount;
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"addLonePair",
"(",
"ILonePair",
"lonePair",
")",
"{",
"if",
"(",
"lonePairCount",
">=",
"lonePairs",
".",
"length",
")",
"growLonePairArray",
"(",
")",
";",
"lonePairs",
"[",
"lonePairCount",
"]",
"=",
"lonePair",
";",
"++... | Adds a lone pair to this AtomContainer.
@param lonePair The LonePair to added to this container | [
"Adds",
"a",
"lone",
"pair",
"to",
"this",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1043-L1049 |
114,764 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.addSingleElectron | @Override
public void addSingleElectron(ISingleElectron singleElectron) {
if (singleElectronCount >= singleElectrons.length) growSingleElectronArray();
singleElectrons[singleElectronCount] = singleElectron;
++singleElectronCount;
notifyChanged();
} | java | @Override
public void addSingleElectron(ISingleElectron singleElectron) {
if (singleElectronCount >= singleElectrons.length) growSingleElectronArray();
singleElectrons[singleElectronCount] = singleElectron;
++singleElectronCount;
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"addSingleElectron",
"(",
"ISingleElectron",
"singleElectron",
")",
"{",
"if",
"(",
"singleElectronCount",
">=",
"singleElectrons",
".",
"length",
")",
"growSingleElectronArray",
"(",
")",
";",
"singleElectrons",
"[",
"singleElectron... | Adds a single electron to this AtomContainer.
@param singleElectron The SingleElectron to added to this container | [
"Adds",
"a",
"single",
"electron",
"to",
"this",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1056-L1062 |
114,765 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.removeAtom | @Override
public void removeAtom(IAtom atom) {
int position = getAtomNumber(atom);
if (position != -1) {
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom)) {
removeBond(i);
--i;
}
}
... | java | @Override
public void removeAtom(IAtom atom) {
int position = getAtomNumber(atom);
if (position != -1) {
for (int i = 0; i < bondCount; i++) {
if (bonds[i].contains(atom)) {
removeBond(i);
--i;
}
}
... | [
"@",
"Override",
"public",
"void",
"removeAtom",
"(",
"IAtom",
"atom",
")",
"{",
"int",
"position",
"=",
"getAtomNumber",
"(",
"atom",
")",
";",
"if",
"(",
"position",
"!=",
"-",
"1",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"bo... | Removes the given atom and all connected electronContainers from the
AtomContainer.
@param atom The atom to be removed | [
"Removes",
"the",
"given",
"atom",
"and",
"all",
"connected",
"electronContainers",
"from",
"the",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1282-L1307 |
114,766 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.addBond | @Override
public void addBond(int atom1, int atom2, IBond.Order order, IBond.Stereo stereo) {
IBond bond = getBuilder().newInstance(IBond.class, getAtom(atom1), getAtom(atom2), order, stereo);
if (contains(bond)) {
return;
}
if (bondCount >= bonds.length) {
... | java | @Override
public void addBond(int atom1, int atom2, IBond.Order order, IBond.Stereo stereo) {
IBond bond = getBuilder().newInstance(IBond.class, getAtom(atom1), getAtom(atom2), order, stereo);
if (contains(bond)) {
return;
}
if (bondCount >= bonds.length) {
... | [
"@",
"Override",
"public",
"void",
"addBond",
"(",
"int",
"atom1",
",",
"int",
"atom2",
",",
"IBond",
".",
"Order",
"order",
",",
"IBond",
".",
"Stereo",
"stereo",
")",
"{",
"IBond",
"bond",
"=",
"getBuilder",
"(",
")",
".",
"newInstance",
"(",
"IBond"... | Adds a bond to this container.
@param atom1 Id of the first atom of the Bond in [0,..]
@param atom2 Id of the second atom of the Bond in [0,..]
@param order Bondorder
@param stereo Stereochemical orientation | [
"Adds",
"a",
"bond",
"to",
"this",
"container",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1371-L1386 |
114,767 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.contains | @Override
public boolean contains(IElectronContainer electronContainer) {
if (electronContainer instanceof IBond) return contains((IBond) electronContainer);
if (electronContainer instanceof ILonePair) return contains((ILonePair) electronContainer);
if (electronContainer instanceof ISingleEl... | java | @Override
public boolean contains(IElectronContainer electronContainer) {
if (electronContainer instanceof IBond) return contains((IBond) electronContainer);
if (electronContainer instanceof ILonePair) return contains((ILonePair) electronContainer);
if (electronContainer instanceof ISingleEl... | [
"@",
"Override",
"public",
"boolean",
"contains",
"(",
"IElectronContainer",
"electronContainer",
")",
"{",
"if",
"(",
"electronContainer",
"instanceof",
"IBond",
")",
"return",
"contains",
"(",
"(",
"IBond",
")",
"electronContainer",
")",
";",
"if",
"(",
"elect... | True, if the AtomContainer contains the given ElectronContainer object.
@param electronContainer ElectronContainer that is searched for
@return true if the AtomContainer contains the given bond object | [
"True",
"if",
"the",
"AtomContainer",
"contains",
"the",
"given",
"ElectronContainer",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1501-L1507 |
114,768 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.growAtomArray | private void growAtomArray() {
growArraySize = (atoms.length < growArraySize) ? growArraySize : atoms.length;
IAtom[] newatoms = new IAtom[atoms.length + growArraySize];
System.arraycopy(atoms, 0, newatoms, 0, atoms.length);
atoms = newatoms;
} | java | private void growAtomArray() {
growArraySize = (atoms.length < growArraySize) ? growArraySize : atoms.length;
IAtom[] newatoms = new IAtom[atoms.length + growArraySize];
System.arraycopy(atoms, 0, newatoms, 0, atoms.length);
atoms = newatoms;
} | [
"private",
"void",
"growAtomArray",
"(",
")",
"{",
"growArraySize",
"=",
"(",
"atoms",
".",
"length",
"<",
"growArraySize",
")",
"?",
"growArraySize",
":",
"atoms",
".",
"length",
";",
"IAtom",
"[",
"]",
"newatoms",
"=",
"new",
"IAtom",
"[",
"atoms",
"."... | Grows the atom array by a given size.
@see #growArraySize | [
"Grows",
"the",
"atom",
"array",
"by",
"a",
"given",
"size",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1566-L1571 |
114,769 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.growBondArray | private void growBondArray() {
growArraySize = (bonds.length < growArraySize) ? growArraySize : bonds.length;
IBond[] newBonds = new IBond[bonds.length + growArraySize];
System.arraycopy(bonds, 0, newBonds, 0, bonds.length);
bonds = newBonds;
} | java | private void growBondArray() {
growArraySize = (bonds.length < growArraySize) ? growArraySize : bonds.length;
IBond[] newBonds = new IBond[bonds.length + growArraySize];
System.arraycopy(bonds, 0, newBonds, 0, bonds.length);
bonds = newBonds;
} | [
"private",
"void",
"growBondArray",
"(",
")",
"{",
"growArraySize",
"=",
"(",
"bonds",
".",
"length",
"<",
"growArraySize",
")",
"?",
"growArraySize",
":",
"bonds",
".",
"length",
";",
"IBond",
"[",
"]",
"newBonds",
"=",
"new",
"IBond",
"[",
"bonds",
"."... | Grows the bond array by a given size.
@see #growArraySize | [
"Grows",
"the",
"bond",
"array",
"by",
"a",
"given",
"size",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1578-L1583 |
114,770 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.growLonePairArray | private void growLonePairArray() {
growArraySize = (lonePairs.length < growArraySize) ? growArraySize : lonePairs.length;
ILonePair[] newLonePairs = new ILonePair[lonePairs.length + growArraySize];
System.arraycopy(lonePairs, 0, newLonePairs, 0, lonePairs.length);
lonePairs = newLonePair... | java | private void growLonePairArray() {
growArraySize = (lonePairs.length < growArraySize) ? growArraySize : lonePairs.length;
ILonePair[] newLonePairs = new ILonePair[lonePairs.length + growArraySize];
System.arraycopy(lonePairs, 0, newLonePairs, 0, lonePairs.length);
lonePairs = newLonePair... | [
"private",
"void",
"growLonePairArray",
"(",
")",
"{",
"growArraySize",
"=",
"(",
"lonePairs",
".",
"length",
"<",
"growArraySize",
")",
"?",
"growArraySize",
":",
"lonePairs",
".",
"length",
";",
"ILonePair",
"[",
"]",
"newLonePairs",
"=",
"new",
"ILonePair",... | Grows the lone pair array by a given size.
@see #growArraySize | [
"Grows",
"the",
"lone",
"pair",
"array",
"by",
"a",
"given",
"size",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1590-L1595 |
114,771 | cdk/cdk | base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java | QueryAtomContainer.growSingleElectronArray | private void growSingleElectronArray() {
growArraySize = (singleElectrons.length < growArraySize) ? growArraySize : singleElectrons.length;
ISingleElectron[] newSingleElectrons = new ISingleElectron[singleElectrons.length + growArraySize];
System.arraycopy(singleElectrons, 0, newSingleElectrons,... | java | private void growSingleElectronArray() {
growArraySize = (singleElectrons.length < growArraySize) ? growArraySize : singleElectrons.length;
ISingleElectron[] newSingleElectrons = new ISingleElectron[singleElectrons.length + growArraySize];
System.arraycopy(singleElectrons, 0, newSingleElectrons,... | [
"private",
"void",
"growSingleElectronArray",
"(",
")",
"{",
"growArraySize",
"=",
"(",
"singleElectrons",
".",
"length",
"<",
"growArraySize",
")",
"?",
"growArraySize",
":",
"singleElectrons",
".",
"length",
";",
"ISingleElectron",
"[",
"]",
"newSingleElectrons",
... | Grows the single electron array by a given size.
@see #growArraySize | [
"Grows",
"the",
"single",
"electron",
"array",
"by",
"a",
"given",
"size",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1602-L1607 |
114,772 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/matrix/AdjacencyMatrix.java | AdjacencyMatrix.getMatrix | public static int[][] getMatrix(IAtomContainer container) {
IBond bond;
int indexAtom1;
int indexAtom2;
int[][] conMat = new int[container.getAtomCount()][container.getAtomCount()];
for (int f = 0; f < container.getBondCount(); f++) {
bond = container.getBond(f);
... | java | public static int[][] getMatrix(IAtomContainer container) {
IBond bond;
int indexAtom1;
int indexAtom2;
int[][] conMat = new int[container.getAtomCount()][container.getAtomCount()];
for (int f = 0; f < container.getBondCount(); f++) {
bond = container.getBond(f);
... | [
"public",
"static",
"int",
"[",
"]",
"[",
"]",
"getMatrix",
"(",
"IAtomContainer",
"container",
")",
"{",
"IBond",
"bond",
";",
"int",
"indexAtom1",
";",
"int",
"indexAtom2",
";",
"int",
"[",
"]",
"[",
"]",
"conMat",
"=",
"new",
"int",
"[",
"container"... | Returns the adjacency matrix for the given AtomContainer.
@param container The AtomContainer for which the matrix is calculated
@return An adjacency matrix representing this AtomContainer | [
"Returns",
"the",
"adjacency",
"matrix",
"for",
"the",
"given",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/matrix/AdjacencyMatrix.java#L47-L60 |
114,773 | cdk/cdk | descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/CovalentRadiusDescriptor.java | CovalentRadiusDescriptor.calculate | @Override
public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
if (factory == null)
try {
factory = AtomTypeFactory.getInstance("org/openscience/cdk/config/data/jmol_atomtypes.txt",
container.getBuilder());
} catch (Exceptio... | java | @Override
public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
if (factory == null)
try {
factory = AtomTypeFactory.getInstance("org/openscience/cdk/config/data/jmol_atomtypes.txt",
container.getBuilder());
} catch (Exceptio... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtom",
"atom",
",",
"IAtomContainer",
"container",
")",
"{",
"if",
"(",
"factory",
"==",
"null",
")",
"try",
"{",
"factory",
"=",
"AtomTypeFactory",
".",
"getInstance",
"(",
"\"org/openscience/cdk... | This method calculates the Covalent radius of an atom.
@param atom The IAtom for which the DescriptorValue is requested
@param container The {@link IAtomContainer} for which the descriptor is to be calculated
@return The Covalent radius of the atom | [
"This",
"method",
"calculates",
"the",
"Covalent",
"radius",
"of",
"an",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/CovalentRadiusDescriptor.java#L123-L146 |
114,774 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ChemModel.java | ChemModel.setMoleculeSet | @Override
public void setMoleculeSet(IAtomContainerSet setOfMolecules) {
if (this.setOfMolecules != null) this.setOfMolecules.removeListener(this);
this.setOfMolecules = setOfMolecules;
if (this.setOfMolecules != null) this.setOfMolecules.addListener(this);
notifyChanged();
} | java | @Override
public void setMoleculeSet(IAtomContainerSet setOfMolecules) {
if (this.setOfMolecules != null) this.setOfMolecules.removeListener(this);
this.setOfMolecules = setOfMolecules;
if (this.setOfMolecules != null) this.setOfMolecules.addListener(this);
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"setMoleculeSet",
"(",
"IAtomContainerSet",
"setOfMolecules",
")",
"{",
"if",
"(",
"this",
".",
"setOfMolecules",
"!=",
"null",
")",
"this",
".",
"setOfMolecules",
".",
"removeListener",
"(",
"this",
")",
";",
"this",
".",
... | Sets the MoleculeSet of this ChemModel.
@param setOfMolecules the content of this model
@see #getMoleculeSet | [
"Sets",
"the",
"MoleculeSet",
"of",
"this",
"ChemModel",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ChemModel.java#L96-L102 |
114,775 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ChemModel.java | ChemModel.setRingSet | @Override
public void setRingSet(IRingSet ringSet) {
if (this.ringSet != null) this.ringSet.removeListener(this);
this.ringSet = ringSet;
if (this.ringSet != null) this.ringSet.addListener(this);
notifyChanged();
} | java | @Override
public void setRingSet(IRingSet ringSet) {
if (this.ringSet != null) this.ringSet.removeListener(this);
this.ringSet = ringSet;
if (this.ringSet != null) this.ringSet.addListener(this);
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"setRingSet",
"(",
"IRingSet",
"ringSet",
")",
"{",
"if",
"(",
"this",
".",
"ringSet",
"!=",
"null",
")",
"this",
".",
"ringSet",
".",
"removeListener",
"(",
"this",
")",
";",
"this",
".",
"ringSet",
"=",
"ringSet",
"... | Sets the RingSet of this ChemModel.
@param ringSet the content of this model
@see #getRingSet | [
"Sets",
"the",
"RingSet",
"of",
"this",
"ChemModel",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ChemModel.java#L123-L129 |
114,776 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ChemModel.java | ChemModel.setCrystal | @Override
public void setCrystal(ICrystal crystal) {
if (this.crystal != null) this.crystal.removeListener(this);
this.crystal = crystal;
if (this.crystal != null) this.crystal.addListener(this);
notifyChanged();
} | java | @Override
public void setCrystal(ICrystal crystal) {
if (this.crystal != null) this.crystal.removeListener(this);
this.crystal = crystal;
if (this.crystal != null) this.crystal.addListener(this);
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"setCrystal",
"(",
"ICrystal",
"crystal",
")",
"{",
"if",
"(",
"this",
".",
"crystal",
"!=",
"null",
")",
"this",
".",
"crystal",
".",
"removeListener",
"(",
"this",
")",
";",
"this",
".",
"crystal",
"=",
"crystal",
"... | Sets the Crystal contained in this ChemModel.
@param crystal the Crystal to store in this model
@see #getCrystal | [
"Sets",
"the",
"Crystal",
"contained",
"in",
"this",
"ChemModel",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ChemModel.java#L150-L156 |
114,777 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ChemModel.java | ChemModel.setReactionSet | @Override
public void setReactionSet(IReactionSet sor) {
if (this.setOfReactions != null) this.setOfReactions.removeListener(this);
this.setOfReactions = sor;
if (this.setOfReactions != null) this.setOfReactions.addListener(this);
notifyChanged();
} | java | @Override
public void setReactionSet(IReactionSet sor) {
if (this.setOfReactions != null) this.setOfReactions.removeListener(this);
this.setOfReactions = sor;
if (this.setOfReactions != null) this.setOfReactions.addListener(this);
notifyChanged();
} | [
"@",
"Override",
"public",
"void",
"setReactionSet",
"(",
"IReactionSet",
"sor",
")",
"{",
"if",
"(",
"this",
".",
"setOfReactions",
"!=",
"null",
")",
"this",
".",
"setOfReactions",
".",
"removeListener",
"(",
"this",
")",
";",
"this",
".",
"setOfReactions"... | Sets the ReactionSet contained in this ChemModel.
@param sor the ReactionSet to store in this model
@see #getReactionSet | [
"Sets",
"the",
"ReactionSet",
"contained",
"in",
"this",
"ChemModel",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ChemModel.java#L177-L183 |
114,778 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/normalize/SMSDNormalizer.java | SMSDNormalizer.makeDeepCopy | public static IAtomContainer makeDeepCopy(IAtomContainer container) {
IAtomContainer newAtomContainer = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
int lonePairCount = container.getLonePairCount();
int singleElectronCount = container.getSingleElectronCount();
... | java | public static IAtomContainer makeDeepCopy(IAtomContainer container) {
IAtomContainer newAtomContainer = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
int lonePairCount = container.getLonePairCount();
int singleElectronCount = container.getSingleElectronCount();
... | [
"public",
"static",
"IAtomContainer",
"makeDeepCopy",
"(",
"IAtomContainer",
"container",
")",
"{",
"IAtomContainer",
"newAtomContainer",
"=",
"DefaultChemObjectBuilder",
".",
"getInstance",
"(",
")",
".",
"newInstance",
"(",
"IAtomContainer",
".",
"class",
")",
";",
... | Returns deep copy of the molecule
@param container
@return deep copy of the mol | [
"Returns",
"deep",
"copy",
"of",
"the",
"molecule"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/normalize/SMSDNormalizer.java#L76-L116 |
114,779 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/normalize/SMSDNormalizer.java | SMSDNormalizer.aromatizeMolecule | public static void aromatizeMolecule(IAtomContainer mol) {
// need to find rings and aromaticity again since added H's
IRingSet ringSet = null;
try {
AllRingsFinder arf = new AllRingsFinder();
ringSet = arf.findAllRings(mol);
// SSSRFinder s = new SSSRFinde... | java | public static void aromatizeMolecule(IAtomContainer mol) {
// need to find rings and aromaticity again since added H's
IRingSet ringSet = null;
try {
AllRingsFinder arf = new AllRingsFinder();
ringSet = arf.findAllRings(mol);
// SSSRFinder s = new SSSRFinde... | [
"public",
"static",
"void",
"aromatizeMolecule",
"(",
"IAtomContainer",
"mol",
")",
"{",
"// need to find rings and aromaticity again since added H's",
"IRingSet",
"ringSet",
"=",
"null",
";",
"try",
"{",
"AllRingsFinder",
"arf",
"=",
"new",
"AllRingsFinder",
"(",
")",
... | This function finds rings and uses aromaticity detection code to
aromatize the molecule.
@param mol input molecule | [
"This",
"function",
"finds",
"rings",
"and",
"uses",
"aromaticity",
"detection",
"code",
"to",
"aromatize",
"the",
"molecule",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/normalize/SMSDNormalizer.java#L123-L178 |
114,780 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/normalize/SMSDNormalizer.java | SMSDNormalizer.getImplicitHydrogenCount | public static int getImplicitHydrogenCount(IAtomContainer atomContainer, IAtom atom) {
return atom.getImplicitHydrogenCount() == CDKConstants.UNSET ? 0 : atom.getImplicitHydrogenCount();
} | java | public static int getImplicitHydrogenCount(IAtomContainer atomContainer, IAtom atom) {
return atom.getImplicitHydrogenCount() == CDKConstants.UNSET ? 0 : atom.getImplicitHydrogenCount();
} | [
"public",
"static",
"int",
"getImplicitHydrogenCount",
"(",
"IAtomContainer",
"atomContainer",
",",
"IAtom",
"atom",
")",
"{",
"return",
"atom",
".",
"getImplicitHydrogenCount",
"(",
")",
"==",
"CDKConstants",
".",
"UNSET",
"?",
"0",
":",
"atom",
".",
"getImplic... | Returns The number of Implicit Hydrogen Count for a given IAtom.
@param atomContainer
@param atom
@return Implicit Hydrogen Count | [
"Returns",
"The",
"number",
"of",
"Implicit",
"Hydrogen",
"Count",
"for",
"a",
"given",
"IAtom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/normalize/SMSDNormalizer.java#L203-L205 |
114,781 | cdk/cdk | storage/io/src/main/java/org/openscience/cdk/io/iterator/event/DefaultEventChemObjectReader.java | DefaultEventChemObjectReader.fireFrameRead | protected void fireFrameRead() {
for (IChemObjectIOListener chemListener : getListeners()) {
IReaderListener listener = (IReaderListener) chemListener;
// Lazily create the event:
if (frameReadEvent == null) {
frameReadEvent = new ReaderEvent(this);
... | java | protected void fireFrameRead() {
for (IChemObjectIOListener chemListener : getListeners()) {
IReaderListener listener = (IReaderListener) chemListener;
// Lazily create the event:
if (frameReadEvent == null) {
frameReadEvent = new ReaderEvent(this);
... | [
"protected",
"void",
"fireFrameRead",
"(",
")",
"{",
"for",
"(",
"IChemObjectIOListener",
"chemListener",
":",
"getListeners",
"(",
")",
")",
"{",
"IReaderListener",
"listener",
"=",
"(",
"IReaderListener",
")",
"chemListener",
";",
"// Lazily create the event:",
"i... | Sends a frame read event to the registered ReaderListeners. | [
"Sends",
"a",
"frame",
"read",
"event",
"to",
"the",
"registered",
"ReaderListeners",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/iterator/event/DefaultEventChemObjectReader.java#L63-L73 |
114,782 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/BPolDescriptor.java | BPolDescriptor.calculate | @Override
public DescriptorValue calculate(IAtomContainer container) {
double bpol = 0;
int atomicNumber0;
int atomicNumber1;
double difference;
try {
IsotopeFactory ifac = Isotopes.getInstance();
IElement element0;
IElement element1;
... | java | @Override
public DescriptorValue calculate(IAtomContainer container) {
double bpol = 0;
int atomicNumber0;
int atomicNumber1;
double difference;
try {
IsotopeFactory ifac = Isotopes.getInstance();
IElement element0;
IElement element1;
... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtomContainer",
"container",
")",
"{",
"double",
"bpol",
"=",
"0",
";",
"int",
"atomicNumber0",
";",
"int",
"atomicNumber1",
";",
"double",
"difference",
";",
"try",
"{",
"IsotopeFactory",
"ifac",... | This method calculate the sum of the absolute value of
the difference between atomic polarizabilities of all bonded atoms in the molecule
@param container Parameter is the atom container.
@return The sum of atomic polarizabilities | [
"This",
"method",
"calculate",
"the",
"sum",
"of",
"the",
"absolute",
"value",
"of",
"the",
"difference",
"between",
"atomic",
"polarizabilities",
"of",
"all",
"bonded",
"atoms",
"in",
"the",
"molecule"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/BPolDescriptor.java#L130-L176 |
114,783 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/graph/invariant/HuLuIndexTool.java | HuLuIndexTool.displayMatrix | public static void displayMatrix(double[][] matrix) {
String line;
for (int f = 0; f < matrix.length; f++) {
line = "";
for (int g = 0; g < matrix.length; g++) {
line += matrix[g][f] + " | ";
}
logger.debug(line);
}
} | java | public static void displayMatrix(double[][] matrix) {
String line;
for (int f = 0; f < matrix.length; f++) {
line = "";
for (int g = 0; g < matrix.length; g++) {
line += matrix[g][f] + " | ";
}
logger.debug(line);
}
} | [
"public",
"static",
"void",
"displayMatrix",
"(",
"double",
"[",
"]",
"[",
"]",
"matrix",
")",
"{",
"String",
"line",
";",
"for",
"(",
"int",
"f",
"=",
"0",
";",
"f",
"<",
"matrix",
".",
"length",
";",
"f",
"++",
")",
"{",
"line",
"=",
"\"\"",
... | Lists a 2D double matrix to the System console. | [
"Lists",
"a",
"2D",
"double",
"matrix",
"to",
"the",
"System",
"console",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/graph/invariant/HuLuIndexTool.java#L199-L208 |
114,784 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/graph/invariant/HuLuIndexTool.java | HuLuIndexTool.displayArray | public static void displayArray(int[] array) {
String line = "";
for (int f = 0; f < array.length; f++) {
line += array[f] + " | ";
}
logger.debug(line);
} | java | public static void displayArray(int[] array) {
String line = "";
for (int f = 0; f < array.length; f++) {
line += array[f] + " | ";
}
logger.debug(line);
} | [
"public",
"static",
"void",
"displayArray",
"(",
"int",
"[",
"]",
"array",
")",
"{",
"String",
"line",
"=",
"\"\"",
";",
"for",
"(",
"int",
"f",
"=",
"0",
";",
"f",
"<",
"array",
".",
"length",
";",
"f",
"++",
")",
"{",
"line",
"+=",
"array",
"... | Lists a 1D array to the System console. | [
"Lists",
"a",
"1D",
"array",
"to",
"the",
"System",
"console",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/graph/invariant/HuLuIndexTool.java#L223-L229 |
114,785 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/io/ShelXWriter.java | ShelXWriter.write | @Override
public void write(IChemObject object) throws CDKException {
if (object instanceof ICrystal) {
writeCrystal((ICrystal) object);
} else {
throw new CDKException("Only Crystal objects can be read.");
}
} | java | @Override
public void write(IChemObject object) throws CDKException {
if (object instanceof ICrystal) {
writeCrystal((ICrystal) object);
} else {
throw new CDKException("Only Crystal objects can be read.");
}
} | [
"@",
"Override",
"public",
"void",
"write",
"(",
"IChemObject",
"object",
")",
"throws",
"CDKException",
"{",
"if",
"(",
"object",
"instanceof",
"ICrystal",
")",
"{",
"writeCrystal",
"(",
"(",
"ICrystal",
")",
"object",
")",
";",
"}",
"else",
"{",
"throw",... | Serializes the IChemObject to ShelX and redirects it to the output Writer.
@param object A Molecule of MoleculeSet object | [
"Serializes",
"the",
"IChemObject",
"to",
"ShelX",
"and",
"redirects",
"it",
"to",
"the",
"output",
"Writer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/io/ShelXWriter.java#L130-L137 |
114,786 | cdk/cdk | base/reaction/src/main/java/org/openscience/cdk/reaction/type/ElectronImpactNBEReaction.java | ElectronImpactNBEReaction.setActiveCenters | private void setActiveCenters(IAtomContainer reactant) throws CDKException {
Iterator<IAtom> atoms = reactant.atoms().iterator();
while (atoms.hasNext()) {
IAtom atom = atoms.next();
if (reactant.getConnectedLonePairsCount(atom) > 0 && reactant.getConnectedSingleElectronsCount(at... | java | private void setActiveCenters(IAtomContainer reactant) throws CDKException {
Iterator<IAtom> atoms = reactant.atoms().iterator();
while (atoms.hasNext()) {
IAtom atom = atoms.next();
if (reactant.getConnectedLonePairsCount(atom) > 0 && reactant.getConnectedSingleElectronsCount(at... | [
"private",
"void",
"setActiveCenters",
"(",
"IAtomContainer",
"reactant",
")",
"throws",
"CDKException",
"{",
"Iterator",
"<",
"IAtom",
">",
"atoms",
"=",
"reactant",
".",
"atoms",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"atoms",
".",
"hasN... | set the active center for this molecule. The active center
will be heteroatoms which contain at least one group of
lone pair electrons.
@param reactant The molecule to set the activity
@throws CDKException | [
"set",
"the",
"active",
"center",
"for",
"this",
"molecule",
".",
"The",
"active",
"center",
"will",
"be",
"heteroatoms",
"which",
"contain",
"at",
"least",
"one",
"group",
"of",
"lone",
"pair",
"electrons",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/reaction/src/main/java/org/openscience/cdk/reaction/type/ElectronImpactNBEReaction.java#L158-L166 |
114,787 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/geometry/AtomTools.java | AtomTools.add3DCoordinates1 | public static void add3DCoordinates1(IAtomContainer atomContainer) {
// atoms without coordinates
IAtomContainer noCoords = atomContainer.getBuilder().newInstance(IAtomContainer.class);
// get vector of possible referenceAtoms?
IAtomContainer refAtoms = atomContainer.getBuilder().newInst... | java | public static void add3DCoordinates1(IAtomContainer atomContainer) {
// atoms without coordinates
IAtomContainer noCoords = atomContainer.getBuilder().newInstance(IAtomContainer.class);
// get vector of possible referenceAtoms?
IAtomContainer refAtoms = atomContainer.getBuilder().newInst... | [
"public",
"static",
"void",
"add3DCoordinates1",
"(",
"IAtomContainer",
"atomContainer",
")",
"{",
"// atoms without coordinates",
"IAtomContainer",
"noCoords",
"=",
"atomContainer",
".",
"getBuilder",
"(",
")",
".",
"newInstance",
"(",
"IAtomContainer",
".",
"class",
... | Generate coordinates for all atoms which are singly bonded and have
no coordinates. This is useful when hydrogens are present but have
no coordinates. It knows about C, O, N, S only and will give tetrahedral or
trigonal geometry elsewhere. Bond lengths are computed from covalent radii
if available. Angles are tetrahedr... | [
"Generate",
"coordinates",
"for",
"all",
"atoms",
"which",
"are",
"singly",
"bonded",
"and",
"have",
"no",
"coordinates",
".",
"This",
"is",
"useful",
"when",
"hydrogens",
"are",
"present",
"but",
"have",
"no",
"coordinates",
".",
"It",
"knows",
"about",
"C"... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/geometry/AtomTools.java#L58-L104 |
114,788 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/geometry/AtomTools.java | AtomTools.rescaleBondLength | public static Point3d rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2) {
Point3d point1 = atom1.getPoint3d();
double d1 = atom1.getCovalentRadius();
double d2 = atom2.getCovalentRadius();
// in case we have no covalent radii, set to 1.0
double distance = (d1 < 0.1 || d... | java | public static Point3d rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2) {
Point3d point1 = atom1.getPoint3d();
double d1 = atom1.getCovalentRadius();
double d2 = atom2.getCovalentRadius();
// in case we have no covalent radii, set to 1.0
double distance = (d1 < 0.1 || d... | [
"public",
"static",
"Point3d",
"rescaleBondLength",
"(",
"IAtom",
"atom1",
",",
"IAtom",
"atom2",
",",
"Point3d",
"point2",
")",
"{",
"Point3d",
"point1",
"=",
"atom1",
".",
"getPoint3d",
"(",
")",
";",
"double",
"d1",
"=",
"atom1",
".",
"getCovalentRadius",... | Rescales Point2 so that length 1-2 is sum of covalent radii.
if covalent radii cannot be found, use bond length of 1.0
@param atom1 stationary atom
@param atom2 movable atom
@param point2 coordinates for atom 2
@return new coords for atom 2 | [
"Rescales",
"Point2",
"so",
"that",
"length",
"1",
"-",
"2",
"is",
"sum",
"of",
"covalent",
"radii",
".",
"if",
"covalent",
"radii",
"cannot",
"be",
"found",
"use",
"bond",
"length",
"of",
"1",
".",
"0"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/geometry/AtomTools.java#L115-L128 |
114,789 | cdk/cdk | storage/io/src/main/java/org/openscience/cdk/io/cml/CMLCoreModule.java | CMLCoreModule.newAtomData | protected void newAtomData() {
atomCounter = 0;
elsym = new ArrayList<String>();
elid = new ArrayList<String>();
eltitles = new ArrayList<String>();
formalCharges = new ArrayList<String>();
partialCharges = new ArrayList<String>();
isotope = new ArrayList<String>(... | java | protected void newAtomData() {
atomCounter = 0;
elsym = new ArrayList<String>();
elid = new ArrayList<String>();
eltitles = new ArrayList<String>();
formalCharges = new ArrayList<String>();
partialCharges = new ArrayList<String>();
isotope = new ArrayList<String>(... | [
"protected",
"void",
"newAtomData",
"(",
")",
"{",
"atomCounter",
"=",
"0",
";",
"elsym",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"elid",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"eltitles",
"=",
"new",
"ArrayLi... | Clean all data about read atoms. | [
"Clean",
"all",
"data",
"about",
"read",
"atoms",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/cml/CMLCoreModule.java#L271-L300 |
114,790 | cdk/cdk | storage/io/src/main/java/org/openscience/cdk/io/cml/CMLCoreModule.java | CMLCoreModule.newBondData | protected void newBondData() {
bondCounter = 0;
bondid = new ArrayList<String>();
bondARef1 = new ArrayList<String>();
bondARef2 = new ArrayList<String>();
order = new ArrayList<String>();
bondStereo = new ArrayList<String>();
bondCustomProperty = new Hashtable<St... | java | protected void newBondData() {
bondCounter = 0;
bondid = new ArrayList<String>();
bondARef1 = new ArrayList<String>();
bondARef2 = new ArrayList<String>();
order = new ArrayList<String>();
bondStereo = new ArrayList<String>();
bondCustomProperty = new Hashtable<St... | [
"protected",
"void",
"newBondData",
"(",
")",
"{",
"bondCounter",
"=",
"0",
";",
"bondid",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"bondARef1",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"bondARef2",
"=",
"new",
"... | Clean all data about read bonds. | [
"Clean",
"all",
"data",
"about",
"read",
"bonds",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/cml/CMLCoreModule.java#L305-L316 |
114,791 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/math/FortranFormat.java | FortranFormat.atof | public static double atof(String s) {
int i = 0;
int sign = 1;
double r = 0; // integer part
double p = 1; // exponent of fractional part
int state = 0; // 0 = int part, 1 = frac part
while (i < s.length() && Character.isWhitespace(s.charAt(i)))
i++;
... | java | public static double atof(String s) {
int i = 0;
int sign = 1;
double r = 0; // integer part
double p = 1; // exponent of fractional part
int state = 0; // 0 = int part, 1 = frac part
while (i < s.length() && Character.isWhitespace(s.charAt(i)))
i++;
... | [
"public",
"static",
"double",
"atof",
"(",
"String",
"s",
")",
"{",
"int",
"i",
"=",
"0",
";",
"int",
"sign",
"=",
"1",
";",
"double",
"r",
"=",
"0",
";",
"// integer part",
"double",
"p",
"=",
"1",
";",
"// exponent of fractional part",
"int",
"state"... | Converts a string of digits to an double.
@param s a string denoting a double | [
"Converts",
"a",
"string",
"of",
"digits",
"to",
"an",
"double",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/math/FortranFormat.java#L47-L84 |
114,792 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/FractionalPSADescriptor.java | FractionalPSADescriptor.calculate | @Override
public DescriptorValue calculate(IAtomContainer mol) {
try {
mol = mol.clone();
} catch (CloneNotSupportedException ex) {
}
double polar = 0, weight = 0;
try {
// type & assign implicit hydrogens
IChemObjectBuilder builder = mol.g... | java | @Override
public DescriptorValue calculate(IAtomContainer mol) {
try {
mol = mol.clone();
} catch (CloneNotSupportedException ex) {
}
double polar = 0, weight = 0;
try {
// type & assign implicit hydrogens
IChemObjectBuilder builder = mol.g... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtomContainer",
"mol",
")",
"{",
"try",
"{",
"mol",
"=",
"mol",
".",
"clone",
"(",
")",
";",
"}",
"catch",
"(",
"CloneNotSupportedException",
"ex",
")",
"{",
"}",
"double",
"polar",
"=",
"... | Calculates the topological polar surface area and expresses it as a ratio to molecule size.
@param mol The {@link IAtomContainer} whose volume is to be calculated
@return descriptor(s) retaining to polar surface area | [
"Calculates",
"the",
"topological",
"polar",
"surface",
"area",
"and",
"expresses",
"it",
"as",
"a",
"ratio",
"to",
"molecule",
"size",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/FractionalPSADescriptor.java#L110-L145 |
114,793 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/graph/ConnectivityChecker.java | ConnectivityChecker.partitionIntoMolecules | public static IAtomContainerSet partitionIntoMolecules(IAtomContainer container) {
ConnectedComponents cc = new ConnectedComponents(GraphUtil.toAdjList(container));
return partitionIntoMolecules(container, cc.components());
} | java | public static IAtomContainerSet partitionIntoMolecules(IAtomContainer container) {
ConnectedComponents cc = new ConnectedComponents(GraphUtil.toAdjList(container));
return partitionIntoMolecules(container, cc.components());
} | [
"public",
"static",
"IAtomContainerSet",
"partitionIntoMolecules",
"(",
"IAtomContainer",
"container",
")",
"{",
"ConnectedComponents",
"cc",
"=",
"new",
"ConnectedComponents",
"(",
"GraphUtil",
".",
"toAdjList",
"(",
"container",
")",
")",
";",
"return",
"partitionIn... | Partitions the atoms in an AtomContainer into covalently connected components.
@param container The AtomContainer to be partitioned into connected components, i.e. molecules
@return A MoleculeSet.
@cdk.dictref blue-obelisk:graphPartitioning | [
"Partitions",
"the",
"atoms",
"in",
"an",
"AtomContainer",
"into",
"covalently",
"connected",
"components",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/graph/ConnectivityChecker.java#L83-L86 |
114,794 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/graph/matrix/ConnectionMatrix.java | ConnectionMatrix.getMatrix | public static double[][] getMatrix(IAtomContainer container) {
IBond bond = null;
int indexAtom1;
int indexAtom2;
double[][] conMat = new double[container.getAtomCount()][container.getAtomCount()];
for (int f = 0; f < container.getBondCount(); f++) {
bond = container.... | java | public static double[][] getMatrix(IAtomContainer container) {
IBond bond = null;
int indexAtom1;
int indexAtom2;
double[][] conMat = new double[container.getAtomCount()][container.getAtomCount()];
for (int f = 0; f < container.getBondCount(); f++) {
bond = container.... | [
"public",
"static",
"double",
"[",
"]",
"[",
"]",
"getMatrix",
"(",
"IAtomContainer",
"container",
")",
"{",
"IBond",
"bond",
"=",
"null",
";",
"int",
"indexAtom1",
";",
"int",
"indexAtom2",
";",
"double",
"[",
"]",
"[",
"]",
"conMat",
"=",
"new",
"dou... | Returns the connection matrix representation of this AtomContainer.
@param container The AtomContainer for which the matrix is calculated
@return A connection matrix representing this AtomContainer | [
"Returns",
"the",
"connection",
"matrix",
"representation",
"of",
"this",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/graph/matrix/ConnectionMatrix.java#L48-L61 |
114,795 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/Permutation.java | Permutation.isIdentity | public boolean isIdentity() {
for (int i = 0; i < this.values.length; i++) {
if (this.values[i] != i) {
return false;
}
}
return true;
} | java | public boolean isIdentity() {
for (int i = 0; i < this.values.length; i++) {
if (this.values[i] != i) {
return false;
}
}
return true;
} | [
"public",
"boolean",
"isIdentity",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"values",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"values",
"[",
"i",
"]",
"!=",
"i",
")",
"{",
"return",... | Check to see if this permutation is the identity permutation.
@return true if for all i, p[i] = i | [
"Check",
"to",
"see",
"if",
"this",
"permutation",
"is",
"the",
"identity",
"permutation",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Permutation.java#L103-L110 |
114,796 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/Permutation.java | Permutation.setTo | public void setTo(Permutation other) {
if (this.values.length != other.values.length)
throw new IllegalArgumentException("permutations are different size");
for (int i = 0; i < this.values.length; i++) {
this.values[i] = other.values[i];
}
} | java | public void setTo(Permutation other) {
if (this.values.length != other.values.length)
throw new IllegalArgumentException("permutations are different size");
for (int i = 0; i < this.values.length; i++) {
this.values[i] = other.values[i];
}
} | [
"public",
"void",
"setTo",
"(",
"Permutation",
"other",
")",
"{",
"if",
"(",
"this",
".",
"values",
".",
"length",
"!=",
"other",
".",
"values",
".",
"length",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"permutations are different size\"",
")",
";... | Alter a permutation by setting it to the values in the other permutation.
@param other the other permutation to use
@throws IllegalArgumentException thrown if the permutations are of different
size | [
"Alter",
"a",
"permutation",
"by",
"setting",
"it",
"to",
"the",
"values",
"in",
"the",
"other",
"permutation",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Permutation.java#L187-L195 |
114,797 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/Permutation.java | Permutation.toCycleString | public String toCycleString() {
int n = this.values.length;
boolean[] p = new boolean[n];
Arrays.fill(p, true);
StringBuilder sb = new StringBuilder();
int j = 0;
for (int i = 0; i < n; i++) {
if (p[i]) {
sb.append('(');
sb.app... | java | public String toCycleString() {
int n = this.values.length;
boolean[] p = new boolean[n];
Arrays.fill(p, true);
StringBuilder sb = new StringBuilder();
int j = 0;
for (int i = 0; i < n; i++) {
if (p[i]) {
sb.append('(');
sb.app... | [
"public",
"String",
"toCycleString",
"(",
")",
"{",
"int",
"n",
"=",
"this",
".",
"values",
".",
"length",
";",
"boolean",
"[",
"]",
"p",
"=",
"new",
"boolean",
"[",
"n",
"]",
";",
"Arrays",
".",
"fill",
"(",
"p",
",",
"true",
")",
";",
"StringBu... | An easily-readable version of the permutation as a product of cycles.
@return the cycle form of the permutation as a string | [
"An",
"easily",
"-",
"readable",
"version",
"of",
"the",
"permutation",
"as",
"a",
"product",
"of",
"cycles",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Permutation.java#L230-L253 |
114,798 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/SelectionVisibility.java | SelectionVisibility.isSelected | static boolean isSelected(IChemObject object, RendererModel model) {
if (object.getProperty(StandardGenerator.HIGHLIGHT_COLOR) != null) return true;
if (model.getSelection() != null) return model.getSelection().contains(object);
return false;
} | java | static boolean isSelected(IChemObject object, RendererModel model) {
if (object.getProperty(StandardGenerator.HIGHLIGHT_COLOR) != null) return true;
if (model.getSelection() != null) return model.getSelection().contains(object);
return false;
} | [
"static",
"boolean",
"isSelected",
"(",
"IChemObject",
"object",
",",
"RendererModel",
"model",
")",
"{",
"if",
"(",
"object",
".",
"getProperty",
"(",
"StandardGenerator",
".",
"HIGHLIGHT_COLOR",
")",
"!=",
"null",
")",
"return",
"true",
";",
"if",
"(",
"mo... | Determine if an object is selected.
@param object the object
@return object is selected | [
"Determine",
"if",
"an",
"object",
"is",
"selected",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/SelectionVisibility.java#L99-L103 |
114,799 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/SelectionVisibility.java | SelectionVisibility.hasSelectedBond | static boolean hasSelectedBond(List<IBond> bonds, RendererModel model) {
for (IBond bond : bonds) {
if (isSelected(bond, model)) return true;
}
return false;
} | java | static boolean hasSelectedBond(List<IBond> bonds, RendererModel model) {
for (IBond bond : bonds) {
if (isSelected(bond, model)) return true;
}
return false;
} | [
"static",
"boolean",
"hasSelectedBond",
"(",
"List",
"<",
"IBond",
">",
"bonds",
",",
"RendererModel",
"model",
")",
"{",
"for",
"(",
"IBond",
"bond",
":",
"bonds",
")",
"{",
"if",
"(",
"isSelected",
"(",
"bond",
",",
"model",
")",
")",
"return",
"true... | Determines if any bond in the list is selected
@param bonds list of bonds
@return at least bond bond is selected | [
"Determines",
"if",
"any",
"bond",
"in",
"the",
"list",
"is",
"selected"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/SelectionVisibility.java#L111-L116 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.