id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
113,700 | actorapp/actor-platform | actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java | ImageLoading.saveHq | public static byte[] saveHq(Bitmap src) throws ImageSaveException {
return save(src, Bitmap.CompressFormat.JPEG, JPEG_QUALITY_HQ);
} | java | public static byte[] saveHq(Bitmap src) throws ImageSaveException {
return save(src, Bitmap.CompressFormat.JPEG, JPEG_QUALITY_HQ);
} | [
"public",
"static",
"byte",
"[",
"]",
"saveHq",
"(",
"Bitmap",
"src",
")",
"throws",
"ImageSaveException",
"{",
"return",
"save",
"(",
"src",
",",
"Bitmap",
".",
"CompressFormat",
".",
"JPEG",
",",
"JPEG_QUALITY_HQ",
")",
";",
"}"
] | Saving image in jpeg to byte array with better quality 90
@param src source image
@return saved data
@throws ImageSaveException if it is unable to save image | [
"Saving",
"image",
"in",
"jpeg",
"to",
"byte",
"array",
"with",
"better",
"quality",
"90"
] | 5123c1584757c6eeea0ed2a0e7e043629871a0c6 | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L254-L256 |
113,701 | actorapp/actor-platform | actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java | ImageLoading.save | public static void save(Bitmap src, String fileName) throws ImageSaveException {
saveJpeg(src, fileName, JPEG_QUALITY);
} | java | public static void save(Bitmap src, String fileName) throws ImageSaveException {
saveJpeg(src, fileName, JPEG_QUALITY);
} | [
"public",
"static",
"void",
"save",
"(",
"Bitmap",
"src",
",",
"String",
"fileName",
")",
"throws",
"ImageSaveException",
"{",
"saveJpeg",
"(",
"src",
",",
"fileName",
",",
"JPEG_QUALITY",
")",
";",
"}"
] | Saving image in jpeg to file with quality 80
@param src source image
@param fileName destination file name
@throws ImageSaveException if it is unable to save image | [
"Saving",
"image",
"in",
"jpeg",
"to",
"file",
"with",
"quality",
"80"
] | 5123c1584757c6eeea0ed2a0e7e043629871a0c6 | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L288-L290 |
113,702 | actorapp/actor-platform | actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java | ImageLoading.saveLq | public static void saveLq(Bitmap src, String fileName) throws ImageSaveException {
saveJpeg(src, fileName, JPEG_QUALITY_LOW);
} | java | public static void saveLq(Bitmap src, String fileName) throws ImageSaveException {
saveJpeg(src, fileName, JPEG_QUALITY_LOW);
} | [
"public",
"static",
"void",
"saveLq",
"(",
"Bitmap",
"src",
",",
"String",
"fileName",
")",
"throws",
"ImageSaveException",
"{",
"saveJpeg",
"(",
"src",
",",
"fileName",
",",
"JPEG_QUALITY_LOW",
")",
";",
"}"
] | Saving image in jpeg to file with quality 55
@param src source image
@param fileName destination file name
@throws ImageSaveException if it is unable to save image | [
"Saving",
"image",
"in",
"jpeg",
"to",
"file",
"with",
"quality",
"55"
] | 5123c1584757c6eeea0ed2a0e7e043629871a0c6 | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L299-L301 |
113,703 | actorapp/actor-platform | actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java | ImageLoading.savePng | public static void savePng(Bitmap src, String fileName) throws ImageSaveException {
save(src, fileName, Bitmap.CompressFormat.PNG, 100);
} | java | public static void savePng(Bitmap src, String fileName) throws ImageSaveException {
save(src, fileName, Bitmap.CompressFormat.PNG, 100);
} | [
"public",
"static",
"void",
"savePng",
"(",
"Bitmap",
"src",
",",
"String",
"fileName",
")",
"throws",
"ImageSaveException",
"{",
"save",
"(",
"src",
",",
"fileName",
",",
"Bitmap",
".",
"CompressFormat",
".",
"PNG",
",",
"100",
")",
";",
"}"
] | Saving image in png to file
@param src source image
@param fileName destination file name
@throws ImageSaveException if it is unable to save image | [
"Saving",
"image",
"in",
"png",
"to",
"file"
] | 5123c1584757c6eeea0ed2a0e7e043629871a0c6 | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L332-L334 |
113,704 | actorapp/actor-platform | actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java | ImageLoading.saveBmp | public static void saveBmp(Bitmap src, String fileName) throws ImageSaveException {
try {
BitmapUtil.save(src, fileName);
} catch (IOException e) {
throw new ImageSaveException(e);
}
} | java | public static void saveBmp(Bitmap src, String fileName) throws ImageSaveException {
try {
BitmapUtil.save(src, fileName);
} catch (IOException e) {
throw new ImageSaveException(e);
}
} | [
"public",
"static",
"void",
"saveBmp",
"(",
"Bitmap",
"src",
",",
"String",
"fileName",
")",
"throws",
"ImageSaveException",
"{",
"try",
"{",
"BitmapUtil",
".",
"save",
"(",
"src",
",",
"fileName",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{... | Saving image in bmp to file
@param src source image
@param fileName destination file name
@throws ImageSaveException if it is unable to save image | [
"Saving",
"image",
"in",
"bmp",
"to",
"file"
] | 5123c1584757c6eeea0ed2a0e7e043629871a0c6 | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L343-L349 |
113,705 | actorapp/actor-platform | actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java | ImageLoading.bitmapSize | public static int bitmapSize(Bitmap bitmap) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return bitmap.getByteCount();
} else {
return bitmap.getRowBytes() * bitmap.getHeight();
}
} | java | public static int bitmapSize(Bitmap bitmap) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return bitmap.getByteCount();
} else {
return bitmap.getRowBytes() * bitmap.getHeight();
}
} | [
"public",
"static",
"int",
"bitmapSize",
"(",
"Bitmap",
"bitmap",
")",
"{",
"if",
"(",
"Build",
".",
"VERSION",
".",
"SDK_INT",
">=",
"Build",
".",
"VERSION_CODES",
".",
"KITKAT",
")",
"{",
"return",
"bitmap",
".",
"getByteCount",
"(",
")",
";",
"}",
"... | Calculating allocated memory for bitmap
@param bitmap source bitmap
@return size in bytes | [
"Calculating",
"allocated",
"memory",
"for",
"bitmap"
] | 5123c1584757c6eeea0ed2a0e7e043629871a0c6 | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L357-L363 |
113,706 | actorapp/actor-platform | actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java | ImageLoading.loadBitmapReuseExact | private static ReuseResult loadBitmapReuseExact(ImageSource source, Bitmap dest) throws ImageLoadException {
ImageMetadata metadata = source.getImageMetadata();
boolean tryReuse = false;
if (dest.isMutable()
&& dest.getWidth() == metadata.getW()
&& dest.getHeight(... | java | private static ReuseResult loadBitmapReuseExact(ImageSource source, Bitmap dest) throws ImageLoadException {
ImageMetadata metadata = source.getImageMetadata();
boolean tryReuse = false;
if (dest.isMutable()
&& dest.getWidth() == metadata.getW()
&& dest.getHeight(... | [
"private",
"static",
"ReuseResult",
"loadBitmapReuseExact",
"(",
"ImageSource",
"source",
",",
"Bitmap",
"dest",
")",
"throws",
"ImageLoadException",
"{",
"ImageMetadata",
"metadata",
"=",
"source",
".",
"getImageMetadata",
"(",
")",
";",
"boolean",
"tryReuse",
"=",... | Loading image with reuse bitmap of same size as source
@param source image source
@param dest destination bitmap
@return loaded bitmap result
@throws ImageLoadException if it is unable to load image | [
"Loading",
"image",
"with",
"reuse",
"bitmap",
"of",
"same",
"size",
"as",
"source"
] | 5123c1584757c6eeea0ed2a0e7e043629871a0c6 | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L424-L444 |
113,707 | actorapp/actor-platform | actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java | ImageLoading.save | private static void save(Bitmap src, String fileName, Bitmap.CompressFormat format, int quality) throws ImageSaveException {
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(fileName);
src.compress(format, quality, outputStream);
outputS... | java | private static void save(Bitmap src, String fileName, Bitmap.CompressFormat format, int quality) throws ImageSaveException {
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(fileName);
src.compress(format, quality, outputStream);
outputS... | [
"private",
"static",
"void",
"save",
"(",
"Bitmap",
"src",
",",
"String",
"fileName",
",",
"Bitmap",
".",
"CompressFormat",
"format",
",",
"int",
"quality",
")",
"throws",
"ImageSaveException",
"{",
"FileOutputStream",
"outputStream",
"=",
"null",
";",
"try",
... | Saving image to file
@param src source image
@param fileName destination file name
@param format image format
@param quality jpeg quality
@throws ImageSaveException if it is unable to save image | [
"Saving",
"image",
"to",
"file"
] | 5123c1584757c6eeea0ed2a0e7e043629871a0c6 | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L484-L501 |
113,708 | cdk/cdk | descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/CIPTool.java | CIPTool.getLigands | private static ILigand[] getLigands(IAtom atom, IAtomContainer container, IAtom exclude) {
List<IAtom> neighbors = container.getConnectedAtomsList(atom);
ILigand[] ligands = new ILigand[neighbors.size() - 1];
int i = 0;
for (IAtom neighbor : neighbors) {
if (!neighbor.equa... | java | private static ILigand[] getLigands(IAtom atom, IAtomContainer container, IAtom exclude) {
List<IAtom> neighbors = container.getConnectedAtomsList(atom);
ILigand[] ligands = new ILigand[neighbors.size() - 1];
int i = 0;
for (IAtom neighbor : neighbors) {
if (!neighbor.equa... | [
"private",
"static",
"ILigand",
"[",
"]",
"getLigands",
"(",
"IAtom",
"atom",
",",
"IAtomContainer",
"container",
",",
"IAtom",
"exclude",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbors",
"=",
"container",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";"... | Obtain the ligands connected to the 'atom' excluding 'exclude'. This is
mainly meant as a utility for double-bond labelling.
@param atom an atom
@param container a structure to which 'atom' belongs
@param exclude exclude this atom - can not be null
@return the ligands | [
"Obtain",
"the",
"ligands",
"connected",
"to",
"the",
"atom",
"excluding",
"exclude",
".",
"This",
"is",
"mainly",
"meant",
"as",
"a",
"utility",
"for",
"double",
"-",
"bond",
"labelling",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/CIPTool.java#L206-L218 |
113,709 | cdk/cdk | descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/CIPTool.java | CIPTool.getLigandLigands | public static ILigand[] getLigandLigands(ILigand ligand) {
if (ligand instanceof TerminalLigand) return new ILigand[0];
IAtomContainer container = ligand.getAtomContainer();
IAtom ligandAtom = ligand.getLigandAtom();
IAtom centralAtom = ligand.getCentralAtom();
VisitedAtoms visi... | java | public static ILigand[] getLigandLigands(ILigand ligand) {
if (ligand instanceof TerminalLigand) return new ILigand[0];
IAtomContainer container = ligand.getAtomContainer();
IAtom ligandAtom = ligand.getLigandAtom();
IAtom centralAtom = ligand.getCentralAtom();
VisitedAtoms visi... | [
"public",
"static",
"ILigand",
"[",
"]",
"getLigandLigands",
"(",
"ILigand",
"ligand",
")",
"{",
"if",
"(",
"ligand",
"instanceof",
"TerminalLigand",
")",
"return",
"new",
"ILigand",
"[",
"0",
"]",
";",
"IAtomContainer",
"container",
"=",
"ligand",
".",
"get... | Returns a CIP-expanded array of side chains of a ligand. If the ligand atom is only connected to
the chiral atom, the method will return an empty list. The expansion involves the CIP rules,
so that a double bonded oxygen will be represented twice in the list.
@param ligand the {@link ILigand} for which to return t... | [
"Returns",
"a",
"CIP",
"-",
"expanded",
"array",
"of",
"side",
"chains",
"of",
"a",
"ligand",
".",
"If",
"the",
"ligand",
"atom",
"is",
"only",
"connected",
"to",
"the",
"chiral",
"atom",
"the",
"method",
"will",
"return",
"an",
"empty",
"list",
".",
"... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/CIPTool.java#L337-L370 |
113,710 | cdk/cdk | storage/io/src/main/java/org/openscience/cdk/io/Gaussian03Reader.java | Gaussian03Reader.readCoordinates | private void readCoordinates(IChemModel model) throws CDKException, IOException {
IAtomContainer container = model.getBuilder().newInstance(IAtomContainer.class);
String line = input.readLine();
line = input.readLine();
line = input.readLine();
line = input.readLine();
wh... | java | private void readCoordinates(IChemModel model) throws CDKException, IOException {
IAtomContainer container = model.getBuilder().newInstance(IAtomContainer.class);
String line = input.readLine();
line = input.readLine();
line = input.readLine();
line = input.readLine();
wh... | [
"private",
"void",
"readCoordinates",
"(",
"IChemModel",
"model",
")",
"throws",
"CDKException",
",",
"IOException",
"{",
"IAtomContainer",
"container",
"=",
"model",
".",
"getBuilder",
"(",
")",
".",
"newInstance",
"(",
"IAtomContainer",
".",
"class",
")",
";",... | Reads a set of coordinates into ChemModel.
@param model the destination ChemModel
@throws IOException if an I/O error occurs | [
"Reads",
"a",
"set",
"of",
"coordinates",
"into",
"ChemModel",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/Gaussian03Reader.java#L211-L271 |
113,711 | cdk/cdk | storage/io/src/main/java/org/openscience/cdk/io/Gaussian03Reader.java | Gaussian03Reader.readPartialCharges | private void readPartialCharges(IChemModel model) throws CDKException, IOException {
logger.info("Reading partial atomic charges");
IAtomContainerSet moleculeSet = model.getMoleculeSet();
IAtomContainer molecule = moleculeSet.getAtomContainer(0);
String line = input.readLine(); // skip f... | java | private void readPartialCharges(IChemModel model) throws CDKException, IOException {
logger.info("Reading partial atomic charges");
IAtomContainerSet moleculeSet = model.getMoleculeSet();
IAtomContainer molecule = moleculeSet.getAtomContainer(0);
String line = input.readLine(); // skip f... | [
"private",
"void",
"readPartialCharges",
"(",
"IChemModel",
"model",
")",
"throws",
"CDKException",
",",
"IOException",
"{",
"logger",
".",
"info",
"(",
"\"Reading partial atomic charges\"",
")",
";",
"IAtomContainerSet",
"moleculeSet",
"=",
"model",
".",
"getMolecule... | Reads partial atomic charges and add the to the given ChemModel. | [
"Reads",
"partial",
"atomic",
"charges",
"and",
"add",
"the",
"to",
"the",
"given",
"ChemModel",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/Gaussian03Reader.java#L276-L306 |
113,712 | cdk/cdk | descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PeriodicTablePositionDescriptor.java | PeriodicTablePositionDescriptor.calculate | @Override
public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
int period;
String symbol = atom.getSymbol();
period = periodicTable.get(symbol);
return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(period),
... | java | @Override
public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
int period;
String symbol = atom.getSymbol();
period = periodicTable.get(symbol);
return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(period),
... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtom",
"atom",
",",
"IAtomContainer",
"container",
")",
"{",
"int",
"period",
";",
"String",
"symbol",
"=",
"atom",
".",
"getSymbol",
"(",
")",
";",
"period",
"=",
"periodicTable",
".",
"get",... | This method calculates the period of an atom.
@param atom The IAtom for which the DescriptorValue is requested
@param container Parameter is the atom container.
@return The period | [
"This",
"method",
"calculates",
"the",
"period",
"of",
"an",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PeriodicTablePositionDescriptor.java#L150-L157 |
113,713 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/tools/FormatStringBuffer.java | FormatStringBuffer.skipDigits | private int skipDigits() {
char ch;
int i = 0;
while (index < format.length()) {
if (Character.isDigit(ch = format.charAt(index))) {
index++;
i = i * 10 + Character.digit(ch, 10);
} else {
break;
}
}
... | java | private int skipDigits() {
char ch;
int i = 0;
while (index < format.length()) {
if (Character.isDigit(ch = format.charAt(index))) {
index++;
i = i * 10 + Character.digit(ch, 10);
} else {
break;
}
}
... | [
"private",
"int",
"skipDigits",
"(",
")",
"{",
"char",
"ch",
";",
"int",
"i",
"=",
"0",
";",
"while",
"(",
"index",
"<",
"format",
".",
"length",
"(",
")",
")",
"{",
"if",
"(",
"Character",
".",
"isDigit",
"(",
"ch",
"=",
"format",
".",
"charAt",... | Skip digits and return the number they form. | [
"Skip",
"digits",
"and",
"return",
"the",
"number",
"they",
"form",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/FormatStringBuffer.java#L283-L296 |
113,714 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/AbstractDiscretePartitionRefiner.java | AbstractDiscretePartitionRefiner.getAutomorphismPartition | public Partition getAutomorphismPartition() {
final int n = group.getSize();
final DisjointSetForest forest = new DisjointSetForest(n);
group.apply(new PermutationGroup.Backtracker() {
boolean[] inOrbit = new boolean[n];
private int inOrbitCount = 0;
... | java | public Partition getAutomorphismPartition() {
final int n = group.getSize();
final DisjointSetForest forest = new DisjointSetForest(n);
group.apply(new PermutationGroup.Backtracker() {
boolean[] inOrbit = new boolean[n];
private int inOrbitCount = 0;
... | [
"public",
"Partition",
"getAutomorphismPartition",
"(",
")",
"{",
"final",
"int",
"n",
"=",
"group",
".",
"getSize",
"(",
")",
";",
"final",
"DisjointSetForest",
"forest",
"=",
"new",
"DisjointSetForest",
"(",
"n",
")",
";",
"group",
".",
"apply",
"(",
"ne... | The automorphism partition is a partition of the elements of the group.
@return a partition of the elements of group | [
"The",
"automorphism",
"partition",
"is",
"a",
"partition",
"of",
"the",
"elements",
"of",
"the",
"group",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/AbstractDiscretePartitionRefiner.java#L129-L175 |
113,715 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/AbstractDiscretePartitionRefiner.java | AbstractDiscretePartitionRefiner.getHalfMatrixString | private String getHalfMatrixString(Permutation permutation) {
StringBuilder builder = new StringBuilder(permutation.size());
int size = permutation.size();
for (int indexI = 0; indexI < size - 1; indexI++) {
for (int indexJ = indexI + 1; indexJ < size; indexJ++) {
bui... | java | private String getHalfMatrixString(Permutation permutation) {
StringBuilder builder = new StringBuilder(permutation.size());
int size = permutation.size();
for (int indexI = 0; indexI < size - 1; indexI++) {
for (int indexJ = indexI + 1; indexJ < size; indexJ++) {
bui... | [
"private",
"String",
"getHalfMatrixString",
"(",
"Permutation",
"permutation",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
"permutation",
".",
"size",
"(",
")",
")",
";",
"int",
"size",
"=",
"permutation",
".",
"size",
"(",
")",
"... | Get the upper-half of the adjacency matrix under the permutation.
@param permutation a permutation of the adjacency matrix
@return a string containing the permuted values of half the matrix | [
"Get",
"the",
"upper",
"-",
"half",
"of",
"the",
"adjacency",
"matrix",
"under",
"the",
"permutation",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/AbstractDiscretePartitionRefiner.java#L183-L192 |
113,716 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/AbstractDiscretePartitionRefiner.java | AbstractDiscretePartitionRefiner.refine | private void refine(PermutationGroup group, Partition coarser) {
int vertexCount = getVertexCount();
Partition finer = equitableRefiner.refine(coarser);
int firstNonDiscreteCell = finer.getIndexOfFirstNonDiscreteCell();
if (firstNonDiscreteCell == -1) {
firstNonDiscreteCell... | java | private void refine(PermutationGroup group, Partition coarser) {
int vertexCount = getVertexCount();
Partition finer = equitableRefiner.refine(coarser);
int firstNonDiscreteCell = finer.getIndexOfFirstNonDiscreteCell();
if (firstNonDiscreteCell == -1) {
firstNonDiscreteCell... | [
"private",
"void",
"refine",
"(",
"PermutationGroup",
"group",
",",
"Partition",
"coarser",
")",
"{",
"int",
"vertexCount",
"=",
"getVertexCount",
"(",
")",
";",
"Partition",
"finer",
"=",
"equitableRefiner",
".",
"refine",
"(",
"coarser",
")",
";",
"int",
"... | Does the work of the class, that refines a coarse partition into a finer
one using the supplied automorphism group to prune the search.
@param group the automorphism group of the graph
@param coarser the partition to refine | [
"Does",
"the",
"work",
"of",
"the",
"class",
"that",
"refines",
"a",
"coarse",
"partition",
"into",
"a",
"finer",
"one",
"using",
"the",
"supplied",
"automorphism",
"group",
"to",
"prune",
"the",
"search",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/AbstractDiscretePartitionRefiner.java#L265-L333 |
113,717 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/AbstractDiscretePartitionRefiner.java | AbstractDiscretePartitionRefiner.compareRowwise | private Result compareRowwise(Permutation perm) {
int m = perm.size();
for (int i = 0; i < m - 1; i++) {
for (int j = i + 1; j < m; j++) {
int x = getConnectivity(best.get(i), best.get(j));
int y = getConnectivity(perm.get(i), perm.get(j));
if ... | java | private Result compareRowwise(Permutation perm) {
int m = perm.size();
for (int i = 0; i < m - 1; i++) {
for (int j = i + 1; j < m; j++) {
int x = getConnectivity(best.get(i), best.get(j));
int y = getConnectivity(perm.get(i), perm.get(j));
if ... | [
"private",
"Result",
"compareRowwise",
"(",
"Permutation",
"perm",
")",
"{",
"int",
"m",
"=",
"perm",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"m",
"-",
"1",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j"... | Check a permutation to see if it is better, equal, or worse than the
current best.
@param perm the permutation to check
@return BETTER, EQUAL, or WORSE | [
"Check",
"a",
"permutation",
"to",
"see",
"if",
"it",
"is",
"better",
"equal",
"or",
"worse",
"than",
"the",
"current",
"best",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/AbstractDiscretePartitionRefiner.java#L342-L353 |
113,718 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java | PermutationGroup.order | public long order() {
// A group may have a size larger than Integer.MAX_INTEGER
// (2 ** 32 - 1) - for example sym(13) is larger.
long total = 1;
for (int i = 0; i < size; i++) {
int sum = 0;
for (int j = 0; j < size; j++) {
if (this.permutations[... | java | public long order() {
// A group may have a size larger than Integer.MAX_INTEGER
// (2 ** 32 - 1) - for example sym(13) is larger.
long total = 1;
for (int i = 0; i < size; i++) {
int sum = 0;
for (int j = 0; j < size; j++) {
if (this.permutations[... | [
"public",
"long",
"order",
"(",
")",
"{",
"// A group may have a size larger than Integer.MAX_INTEGER",
"// (2 ** 32 - 1) - for example sym(13) is larger.",
"long",
"total",
"=",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"size",
";",
"i",
"++",
")... | Calculates the size of the group.
@return the (total) number of permutations in the group | [
"Calculates",
"the",
"size",
"of",
"the",
"group",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java#L198-L212 |
113,719 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java | PermutationGroup.transversal | public List<Permutation> transversal(final PermutationGroup subgroup) {
final long m = this.order() / subgroup.order();
final List<Permutation> results = new ArrayList<Permutation>();
Backtracker transversalBacktracker = new Backtracker() {
private boolean finished = false;
... | java | public List<Permutation> transversal(final PermutationGroup subgroup) {
final long m = this.order() / subgroup.order();
final List<Permutation> results = new ArrayList<Permutation>();
Backtracker transversalBacktracker = new Backtracker() {
private boolean finished = false;
... | [
"public",
"List",
"<",
"Permutation",
">",
"transversal",
"(",
"final",
"PermutationGroup",
"subgroup",
")",
"{",
"final",
"long",
"m",
"=",
"this",
".",
"order",
"(",
")",
"/",
"subgroup",
".",
"order",
"(",
")",
";",
"final",
"List",
"<",
"Permutation"... | Generate a transversal of a subgroup in this group.
@param subgroup the subgroup to use for the transversal
@return a list of permutations | [
"Generate",
"a",
"transversal",
"of",
"a",
"subgroup",
"in",
"this",
"group",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java#L247-L276 |
113,720 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java | PermutationGroup.all | public List<Permutation> all() {
final List<Permutation> permutations = new ArrayList<Permutation>();
Backtracker counter = new Backtracker() {
@Override
public void applyTo(Permutation p) {
permutations.add(p);
}
@Override
pu... | java | public List<Permutation> all() {
final List<Permutation> permutations = new ArrayList<Permutation>();
Backtracker counter = new Backtracker() {
@Override
public void applyTo(Permutation p) {
permutations.add(p);
}
@Override
pu... | [
"public",
"List",
"<",
"Permutation",
">",
"all",
"(",
")",
"{",
"final",
"List",
"<",
"Permutation",
">",
"permutations",
"=",
"new",
"ArrayList",
"<",
"Permutation",
">",
"(",
")",
";",
"Backtracker",
"counter",
"=",
"new",
"Backtracker",
"(",
")",
"{"... | Generate the whole group from the compact list of permutations.
@return a list of permutations | [
"Generate",
"the",
"whole",
"group",
"from",
"the",
"compact",
"list",
"of",
"permutations",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java#L308-L324 |
113,721 | cdk/cdk | tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java | PermutationGroup.enter | public void enter(Permutation g) {
int deg = size;
int i = test(g);
if (i == deg) {
return;
} else {
permutations[i][g.get(base.get(i))] = new Permutation(g);
}
for (int j = 0; j <= i; j++) {
for (int a = 0; a < deg; a++) {
... | java | public void enter(Permutation g) {
int deg = size;
int i = test(g);
if (i == deg) {
return;
} else {
permutations[i][g.get(base.get(i))] = new Permutation(g);
}
for (int j = 0; j <= i; j++) {
for (int a = 0; a < deg; a++) {
... | [
"public",
"void",
"enter",
"(",
"Permutation",
"g",
")",
"{",
"int",
"deg",
"=",
"size",
";",
"int",
"i",
"=",
"test",
"(",
"g",
")",
";",
"if",
"(",
"i",
"==",
"deg",
")",
"{",
"return",
";",
"}",
"else",
"{",
"permutations",
"[",
"i",
"]",
... | Enter the permutation g into this group.
@param g a permutation to add to the group | [
"Enter",
"the",
"permutation",
"g",
"into",
"this",
"group",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/PermutationGroup.java#L364-L382 |
113,722 | cdk/cdk | base/dict/src/main/java/org/openscience/cdk/dict/DictionaryDatabase.java | DictionaryDatabase.readDictionary | public void readDictionary(Reader reader, String name) {
name = name.toLowerCase();
logger.debug("Reading dictionary: ", name);
if (!dictionaries.containsKey(name)) {
try {
Dictionary dictionary = Dictionary.unmarshal(reader);
dictionaries.put(name, di... | java | public void readDictionary(Reader reader, String name) {
name = name.toLowerCase();
logger.debug("Reading dictionary: ", name);
if (!dictionaries.containsKey(name)) {
try {
Dictionary dictionary = Dictionary.unmarshal(reader);
dictionaries.put(name, di... | [
"public",
"void",
"readDictionary",
"(",
"Reader",
"reader",
",",
"String",
"name",
")",
"{",
"name",
"=",
"name",
".",
"toLowerCase",
"(",
")",
";",
"logger",
".",
"debug",
"(",
"\"Reading dictionary: \"",
",",
"name",
")",
";",
"if",
"(",
"!",
"diction... | Reads a custom dictionary into the database.
@param reader The reader from which the dictionary data will be read
@param name The name of the dictionary | [
"Reads",
"a",
"custom",
"dictionary",
"into",
"the",
"database",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/dict/src/main/java/org/openscience/cdk/dict/DictionaryDatabase.java#L112-L127 |
113,723 | cdk/cdk | base/dict/src/main/java/org/openscience/cdk/dict/DictionaryDatabase.java | DictionaryDatabase.hasEntry | public boolean hasEntry(String dictName, String entryID) {
if (hasDictionary(dictName)) {
Dictionary dictionary = (Dictionary) dictionaries.get(dictName);
return dictionary.hasEntry(entryID.toLowerCase());
} else {
return false;
}
} | java | public boolean hasEntry(String dictName, String entryID) {
if (hasDictionary(dictName)) {
Dictionary dictionary = (Dictionary) dictionaries.get(dictName);
return dictionary.hasEntry(entryID.toLowerCase());
} else {
return false;
}
} | [
"public",
"boolean",
"hasEntry",
"(",
"String",
"dictName",
",",
"String",
"entryID",
")",
"{",
"if",
"(",
"hasDictionary",
"(",
"dictName",
")",
")",
"{",
"Dictionary",
"dictionary",
"=",
"(",
"Dictionary",
")",
"dictionaries",
".",
"get",
"(",
"dictName",
... | Returns true if the given dictionary contains the given
entry. | [
"Returns",
"true",
"if",
"the",
"given",
"dictionary",
"contains",
"the",
"given",
"entry",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/dict/src/main/java/org/openscience/cdk/dict/DictionaryDatabase.java#L186-L193 |
113,724 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/Strand.java | Strand.removeMonomer | @Override
public void removeMonomer(String name) {
if (monomers.containsKey(name)) {
Monomer monomer = (Monomer) monomers.get(name);
this.remove(monomer);
monomers.remove(name);
}
} | java | @Override
public void removeMonomer(String name) {
if (monomers.containsKey(name)) {
Monomer monomer = (Monomer) monomers.get(name);
this.remove(monomer);
monomers.remove(name);
}
} | [
"@",
"Override",
"public",
"void",
"removeMonomer",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"monomers",
".",
"containsKey",
"(",
"name",
")",
")",
"{",
"Monomer",
"monomer",
"=",
"(",
"Monomer",
")",
"monomers",
".",
"get",
"(",
"name",
")",
";",
... | Removes a particular monomer, specified by its name.
@param name The name of the monomer to remove | [
"Removes",
"a",
"particular",
"monomer",
"specified",
"by",
"its",
"name",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Strand.java#L218-L225 |
113,725 | cdk/cdk | descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IsProtonInConjugatedPiSystemDescriptor.java | IsProtonInConjugatedPiSystemDescriptor.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 evaluates if a proton is joined to a conjugated system.
@param atom The IAtom for which the DescriptorValue is requested
@param atomContainer AtomContainer
@return true if the proton is bonded to a conjugated system | [
"The",
"method",
"is",
"a",
"proton",
"descriptor",
"that",
"evaluates",
"if",
"a",
"proton",
"is",
"joined",
"to",
"a",
"conjugated",
"system",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/IsProtonInConjugatedPiSystemDescriptor.java#L128-L169 |
113,726 | cdk/cdk | tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreMatcher.java | PharmacophoreMatcher.matches | public boolean matches(IAtomContainer atomContainer, boolean initializeTarget) throws CDKException {
if (!GeometryUtil.has3DCoordinates(atomContainer)) throw new CDKException("Molecule must have 3D coordinates");
if (pharmacophoreQuery == null) throw new CDKException("Must set the query pharmacophore be... | java | public boolean matches(IAtomContainer atomContainer, boolean initializeTarget) throws CDKException {
if (!GeometryUtil.has3DCoordinates(atomContainer)) throw new CDKException("Molecule must have 3D coordinates");
if (pharmacophoreQuery == null) throw new CDKException("Must set the query pharmacophore be... | [
"public",
"boolean",
"matches",
"(",
"IAtomContainer",
"atomContainer",
",",
"boolean",
"initializeTarget",
")",
"throws",
"CDKException",
"{",
"if",
"(",
"!",
"GeometryUtil",
".",
"has3DCoordinates",
"(",
"atomContainer",
")",
")",
"throw",
"new",
"CDKException",
... | Performs the pharmacophore matching.
@param atomContainer The target molecule. Must have 3D coordinates
@param initializeTarget If <i>true</i>, the target molecule specified in the
first argument will be analyzed to identify matching pharmacophore groups. If <i>false</i>
this is not performed. The latter case is on... | [
"Performs",
"the",
"pharmacophore",
"matching",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreMatcher.java#L203-L237 |
113,727 | cdk/cdk | tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreMatcher.java | PharmacophoreMatcher.getMatchingPharmacophoreBonds | public List<List<IBond>> getMatchingPharmacophoreBonds() {
if (mappings == null) return null;
// XXX: re-subsearching the query
List<List<IBond>> bonds = new ArrayList<>();
for (Map<IBond,IBond> map : mappings.toBondMap()) {
bonds.add(new ArrayList<>(map.values()));
... | java | public List<List<IBond>> getMatchingPharmacophoreBonds() {
if (mappings == null) return null;
// XXX: re-subsearching the query
List<List<IBond>> bonds = new ArrayList<>();
for (Map<IBond,IBond> map : mappings.toBondMap()) {
bonds.add(new ArrayList<>(map.values()));
... | [
"public",
"List",
"<",
"List",
"<",
"IBond",
">",
">",
"getMatchingPharmacophoreBonds",
"(",
")",
"{",
"if",
"(",
"mappings",
"==",
"null",
")",
"return",
"null",
";",
"// XXX: re-subsearching the query",
"List",
"<",
"List",
"<",
"IBond",
">",
">",
"bonds",... | Get the matching pharmacophore constraints.
The method should be called after performing the match, otherwise the return value is null.
The method returns a List of List's. Each List represents the pharmacophore constraints in the
target molecule that matched the query. Since constraints are conceptually modeled on bo... | [
"Get",
"the",
"matching",
"pharmacophore",
"constraints",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreMatcher.java#L252-L262 |
113,728 | cdk/cdk | tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreMatcher.java | PharmacophoreMatcher.getTargetQueryBondMappings | public List<HashMap<IBond, IBond>> getTargetQueryBondMappings() {
if (mappings == null) return null;
List<HashMap<IBond,IBond>> bondMap = new ArrayList<>();
// query -> target so need to inverse the mapping
// XXX: re-subsearching the query
for (Map<IBond,IBond>... | java | public List<HashMap<IBond, IBond>> getTargetQueryBondMappings() {
if (mappings == null) return null;
List<HashMap<IBond,IBond>> bondMap = new ArrayList<>();
// query -> target so need to inverse the mapping
// XXX: re-subsearching the query
for (Map<IBond,IBond>... | [
"public",
"List",
"<",
"HashMap",
"<",
"IBond",
",",
"IBond",
">",
">",
"getTargetQueryBondMappings",
"(",
")",
"{",
"if",
"(",
"mappings",
"==",
"null",
")",
"return",
"null",
";",
"List",
"<",
"HashMap",
"<",
"IBond",
",",
"IBond",
">",
">",
"bondMap... | Return a list of HashMap's that allows one to get the query constraint for a given pharmacophore bond.
If the matching is successful, the return value is a List of HashMaps, each
HashMap corresponding to a separate match. Each HashMap is keyed on the {@link org.openscience.cdk.pharmacophore.PharmacophoreBond}
in the t... | [
"Return",
"a",
"list",
"of",
"HashMap",
"s",
"that",
"allows",
"one",
"to",
"get",
"the",
"query",
"constraint",
"for",
"a",
"given",
"pharmacophore",
"bond",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreMatcher.java#L275-L287 |
113,729 | cdk/cdk | tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreMatcher.java | PharmacophoreMatcher.getMatchingPharmacophoreAtoms | public List<List<PharmacophoreAtom>> getMatchingPharmacophoreAtoms() {
if (pharmacophoreMolecule == null || mappings == null) return null;
return getPCoreAtoms(mappings);
} | java | public List<List<PharmacophoreAtom>> getMatchingPharmacophoreAtoms() {
if (pharmacophoreMolecule == null || mappings == null) return null;
return getPCoreAtoms(mappings);
} | [
"public",
"List",
"<",
"List",
"<",
"PharmacophoreAtom",
">",
">",
"getMatchingPharmacophoreAtoms",
"(",
")",
"{",
"if",
"(",
"pharmacophoreMolecule",
"==",
"null",
"||",
"mappings",
"==",
"null",
")",
"return",
"null",
";",
"return",
"getPCoreAtoms",
"(",
"ma... | Get the matching pharmacophore groups.
The method should be called after performing the match, otherwise the return value is null.
The method returns a List of List's. Each List represents the pharmacophore groups in the
target molecule that matched the query. Each pharmacophore group contains the indices of the
atoms... | [
"Get",
"the",
"matching",
"pharmacophore",
"groups",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreMatcher.java#L300-L303 |
113,730 | cdk/cdk | tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreMatcher.java | PharmacophoreMatcher.getUniqueMatchingPharmacophoreAtoms | public List<List<PharmacophoreAtom>> getUniqueMatchingPharmacophoreAtoms() {
if (pharmacophoreMolecule == null || mappings == null) return null;
return getPCoreAtoms(mappings.uniqueAtoms());
} | java | public List<List<PharmacophoreAtom>> getUniqueMatchingPharmacophoreAtoms() {
if (pharmacophoreMolecule == null || mappings == null) return null;
return getPCoreAtoms(mappings.uniqueAtoms());
} | [
"public",
"List",
"<",
"List",
"<",
"PharmacophoreAtom",
">",
">",
"getUniqueMatchingPharmacophoreAtoms",
"(",
")",
"{",
"if",
"(",
"pharmacophoreMolecule",
"==",
"null",
"||",
"mappings",
"==",
"null",
")",
"return",
"null",
";",
"return",
"getPCoreAtoms",
"(",... | Get the uniue matching pharmacophore groups.
The method should be called after performing the match, otherwise the return value is null.
The method returns a List of List's. Each List represents the pharmacophore groups in the
target molecule that matched the query. Each pharmacophore group contains the indices of the... | [
"Get",
"the",
"uniue",
"matching",
"pharmacophore",
"groups",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreMatcher.java#L318-L321 |
113,731 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/tools/DeAromatizationTool.java | DeAromatizationTool.deAromatize | public static boolean deAromatize(IRing ring) {
boolean allaromatic = true;
for (int i = 0; i < ring.getBondCount(); i++) {
if (!ring.getBond(i).getFlag(CDKConstants.ISAROMATIC)) allaromatic = false;
}
if (!allaromatic) return false;
for (int i = 0; i < ring.getBondCo... | java | public static boolean deAromatize(IRing ring) {
boolean allaromatic = true;
for (int i = 0; i < ring.getBondCount(); i++) {
if (!ring.getBond(i).getFlag(CDKConstants.ISAROMATIC)) allaromatic = false;
}
if (!allaromatic) return false;
for (int i = 0; i < ring.getBondCo... | [
"public",
"static",
"boolean",
"deAromatize",
"(",
"IRing",
"ring",
")",
"{",
"boolean",
"allaromatic",
"=",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ring",
".",
"getBondCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
... | Methods that takes a ring of which all bonds are aromatic, and assigns single
and double bonds. It does this in a non-general way by looking at the ring
size and take everything as a special case.
@param ring Ring to dearomatize
@return False if it could not convert the aromatic ring bond into single and double bonds | [
"Methods",
"that",
"takes",
"a",
"ring",
"of",
"which",
"all",
"bonds",
"are",
"aromatic",
"and",
"assigns",
"single",
"and",
"double",
"bonds",
".",
"It",
"does",
"this",
"in",
"a",
"non",
"-",
"general",
"way",
"by",
"looking",
"at",
"the",
"ring",
"... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/tools/DeAromatizationTool.java#L66-L93 |
113,732 | cdk/cdk | descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GSR.java | RDFProtonDescriptor_GSR.calculateAngleBetweenTwoLines | private double calculateAngleBetweenTwoLines(Vector3d a, Vector3d b, Vector3d c, Vector3d d) {
Vector3d firstLine = new Vector3d();
firstLine.sub(a, b);
Vector3d secondLine = new Vector3d();
secondLine.sub(c, d);
Vector3d firstVec = new Vector3d(firstLine);
Vector3d secon... | java | private double calculateAngleBetweenTwoLines(Vector3d a, Vector3d b, Vector3d c, Vector3d d) {
Vector3d firstLine = new Vector3d();
firstLine.sub(a, b);
Vector3d secondLine = new Vector3d();
secondLine.sub(c, d);
Vector3d firstVec = new Vector3d(firstLine);
Vector3d secon... | [
"private",
"double",
"calculateAngleBetweenTwoLines",
"(",
"Vector3d",
"a",
",",
"Vector3d",
"b",
",",
"Vector3d",
"c",
",",
"Vector3d",
"d",
")",
"{",
"Vector3d",
"firstLine",
"=",
"new",
"Vector3d",
"(",
")",
";",
"firstLine",
".",
"sub",
"(",
"a",
",",
... | this method calculates the angle between two bonds given coordinates of their atoms | [
"this",
"method",
"calculates",
"the",
"angle",
"between",
"two",
"bonds",
"given",
"coordinates",
"of",
"their",
"atoms"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GSR.java#L500-L508 |
113,733 | cdk/cdk | descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GSR.java | RDFProtonDescriptor_GSR.calculateDistanceBetweenTwoAtoms | private double calculateDistanceBetweenTwoAtoms(IAtom atom1, IAtom atom2) {
double distance;
Point3d firstPoint = atom1.getPoint3d();
Point3d secondPoint = atom2.getPoint3d();
distance = firstPoint.distance(secondPoint);
return distance;
} | java | private double calculateDistanceBetweenTwoAtoms(IAtom atom1, IAtom atom2) {
double distance;
Point3d firstPoint = atom1.getPoint3d();
Point3d secondPoint = atom2.getPoint3d();
distance = firstPoint.distance(secondPoint);
return distance;
} | [
"private",
"double",
"calculateDistanceBetweenTwoAtoms",
"(",
"IAtom",
"atom1",
",",
"IAtom",
"atom2",
")",
"{",
"double",
"distance",
";",
"Point3d",
"firstPoint",
"=",
"atom1",
".",
"getPoint3d",
"(",
")",
";",
"Point3d",
"secondPoint",
"=",
"atom2",
".",
"g... | generic method for calculation of distance btw 2 atoms | [
"generic",
"method",
"for",
"calculation",
"of",
"distance",
"btw",
"2",
"atoms"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GSR.java#L531-L537 |
113,734 | cdk/cdk | descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GSR.java | RDFProtonDescriptor_GSR.calculateDistanceBetweenAtomAndBond | private double[] calculateDistanceBetweenAtomAndBond(IAtom proton, IBond theBond) {
Point3d middlePoint = theBond.get3DCenter();
Point3d protonPoint = proton.getPoint3d();
double[] values = new double[4];
values[0] = middlePoint.distance(protonPoint);
values[1] = middlePoint.x;
... | java | private double[] calculateDistanceBetweenAtomAndBond(IAtom proton, IBond theBond) {
Point3d middlePoint = theBond.get3DCenter();
Point3d protonPoint = proton.getPoint3d();
double[] values = new double[4];
values[0] = middlePoint.distance(protonPoint);
values[1] = middlePoint.x;
... | [
"private",
"double",
"[",
"]",
"calculateDistanceBetweenAtomAndBond",
"(",
"IAtom",
"proton",
",",
"IBond",
"theBond",
")",
"{",
"Point3d",
"middlePoint",
"=",
"theBond",
".",
"get3DCenter",
"(",
")",
";",
"Point3d",
"protonPoint",
"=",
"proton",
".",
"getPoint3... | and returns distance and coordinates of middle point | [
"and",
"returns",
"distance",
"and",
"coordinates",
"of",
"middle",
"point"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GSR.java#L571-L580 |
113,735 | cdk/cdk | descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GSR.java | RDFProtonDescriptor_GSR.getParameterType | @Override
public Object getParameterType(String name) {
if (name.equals("checkAromaticity")) return Boolean.TRUE;
return null;
} | java | @Override
public Object getParameterType(String name) {
if (name.equals("checkAromaticity")) return Boolean.TRUE;
return null;
} | [
"@",
"Override",
"public",
"Object",
"getParameterType",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"name",
".",
"equals",
"(",
"\"checkAromaticity\"",
")",
")",
"return",
"Boolean",
".",
"TRUE",
";",
"return",
"null",
";",
"}"
] | Gets the parameterType attribute of the RDFProtonDescriptor
object
@param name Description of the Parameter
@return The parameterType value | [
"Gets",
"the",
"parameterType",
"attribute",
"of",
"the",
"RDFProtonDescriptor",
"object"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GSR.java#L602-L606 |
113,736 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java | AdductFormula.add | @Override
public void add(IMolecularFormulaSet formulaSet) {
for (IMolecularFormula mf : formulaSet.molecularFormulas()) {
addMolecularFormula(mf);
}
} | java | @Override
public void add(IMolecularFormulaSet formulaSet) {
for (IMolecularFormula mf : formulaSet.molecularFormulas()) {
addMolecularFormula(mf);
}
} | [
"@",
"Override",
"public",
"void",
"add",
"(",
"IMolecularFormulaSet",
"formulaSet",
")",
"{",
"for",
"(",
"IMolecularFormula",
"mf",
":",
"formulaSet",
".",
"molecularFormulas",
"(",
")",
")",
"{",
"addMolecularFormula",
"(",
"mf",
")",
";",
"}",
"}"
] | Adds all molecularFormulas in the AdductFormula to this chemObject.
@param formulaSet The MolecularFormulaSet | [
"Adds",
"all",
"molecularFormulas",
"in",
"the",
"AdductFormula",
"to",
"this",
"chemObject",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java#L98-L104 |
113,737 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java | AdductFormula.contains | @Override
public boolean contains(IIsotope isotope) {
for (Iterator<IIsotope> it = isotopes().iterator(); it.hasNext();) {
IIsotope thisIsotope = it.next();
if (isTheSame(thisIsotope, isotope)) {
return true;
}
}
return false;
} | java | @Override
public boolean contains(IIsotope isotope) {
for (Iterator<IIsotope> it = isotopes().iterator(); it.hasNext();) {
IIsotope thisIsotope = it.next();
if (isTheSame(thisIsotope, isotope)) {
return true;
}
}
return false;
} | [
"@",
"Override",
"public",
"boolean",
"contains",
"(",
"IIsotope",
"isotope",
")",
"{",
"for",
"(",
"Iterator",
"<",
"IIsotope",
">",
"it",
"=",
"isotopes",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"I... | True, if the AdductFormula contains the given IIsotope object and not
the instance. The method looks for other isotopes which has the same
symbol, natural abundance and exact mass.
@param isotope The IIsotope this AdductFormula is searched for
@return True, if the AdductFormula contains the given isotope ob... | [
"True",
"if",
"the",
"AdductFormula",
"contains",
"the",
"given",
"IIsotope",
"object",
"and",
"not",
"the",
"instance",
".",
"The",
"method",
"looks",
"for",
"other",
"isotopes",
"which",
"has",
"the",
"same",
"symbol",
"natural",
"abundance",
"and",
"exact",... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java#L114-L123 |
113,738 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java | AdductFormula.getCharge | @Override
public Integer getCharge() {
Integer charge = 0;
Iterator<IMolecularFormula> componentIterator = components.iterator();
while (componentIterator.hasNext()) {
charge += componentIterator.next().getCharge();
}
return charge;
} | java | @Override
public Integer getCharge() {
Integer charge = 0;
Iterator<IMolecularFormula> componentIterator = components.iterator();
while (componentIterator.hasNext()) {
charge += componentIterator.next().getCharge();
}
return charge;
} | [
"@",
"Override",
"public",
"Integer",
"getCharge",
"(",
")",
"{",
"Integer",
"charge",
"=",
"0",
";",
"Iterator",
"<",
"IMolecularFormula",
">",
"componentIterator",
"=",
"components",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"componentIterator",
".",
"... | Returns the partial charge of this Adduct. If the charge
has not been set the return value is Double.NaN.
@return the charge of this Adduct
@see #setCharge | [
"Returns",
"the",
"partial",
"charge",
"of",
"this",
"Adduct",
".",
"If",
"the",
"charge",
"has",
"not",
"been",
"set",
"the",
"return",
"value",
"is",
"Double",
".",
"NaN",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java#L133-L141 |
113,739 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java | AdductFormula.getIsotopeCount | @Override
public int getIsotopeCount(IIsotope isotope) {
int count = 0;
Iterator<IMolecularFormula> componentIterator = components.iterator();
while (componentIterator.hasNext()) {
count += componentIterator.next().getIsotopeCount(isotope);
}
return count;
} | java | @Override
public int getIsotopeCount(IIsotope isotope) {
int count = 0;
Iterator<IMolecularFormula> componentIterator = components.iterator();
while (componentIterator.hasNext()) {
count += componentIterator.next().getIsotopeCount(isotope);
}
return count;
} | [
"@",
"Override",
"public",
"int",
"getIsotopeCount",
"(",
"IIsotope",
"isotope",
")",
"{",
"int",
"count",
"=",
"0",
";",
"Iterator",
"<",
"IMolecularFormula",
">",
"componentIterator",
"=",
"components",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"compon... | Checks a set of Nodes for the occurrence of the isotope in the
adduct formula from a particular isotope. It returns 0 if the does not exist.
@param isotope The IIsotope to look for
@return The occurrence of this isotope in this adduct
@see #getIsotopeCount() | [
"Checks",
"a",
"set",
"of",
"Nodes",
"for",
"the",
"occurrence",
"of",
"the",
"isotope",
"in",
"the",
"adduct",
"formula",
"from",
"a",
"particular",
"isotope",
".",
"It",
"returns",
"0",
"if",
"the",
"does",
"not",
"exist",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java#L151-L159 |
113,740 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java | AdductFormula.isotopes | @Override
public Iterable<IIsotope> isotopes() {
return new Iterable<IIsotope>() {
@Override
public Iterator<IIsotope> iterator() {
return isotopesList().iterator();
}
};
} | java | @Override
public Iterable<IIsotope> isotopes() {
return new Iterable<IIsotope>() {
@Override
public Iterator<IIsotope> iterator() {
return isotopesList().iterator();
}
};
} | [
"@",
"Override",
"public",
"Iterable",
"<",
"IIsotope",
">",
"isotopes",
"(",
")",
"{",
"return",
"new",
"Iterable",
"<",
"IIsotope",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Iterator",
"<",
"IIsotope",
">",
"iterator",
"(",
")",
"{",
"return",
... | Returns an Iterator for looping over all isotopes in this adduct formula.
@return An Iterator with the isotopes in this adduct formula | [
"Returns",
"an",
"Iterator",
"for",
"looping",
"over",
"all",
"isotopes",
"in",
"this",
"adduct",
"formula",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java#L178-L187 |
113,741 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java | AdductFormula.isotopesList | private List<IIsotope> isotopesList() {
List<IIsotope> isotopes = new ArrayList<IIsotope>();
Iterator<IMolecularFormula> componentIterator = components.iterator();
while (componentIterator.hasNext()) {
Iterator<IIsotope> compIsotopes = componentIterator.next().isotopes().iterator();
... | java | private List<IIsotope> isotopesList() {
List<IIsotope> isotopes = new ArrayList<IIsotope>();
Iterator<IMolecularFormula> componentIterator = components.iterator();
while (componentIterator.hasNext()) {
Iterator<IIsotope> compIsotopes = componentIterator.next().isotopes().iterator();
... | [
"private",
"List",
"<",
"IIsotope",
">",
"isotopesList",
"(",
")",
"{",
"List",
"<",
"IIsotope",
">",
"isotopes",
"=",
"new",
"ArrayList",
"<",
"IIsotope",
">",
"(",
")",
";",
"Iterator",
"<",
"IMolecularFormula",
">",
"componentIterator",
"=",
"components",... | Returns a List for looping over all isotopes in this adduct formula.
@return A List with the isotopes in this adduct formula | [
"Returns",
"a",
"List",
"for",
"looping",
"over",
"all",
"isotopes",
"in",
"this",
"adduct",
"formula",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/AdductFormula.java#L194-L207 |
113,742 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/rules/ChargeRule.java | ChargeRule.setParameters | @Override
public void setParameters(Object[] params) throws CDKException {
if (params.length != 1) throw new CDKException("ChargeRule expects only one parameter");
if (!(params[0] instanceof Double)) throw new CDKException("The parameter must be of type Double");
charge = (Double) params[0... | java | @Override
public void setParameters(Object[] params) throws CDKException {
if (params.length != 1) throw new CDKException("ChargeRule expects only one parameter");
if (!(params[0] instanceof Double)) throw new CDKException("The parameter must be of type Double");
charge = (Double) params[0... | [
"@",
"Override",
"public",
"void",
"setParameters",
"(",
"Object",
"[",
"]",
"params",
")",
"throws",
"CDKException",
"{",
"if",
"(",
"params",
".",
"length",
"!=",
"1",
")",
"throw",
"new",
"CDKException",
"(",
"\"ChargeRule expects only one parameter\"",
")",
... | Sets the parameters attribute of the ChargeRule object.
@param params The new parameters value
@throws CDKException Description of the Exception
@see #getParameters | [
"Sets",
"the",
"parameters",
"attribute",
"of",
"the",
"ChargeRule",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/ChargeRule.java#L69-L76 |
113,743 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/rules/ChargeRule.java | ChargeRule.validate | @Override
public double validate(IMolecularFormula formula) throws CDKException {
logger.info("Start validation of ", formula);
if (formula.getCharge() == null) {
return 0.0;
} else if (formula.getCharge() == charge) {
return 1.0;
} else {
return ... | java | @Override
public double validate(IMolecularFormula formula) throws CDKException {
logger.info("Start validation of ", formula);
if (formula.getCharge() == null) {
return 0.0;
} else if (formula.getCharge() == charge) {
return 1.0;
} else {
return ... | [
"@",
"Override",
"public",
"double",
"validate",
"(",
"IMolecularFormula",
"formula",
")",
"throws",
"CDKException",
"{",
"logger",
".",
"info",
"(",
"\"Start validation of \"",
",",
"formula",
")",
";",
"if",
"(",
"formula",
".",
"getCharge",
"(",
")",
"==",
... | Validate the charge of this IMolecularFormula.
@param formula Parameter is the IMolecularFormula
@return A double value meaning 1.0 True, 0.0 False | [
"Validate",
"the",
"charge",
"of",
"this",
"IMolecularFormula",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/ChargeRule.java#L99-L110 |
113,744 | cdk/cdk | storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java | BeamToCDK.findDirectionalEdge | private Edge findDirectionalEdge(Graph g, int u) {
List<Edge> edges = g.edges(u);
if (edges.size() == 1)
return null;
Edge first = null;
for (Edge e : edges) {
Bond b = e.bond();
if (b == Bond.UP || b == Bond.DOWN) {
if (first == null)
... | java | private Edge findDirectionalEdge(Graph g, int u) {
List<Edge> edges = g.edges(u);
if (edges.size() == 1)
return null;
Edge first = null;
for (Edge e : edges) {
Bond b = e.bond();
if (b == Bond.UP || b == Bond.DOWN) {
if (first == null)
... | [
"private",
"Edge",
"findDirectionalEdge",
"(",
"Graph",
"g",
",",
"int",
"u",
")",
"{",
"List",
"<",
"Edge",
">",
"edges",
"=",
"g",
".",
"edges",
"(",
"u",
")",
";",
"if",
"(",
"edges",
".",
"size",
"(",
")",
"==",
"1",
")",
"return",
"null",
... | Utility for find the first directional edge incident to a vertex. If
there are no directional labels then null is returned.
@param g graph from Beam
@param u the vertex for which to find
@return first directional edge (or null if none) | [
"Utility",
"for",
"find",
"the",
"first",
"directional",
"edge",
"incident",
"to",
"a",
"vertex",
".",
"If",
"there",
"are",
"no",
"directional",
"labels",
"then",
"null",
"is",
"returned",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java#L419-L434 |
113,745 | cdk/cdk | storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java | BeamToCDK.newTetrahedral | private IStereoElement newTetrahedral(int u, int[] vs, IAtom[] atoms, Configuration c) {
// no way to handle tetrahedral configurations with implicit
// hydrogen or lone pair at the moment
if (vs.length != 4) {
// sanity check
if (vs.length != 3) return null;
... | java | private IStereoElement newTetrahedral(int u, int[] vs, IAtom[] atoms, Configuration c) {
// no way to handle tetrahedral configurations with implicit
// hydrogen or lone pair at the moment
if (vs.length != 4) {
// sanity check
if (vs.length != 3) return null;
... | [
"private",
"IStereoElement",
"newTetrahedral",
"(",
"int",
"u",
",",
"int",
"[",
"]",
"vs",
",",
"IAtom",
"[",
"]",
"atoms",
",",
"Configuration",
"c",
")",
"{",
"// no way to handle tetrahedral configurations with implicit",
"// hydrogen or lone pair at the moment",
"i... | Creates a tetrahedral element for the given configuration. Currently only
tetrahedral centres with 4 explicit atoms are handled.
@param u central atom
@param vs neighboring atom indices (in order)
@param atoms array of the CDK atoms (pre-converted)
@param c the configuration of the neighbors (vs) for the or... | [
"Creates",
"a",
"tetrahedral",
"element",
"for",
"the",
"given",
"configuration",
".",
"Currently",
"only",
"tetrahedral",
"centres",
"with",
"4",
"explicit",
"atoms",
"are",
"handled",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java#L447-L466 |
113,746 | cdk/cdk | storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java | BeamToCDK.insert | private static int[] insert(int v, int[] vs) {
final int n = vs.length;
final int[] ws = Arrays.copyOf(vs, n + 1);
ws[n] = v;
// insert 'u' in to sorted position
for (int i = n; i > 0 && ws[i] < ws[i - 1]; i--) {
int tmp = ws[i];
ws[i] = ws[i - 1];
... | java | private static int[] insert(int v, int[] vs) {
final int n = vs.length;
final int[] ws = Arrays.copyOf(vs, n + 1);
ws[n] = v;
// insert 'u' in to sorted position
for (int i = n; i > 0 && ws[i] < ws[i - 1]; i--) {
int tmp = ws[i];
ws[i] = ws[i - 1];
... | [
"private",
"static",
"int",
"[",
"]",
"insert",
"(",
"int",
"v",
",",
"int",
"[",
"]",
"vs",
")",
"{",
"final",
"int",
"n",
"=",
"vs",
".",
"length",
";",
"final",
"int",
"[",
"]",
"ws",
"=",
"Arrays",
".",
"copyOf",
"(",
"vs",
",",
"n",
"+",... | Insert the vertex 'v' into sorted position in the array 'vs'.
@param v a vertex (int id)
@param vs array of vertices (int ids)
@return array with 'u' inserted in sorted order | [
"Insert",
"the",
"vertex",
"v",
"into",
"sorted",
"position",
"in",
"the",
"array",
"vs",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java#L580-L594 |
113,747 | cdk/cdk | storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java | BeamToCDK.createAtom | private IAtom createAtom(Element element) {
IAtom atom = builder.newAtom();
atom.setSymbol(element.symbol());
atom.setAtomicNumber(element.atomicNumber());
return atom;
} | java | private IAtom createAtom(Element element) {
IAtom atom = builder.newAtom();
atom.setSymbol(element.symbol());
atom.setAtomicNumber(element.atomicNumber());
return atom;
} | [
"private",
"IAtom",
"createAtom",
"(",
"Element",
"element",
")",
"{",
"IAtom",
"atom",
"=",
"builder",
".",
"newAtom",
"(",
")",
";",
"atom",
".",
"setSymbol",
"(",
"element",
".",
"symbol",
"(",
")",
")",
";",
"atom",
".",
"setAtomicNumber",
"(",
"el... | Create a new atom for the provided symbol. The atom is created by cloning
an existing 'template'. Unfortunately IChemObjectBuilders really show a
slow down when SMILES processing.
@param element Beam element
@return new atom with configured symbol and atomic number | [
"Create",
"a",
"new",
"atom",
"for",
"the",
"provided",
"symbol",
".",
"The",
"atom",
"is",
"created",
"by",
"cloning",
"an",
"existing",
"template",
".",
"Unfortunately",
"IChemObjectBuilders",
"really",
"show",
"a",
"slow",
"down",
"when",
"SMILES",
"process... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java#L655-L660 |
113,748 | cdk/cdk | base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java | SmilesValencyChecker.saturate | @Override
public void saturate(IAtomContainer atomContainer) throws CDKException {
logger.info("Saturating atomContainer by adjusting bond orders...");
boolean allSaturated = allSaturated(atomContainer);
if (!allSaturated) {
logger.info("Saturating bond orders is needed...");
... | java | @Override
public void saturate(IAtomContainer atomContainer) throws CDKException {
logger.info("Saturating atomContainer by adjusting bond orders...");
boolean allSaturated = allSaturated(atomContainer);
if (!allSaturated) {
logger.info("Saturating bond orders is needed...");
... | [
"@",
"Override",
"public",
"void",
"saturate",
"(",
"IAtomContainer",
"atomContainer",
")",
"throws",
"CDKException",
"{",
"logger",
".",
"info",
"(",
"\"Saturating atomContainer by adjusting bond orders...\"",
")",
";",
"boolean",
"allSaturated",
"=",
"allSaturated",
"... | Saturates a molecule by setting appropriate bond orders.
@cdk.keyword bond order, calculation
@cdk.created 2003-10-03 | [
"Saturates",
"a",
"molecule",
"by",
"setting",
"appropriate",
"bond",
"orders",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java#L70-L84 |
113,749 | cdk/cdk | base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java | SmilesValencyChecker.saturate | public boolean saturate(IBond[] bonds, IAtomContainer atomContainer) throws CDKException {
logger.debug("Saturating bond set of size: ", bonds.length);
boolean bondsAreFullySaturated = false;
if (bonds.length > 0) {
IBond bond = bonds[0];
// determine bonds left
... | java | public boolean saturate(IBond[] bonds, IAtomContainer atomContainer) throws CDKException {
logger.debug("Saturating bond set of size: ", bonds.length);
boolean bondsAreFullySaturated = false;
if (bonds.length > 0) {
IBond bond = bonds[0];
// determine bonds left
... | [
"public",
"boolean",
"saturate",
"(",
"IBond",
"[",
"]",
"bonds",
",",
"IAtomContainer",
"atomContainer",
")",
"throws",
"CDKException",
"{",
"logger",
".",
"debug",
"(",
"\"Saturating bond set of size: \"",
",",
"bonds",
".",
"length",
")",
";",
"boolean",
"bon... | Saturates a set of Bonds in an AtomContainer. | [
"Saturates",
"a",
"set",
"of",
"Bonds",
"in",
"an",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java#L89-L133 |
113,750 | cdk/cdk | base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java | SmilesValencyChecker.saturateByIncreasingBondOrder | public boolean saturateByIncreasingBondOrder(IBond bond, IAtomContainer atomContainer) throws CDKException {
IAtom[] atoms = BondManipulator.getAtomArray(bond);
IAtom atom = atoms[0];
IAtom partner = atoms[1];
logger.debug(" saturating bond: ", atom.getSymbol(), "-", partner.getSymbol()... | java | public boolean saturateByIncreasingBondOrder(IBond bond, IAtomContainer atomContainer) throws CDKException {
IAtom[] atoms = BondManipulator.getAtomArray(bond);
IAtom atom = atoms[0];
IAtom partner = atoms[1];
logger.debug(" saturating bond: ", atom.getSymbol(), "-", partner.getSymbol()... | [
"public",
"boolean",
"saturateByIncreasingBondOrder",
"(",
"IBond",
"bond",
",",
"IAtomContainer",
"atomContainer",
")",
"throws",
"CDKException",
"{",
"IAtom",
"[",
"]",
"atoms",
"=",
"BondManipulator",
".",
"getAtomArray",
"(",
"bond",
")",
";",
"IAtom",
"atom",... | Tries to saturate a bond by increasing its bond orders by 1.0.
@return true if the bond could be increased | [
"Tries",
"to",
"saturate",
"a",
"bond",
"by",
"increasing",
"its",
"bond",
"orders",
"by",
"1",
".",
"0",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java#L164-L192 |
113,751 | cdk/cdk | base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java | SmilesValencyChecker.couldMatchAtomType | public boolean couldMatchAtomType(IAtom atom, double bondOrderSum, IBond.Order maxBondOrder, IAtomType type) {
logger.debug("couldMatchAtomType: ... matching atom ", atom, " vs ", type);
int hcount = atom.getImplicitHydrogenCount();
int charge = atom.getFormalCharge();
if (charge == ty... | java | public boolean couldMatchAtomType(IAtom atom, double bondOrderSum, IBond.Order maxBondOrder, IAtomType type) {
logger.debug("couldMatchAtomType: ... matching atom ", atom, " vs ", type);
int hcount = atom.getImplicitHydrogenCount();
int charge = atom.getFormalCharge();
if (charge == ty... | [
"public",
"boolean",
"couldMatchAtomType",
"(",
"IAtom",
"atom",
",",
"double",
"bondOrderSum",
",",
"IBond",
".",
"Order",
"maxBondOrder",
",",
"IAtomType",
"type",
")",
"{",
"logger",
".",
"debug",
"(",
"\"couldMatchAtomType: ... matching atom \"",
",",
"atom",
... | Determines if the atom can be of type AtomType. That is, it sees if this
AtomType only differs in bond orders, or implicit hydrogen count. | [
"Determines",
"if",
"the",
"atom",
"can",
"be",
"of",
"type",
"AtomType",
".",
"That",
"is",
"it",
"sees",
"if",
"this",
"AtomType",
"only",
"differs",
"in",
"bond",
"orders",
"or",
"implicit",
"hydrogen",
"count",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java#L232-L256 |
113,752 | cdk/cdk | base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java | SmilesValencyChecker.calculateNumberOfImplicitHydrogens | public int calculateNumberOfImplicitHydrogens(IAtom atom, double bondOrderSum, IBond.Order maxBondOrder,
int neighbourCount) throws CDKException {
int missingHydrogens = 0;
if (atom instanceof IPseudoAtom) {
logger.debug("don't figure it out... it simply does not lack H's");
... | java | public int calculateNumberOfImplicitHydrogens(IAtom atom, double bondOrderSum, IBond.Order maxBondOrder,
int neighbourCount) throws CDKException {
int missingHydrogens = 0;
if (atom instanceof IPseudoAtom) {
logger.debug("don't figure it out... it simply does not lack H's");
... | [
"public",
"int",
"calculateNumberOfImplicitHydrogens",
"(",
"IAtom",
"atom",
",",
"double",
"bondOrderSum",
",",
"IBond",
".",
"Order",
"maxBondOrder",
",",
"int",
"neighbourCount",
")",
"throws",
"CDKException",
"{",
"int",
"missingHydrogens",
"=",
"0",
";",
"if"... | Calculates the number of hydrogens that can be added to the given atom to fullfil
the atom's valency. It will return 0 for PseudoAtoms, and for atoms for which it
does not have an entry in the configuration file. | [
"Calculates",
"the",
"number",
"of",
"hydrogens",
"that",
"can",
"be",
"added",
"to",
"the",
"given",
"atom",
"to",
"fullfil",
"the",
"atom",
"s",
"valency",
".",
"It",
"will",
"return",
"0",
"for",
"PseudoAtoms",
"and",
"for",
"atoms",
"for",
"which",
"... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java#L263-L303 |
113,753 | cdk/cdk | base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java | SmilesValencyChecker.isSaturated | @Override
public boolean isSaturated(IAtom atom, IAtomContainer container) throws CDKException {
if (atom instanceof IPseudoAtom) {
logger.debug("don't figure it out... it simply does not lack H's");
return true;
}
IAtomType[] atomTypes = getAtomTypeFactory(atom.getB... | java | @Override
public boolean isSaturated(IAtom atom, IAtomContainer container) throws CDKException {
if (atom instanceof IPseudoAtom) {
logger.debug("don't figure it out... it simply does not lack H's");
return true;
}
IAtomType[] atomTypes = getAtomTypeFactory(atom.getB... | [
"@",
"Override",
"public",
"boolean",
"isSaturated",
"(",
"IAtom",
"atom",
",",
"IAtomContainer",
"container",
")",
"throws",
"CDKException",
"{",
"if",
"(",
"atom",
"instanceof",
"IPseudoAtom",
")",
"{",
"logger",
".",
"debug",
"(",
"\"don't figure it out... it s... | Checks whether an Atom is saturated by comparing it with known AtomTypes.
It returns true if the atom is an PseudoAtom and when the element is not in the list. | [
"Checks",
"whether",
"an",
"Atom",
"is",
"saturated",
"by",
"comparing",
"it",
"with",
"known",
"AtomTypes",
".",
"It",
"returns",
"true",
"if",
"the",
"atom",
"is",
"an",
"PseudoAtom",
"and",
"when",
"the",
"element",
"is",
"not",
"in",
"the",
"list",
"... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java#L309-L356 |
113,754 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java | IonizationPotentialTool.familyHalogen | private static boolean familyHalogen(IAtom atom) {
String symbol = atom.getSymbol();
if (symbol.equals("F") || symbol.equals("Cl") || symbol.equals("Br") || symbol.equals("I"))
return true;
else
return false;
} | java | private static boolean familyHalogen(IAtom atom) {
String symbol = atom.getSymbol();
if (symbol.equals("F") || symbol.equals("Cl") || symbol.equals("Br") || symbol.equals("I"))
return true;
else
return false;
} | [
"private",
"static",
"boolean",
"familyHalogen",
"(",
"IAtom",
"atom",
")",
"{",
"String",
"symbol",
"=",
"atom",
".",
"getSymbol",
"(",
")",
";",
"if",
"(",
"symbol",
".",
"equals",
"(",
"\"F\"",
")",
"||",
"symbol",
".",
"equals",
"(",
"\"Cl\"",
")",... | Looking if the IAtom belongs to the halogen family.
The IAtoms are F, Cl, Br, I.
@param atom The IAtom
@return True, if it belongs | [
"Looking",
"if",
"the",
"IAtom",
"belongs",
"to",
"the",
"halogen",
"family",
".",
"The",
"IAtoms",
"are",
"F",
"Cl",
"Br",
"I",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java#L121-L127 |
113,755 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java | IonizationPotentialTool.familyBond | private static boolean familyBond(IAtomContainer container, IBond bond) {
List<String> normalAt = new ArrayList<String>();
normalAt.add("C");
normalAt.add("H");
if (getDoubleBondNumber(container) > 30) // taking to long
return false;
StructureResonanceGenerator gRN ... | java | private static boolean familyBond(IAtomContainer container, IBond bond) {
List<String> normalAt = new ArrayList<String>();
normalAt.add("C");
normalAt.add("H");
if (getDoubleBondNumber(container) > 30) // taking to long
return false;
StructureResonanceGenerator gRN ... | [
"private",
"static",
"boolean",
"familyBond",
"(",
"IAtomContainer",
"container",
",",
"IBond",
"bond",
")",
"{",
"List",
"<",
"String",
">",
"normalAt",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"normalAt",
".",
"add",
"(",
"\"C\"",
")... | Looking if the Bond belongs to the bond family.
Not in resosance with other heteroatoms.
@param container The IAtomContainer
@param bond The IBond
@return True, if it belongs | [
"Looking",
"if",
"the",
"Bond",
"belongs",
"to",
"the",
"bond",
"family",
".",
"Not",
"in",
"resosance",
"with",
"other",
"heteroatoms",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java#L167-L188 |
113,756 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java | IonizationPotentialTool.getDoubleBondNumber | private static int getDoubleBondNumber(IAtomContainer container) {
int doubleNumber = 0;
for (IBond bond : container.bonds()) {
if (bond.getOrder().equals(IBond.Order.DOUBLE) || bond.getOrder().equals(IBond.Order.TRIPLE))
doubleNumber++;
}
return doubleNumber;... | java | private static int getDoubleBondNumber(IAtomContainer container) {
int doubleNumber = 0;
for (IBond bond : container.bonds()) {
if (bond.getOrder().equals(IBond.Order.DOUBLE) || bond.getOrder().equals(IBond.Order.TRIPLE))
doubleNumber++;
}
return doubleNumber;... | [
"private",
"static",
"int",
"getDoubleBondNumber",
"(",
"IAtomContainer",
"container",
")",
"{",
"int",
"doubleNumber",
"=",
"0",
";",
"for",
"(",
"IBond",
"bond",
":",
"container",
".",
"bonds",
"(",
")",
")",
"{",
"if",
"(",
"bond",
".",
"getOrder",
"(... | Extract the number of bond with superior ordre.
@param container The IAtomContainer
@return The number | [
"Extract",
"the",
"number",
"of",
"bond",
"with",
"superior",
"ordre",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java#L196-L203 |
113,757 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java | IonizationPotentialTool.getDTBondF | private static double getDTBondF(double[] resultsH) {
double result = 0.0;
double SE = resultsH[0];
double PE = resultsH[1];
double PSC = resultsH[2];
double PIC = resultsH[3];
double ETP = resultsH[4];
double COUNTR = resultsH[6];
// System.out.println(... | java | private static double getDTBondF(double[] resultsH) {
double result = 0.0;
double SE = resultsH[0];
double PE = resultsH[1];
double PSC = resultsH[2];
double PIC = resultsH[3];
double ETP = resultsH[4];
double COUNTR = resultsH[6];
// System.out.println(... | [
"private",
"static",
"double",
"getDTBondF",
"(",
"double",
"[",
"]",
"resultsH",
")",
"{",
"double",
"result",
"=",
"0.0",
";",
"double",
"SE",
"=",
"resultsH",
"[",
"0",
"]",
";",
"double",
"PE",
"=",
"resultsH",
"[",
"1",
"]",
";",
"double",
"PSC"... | Get the desicion-tree result for the Halogen family given a series of values.
It is based in 6 qsar descriptors.
@param resultsH Array which contains the results of each descriptor
@return The result | [
"Get",
"the",
"desicion",
"-",
"tree",
"result",
"for",
"the",
"Halogen",
"family",
"given",
"a",
"series",
"of",
"values",
".",
"It",
"is",
"based",
"in",
"6",
"qsar",
"descriptors",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java#L438-L451 |
113,758 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java | IonizationPotentialTool.initiateIonization | private static IAtomContainer initiateIonization(IAtomContainer container, IAtom atom) throws CDKException {
IReactionProcess reactionNBE = new ElectronImpactNBEReaction();
IAtomContainerSet setOfReactants = container.getBuilder().newInstance(IAtomContainerSet.class);
setOfReactants.addAtomCont... | java | private static IAtomContainer initiateIonization(IAtomContainer container, IAtom atom) throws CDKException {
IReactionProcess reactionNBE = new ElectronImpactNBEReaction();
IAtomContainerSet setOfReactants = container.getBuilder().newInstance(IAtomContainerSet.class);
setOfReactants.addAtomCont... | [
"private",
"static",
"IAtomContainer",
"initiateIonization",
"(",
"IAtomContainer",
"container",
",",
"IAtom",
"atom",
")",
"throws",
"CDKException",
"{",
"IReactionProcess",
"reactionNBE",
"=",
"new",
"ElectronImpactNBEReaction",
"(",
")",
";",
"IAtomContainerSet",
"se... | Initiate the reaction ElectronImpactNBE.
@param container The IAtomContainer
@param atom The IAtom to ionize
@return The product resultant
@throws CDKException | [
"Initiate",
"the",
"reaction",
"ElectronImpactNBE",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java#L461-L482 |
113,759 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ReactionSet.java | ReactionSet.reactions | @Override
public Iterable<IReaction> reactions() {
return new Iterable<IReaction>() {
@Override
public Iterator<IReaction> iterator() {
return new ReactionIterator();
}
};
} | java | @Override
public Iterable<IReaction> reactions() {
return new Iterable<IReaction>() {
@Override
public Iterator<IReaction> iterator() {
return new ReactionIterator();
}
};
} | [
"@",
"Override",
"public",
"Iterable",
"<",
"IReaction",
">",
"reactions",
"(",
")",
"{",
"return",
"new",
"Iterable",
"<",
"IReaction",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Iterator",
"<",
"IReaction",
">",
"iterator",
"(",
")",
"{",
"return"... | Get an iterator for this reaction set.
@return A new Iterator for this ReactionSet. | [
"Get",
"an",
"iterator",
"for",
"this",
"reaction",
"set",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ReactionSet.java#L137-L146 |
113,760 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ReactionSet.java | ReactionSet.growReactionArray | private void growReactionArray() {
growArraySize = reactions.length;
IReaction[] newreactions = new IReaction[reactions.length + growArraySize];
System.arraycopy(reactions, 0, newreactions, 0, reactions.length);
reactions = newreactions;
} | java | private void growReactionArray() {
growArraySize = reactions.length;
IReaction[] newreactions = new IReaction[reactions.length + growArraySize];
System.arraycopy(reactions, 0, newreactions, 0, reactions.length);
reactions = newreactions;
} | [
"private",
"void",
"growReactionArray",
"(",
")",
"{",
"growArraySize",
"=",
"reactions",
".",
"length",
";",
"IReaction",
"[",
"]",
"newreactions",
"=",
"new",
"IReaction",
"[",
"reactions",
".",
"length",
"+",
"growArraySize",
"]",
";",
"System",
".",
"arr... | Grows the reaction array by a given size.
@see growArraySize | [
"Grows",
"the",
"reaction",
"array",
"by",
"a",
"given",
"size",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ReactionSet.java#L179-L184 |
113,761 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/stereo/ExtendedTetrahedral.java | ExtendedTetrahedral.findTerminalAtoms | public static IAtom[] findTerminalAtoms(IAtomContainer container, IAtom focus) {
List<IBond> focusBonds = container.getConnectedBondsList(focus);
if (focusBonds.size() != 2)
throw new IllegalArgumentException("focus must have exactly 2 neighbors");
IAtom leftPrev = focus;
IA... | java | public static IAtom[] findTerminalAtoms(IAtomContainer container, IAtom focus) {
List<IBond> focusBonds = container.getConnectedBondsList(focus);
if (focusBonds.size() != 2)
throw new IllegalArgumentException("focus must have exactly 2 neighbors");
IAtom leftPrev = focus;
IA... | [
"public",
"static",
"IAtom",
"[",
"]",
"findTerminalAtoms",
"(",
"IAtomContainer",
"container",
",",
"IAtom",
"focus",
")",
"{",
"List",
"<",
"IBond",
">",
"focusBonds",
"=",
"container",
".",
"getConnectedBondsList",
"(",
"focus",
")",
";",
"if",
"(",
"focu... | Helper method to locate two terminal atoms in a container for a given
focus.
@param container structure representation
@param focus cumulated atom
@return the terminal atoms (unordered) | [
"Helper",
"method",
"to",
"locate",
"two",
"terminal",
"atoms",
"in",
"a",
"container",
"for",
"a",
"given",
"focus",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/stereo/ExtendedTetrahedral.java#L154-L172 |
113,762 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/stereo/ExtendedTetrahedral.java | ExtendedTetrahedral.findTerminalAtoms | public IAtom[] findTerminalAtoms(IAtomContainer container) {
IAtom[] atoms = findTerminalAtoms(container, getFocus());
List<IAtom> carriers = getCarriers();
if (container.getBond(atoms[0], carriers.get(2)) != null ||
container.getBond(atoms[0], carriers.get(3)) != null) {
... | java | public IAtom[] findTerminalAtoms(IAtomContainer container) {
IAtom[] atoms = findTerminalAtoms(container, getFocus());
List<IAtom> carriers = getCarriers();
if (container.getBond(atoms[0], carriers.get(2)) != null ||
container.getBond(atoms[0], carriers.get(3)) != null) {
... | [
"public",
"IAtom",
"[",
"]",
"findTerminalAtoms",
"(",
"IAtomContainer",
"container",
")",
"{",
"IAtom",
"[",
"]",
"atoms",
"=",
"findTerminalAtoms",
"(",
"container",
",",
"getFocus",
"(",
")",
")",
";",
"List",
"<",
"IAtom",
">",
"carriers",
"=",
"getCar... | Helper method to locate two terminal atoms in a container for this
extended tetrahedral element. The atoms are ordered such that the first
index is attached to the first two peripheral atoms and the second index
is attached to the second two peripheral atoms.
@param container structure representation
@return the termi... | [
"Helper",
"method",
"to",
"locate",
"two",
"terminal",
"atoms",
"in",
"a",
"container",
"for",
"this",
"extended",
"tetrahedral",
"element",
".",
"The",
"atoms",
"are",
"ordered",
"such",
"that",
"the",
"first",
"index",
"is",
"attached",
"to",
"the",
"first... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/stereo/ExtendedTetrahedral.java#L183-L193 |
113,763 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/IPMolecularLearningDescriptor.java | IPMolecularLearningDescriptor.setParameters | @Override
public void setParameters(Object[] params) throws CDKException {
if (params.length != 1) throw new CDKException("One parameter expected");
if (!(params[0] instanceof Boolean)) throw new CDKException("Boolean parameter expected");
addlp = (Boolean) params[0];
} | java | @Override
public void setParameters(Object[] params) throws CDKException {
if (params.length != 1) throw new CDKException("One parameter expected");
if (!(params[0] instanceof Boolean)) throw new CDKException("Boolean parameter expected");
addlp = (Boolean) params[0];
} | [
"@",
"Override",
"public",
"void",
"setParameters",
"(",
"Object",
"[",
"]",
"params",
")",
"throws",
"CDKException",
"{",
"if",
"(",
"params",
".",
"length",
"!=",
"1",
")",
"throw",
"new",
"CDKException",
"(",
"\"One parameter expected\"",
")",
";",
"if",
... | Sets the parameters attribute of the IPMolecularLearningDescriptor object
@param params The new parameters value
@exception CDKException Description of the Exception | [
"Sets",
"the",
"parameters",
"attribute",
"of",
"the",
"IPMolecularLearningDescriptor",
"object"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/IPMolecularLearningDescriptor.java#L98-L103 |
113,764 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/IPMolecularLearningDescriptor.java | IPMolecularLearningDescriptor.calculate | @Override
public DescriptorValue calculate(IAtomContainer atomContainer) {
IAtomContainer local;
if (addlp) {
try {
local = (IAtomContainer) atomContainer.clone();
LonePairElectronChecker lpcheck = new LonePairElectronChecker();
lpcheck.sat... | java | @Override
public DescriptorValue calculate(IAtomContainer atomContainer) {
IAtomContainer local;
if (addlp) {
try {
local = (IAtomContainer) atomContainer.clone();
LonePairElectronChecker lpcheck = new LonePairElectronChecker();
lpcheck.sat... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtomContainer",
"atomContainer",
")",
"{",
"IAtomContainer",
"local",
";",
"if",
"(",
"addlp",
")",
"{",
"try",
"{",
"local",
"=",
"(",
"IAtomContainer",
")",
"atomContainer",
".",
"clone",
"(",... | It calculates the first ionization energy of a molecule.
@param atomContainer AtomContainer
@return The first ionization energy | [
"It",
"calculates",
"the",
"first",
"ionization",
"energy",
"of",
"a",
"molecule",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/IPMolecularLearningDescriptor.java#L126-L154 |
113,765 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/IPMolecularLearningDescriptor.java | IPMolecularLearningDescriptor.calculatePlus | public DescriptorValue calculatePlus(IAtomContainer container) throws CDKException {
ArrayList<Double> dar = new ArrayList<Double>();
for (Iterator<IAtom> itA = container.atoms().iterator(); itA.hasNext();) {
IAtom atom = itA.next();
double value = IonizationPotentialTool.predic... | java | public DescriptorValue calculatePlus(IAtomContainer container) throws CDKException {
ArrayList<Double> dar = new ArrayList<Double>();
for (Iterator<IAtom> itA = container.atoms().iterator(); itA.hasNext();) {
IAtom atom = itA.next();
double value = IonizationPotentialTool.predic... | [
"public",
"DescriptorValue",
"calculatePlus",
"(",
"IAtomContainer",
"container",
")",
"throws",
"CDKException",
"{",
"ArrayList",
"<",
"Double",
">",
"dar",
"=",
"new",
"ArrayList",
"<",
"Double",
">",
"(",
")",
";",
"for",
"(",
"Iterator",
"<",
"IAtom",
">... | It calculates the 1,2,.. ionization energies of a molecule.
@param container AtomContainer
@return The 1, 2, .. ionization energies
@exception CDKException Possible Exceptions | [
"It",
"calculates",
"the",
"1",
"2",
"..",
"ionization",
"energies",
"of",
"a",
"molecule",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/IPMolecularLearningDescriptor.java#L163-L186 |
113,766 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/IPMolecularLearningDescriptor.java | IPMolecularLearningDescriptor.arrangingEnergy | private DoubleArrayResult arrangingEnergy(ArrayList<Double> array) {
DoubleArrayResult results = new DoubleArrayResult();
int count = array.size();
for (int i = 0; i < count; i++) {
double min = array.get(0);
int pos = 0;
for (int j = 0; j < array.size(); j++... | java | private DoubleArrayResult arrangingEnergy(ArrayList<Double> array) {
DoubleArrayResult results = new DoubleArrayResult();
int count = array.size();
for (int i = 0; i < count; i++) {
double min = array.get(0);
int pos = 0;
for (int j = 0; j < array.size(); j++... | [
"private",
"DoubleArrayResult",
"arrangingEnergy",
"(",
"ArrayList",
"<",
"Double",
">",
"array",
")",
"{",
"DoubleArrayResult",
"results",
"=",
"new",
"DoubleArrayResult",
"(",
")",
";",
"int",
"count",
"=",
"array",
".",
"size",
"(",
")",
";",
"for",
"(",
... | put in increasing order the ArrayList
@param array The ArrayList to order
@return The DoubleArrayResult ordered | [
"put",
"in",
"increasing",
"order",
"the",
"ArrayList"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/IPMolecularLearningDescriptor.java#L194-L212 |
113,767 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/Isotope.java | Isotope.compare | @Override
public boolean compare(Object object) {
if (!(object instanceof Isotope)) {
return false;
}
if (!super.compare(object)) {
return false;
}
Isotope isotope = (Isotope) object;
if (isotope.getMassNumber() != null && massNumber != null
... | java | @Override
public boolean compare(Object object) {
if (!(object instanceof Isotope)) {
return false;
}
if (!super.compare(object)) {
return false;
}
Isotope isotope = (Isotope) object;
if (isotope.getMassNumber() != null && massNumber != null
... | [
"@",
"Override",
"public",
"boolean",
"compare",
"(",
"Object",
"object",
")",
"{",
"if",
"(",
"!",
"(",
"object",
"instanceof",
"Isotope",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"super",
".",
"compare",
"(",
"object",
")",
")",
... | Compares an isotope with this isotope.
@param object Object of type Isotope
@return true if the isotopes are equal | [
"Compares",
"an",
"isotope",
"with",
"this",
"isotope",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/Isotope.java#L275-L300 |
113,768 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/EccentricConnectivityIndexDescriptor.java | EccentricConnectivityIndexDescriptor.calculate | @Override
public DescriptorValue calculate(IAtomContainer container) {
IAtomContainer local = AtomContainerManipulator.removeHydrogens(container);
int natom = local.getAtomCount();
int[][] admat = AdjacencyMatrix.getMatrix(local);
int[][] distmat = PathTools.computeFloydAPSP(admat);... | java | @Override
public DescriptorValue calculate(IAtomContainer container) {
IAtomContainer local = AtomContainerManipulator.removeHydrogens(container);
int natom = local.getAtomCount();
int[][] admat = AdjacencyMatrix.getMatrix(local);
int[][] distmat = PathTools.computeFloydAPSP(admat);... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtomContainer",
"container",
")",
"{",
"IAtomContainer",
"local",
"=",
"AtomContainerManipulator",
".",
"removeHydrogens",
"(",
"container",
")",
";",
"int",
"natom",
"=",
"local",
".",
"getAtomCount"... | Calculates the eccentric connectivity
@param container Parameter is the atom container.
@return An IntegerResult value representing the eccentric connectivity index | [
"Calculates",
"the",
"eccentric",
"connectivity"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/EccentricConnectivityIndexDescriptor.java#L138-L158 |
113,769 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/math/RandomNumbersTool.java | RandomNumbersTool.randomInt | public static int randomInt(int lo, int hi) {
return (Math.abs(random.nextInt()) % (hi - lo + 1)) + lo;
} | java | public static int randomInt(int lo, int hi) {
return (Math.abs(random.nextInt()) % (hi - lo + 1)) + lo;
} | [
"public",
"static",
"int",
"randomInt",
"(",
"int",
"lo",
",",
"int",
"hi",
")",
"{",
"return",
"(",
"Math",
".",
"abs",
"(",
"random",
".",
"nextInt",
"(",
")",
")",
"%",
"(",
"hi",
"-",
"lo",
"+",
"1",
")",
")",
"+",
"lo",
";",
"}"
] | Generates a random integer between the specified values.
@param lo the lower bound for the generated integer.
@param hi the upper bound for the generated integer.
@return a random integer between <code>lo</code> and <code>hi</code>. | [
"Generates",
"a",
"random",
"integer",
"between",
"the",
"specified",
"values",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/math/RandomNumbersTool.java#L106-L108 |
113,770 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/math/RandomNumbersTool.java | RandomNumbersTool.nextLong | private static long nextLong(Random rng, long n) {
if (n <= 0) throw new IllegalArgumentException("n must be greater than 0");
long bits, val;
do {
bits = (rng.nextLong() << 1) >>> 1;
val = bits % n;
} while (bits - val + (n - 1) < 0L);
return val;
} | java | private static long nextLong(Random rng, long n) {
if (n <= 0) throw new IllegalArgumentException("n must be greater than 0");
long bits, val;
do {
bits = (rng.nextLong() << 1) >>> 1;
val = bits % n;
} while (bits - val + (n - 1) < 0L);
return val;
} | [
"private",
"static",
"long",
"nextLong",
"(",
"Random",
"rng",
",",
"long",
"n",
")",
"{",
"if",
"(",
"n",
"<=",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"n must be greater than 0\"",
")",
";",
"long",
"bits",
",",
"val",
";",
"do",
"... | Access the next long random number between 0 and n.
@param rng random number generator
@param n max value
@return a long random number between 0 and n
@see <a href="http://stackoverflow.com/questions/2546078/java-random-long-number-in-0-x-n-range">Random Long Number in range, Stack Overflow</a> | [
"Access",
"the",
"next",
"long",
"random",
"number",
"between",
"0",
"and",
"n",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/math/RandomNumbersTool.java#L140-L148 |
113,771 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/Cycles.java | Cycles.markRingAtomsAndBonds | public static int markRingAtomsAndBonds(IAtomContainer mol) {
EdgeToBondMap bonds = EdgeToBondMap.withSpaceFor(mol);
return markRingAtomsAndBonds(mol, GraphUtil.toAdjList(mol, bonds), bonds);
} | java | public static int markRingAtomsAndBonds(IAtomContainer mol) {
EdgeToBondMap bonds = EdgeToBondMap.withSpaceFor(mol);
return markRingAtomsAndBonds(mol, GraphUtil.toAdjList(mol, bonds), bonds);
} | [
"public",
"static",
"int",
"markRingAtomsAndBonds",
"(",
"IAtomContainer",
"mol",
")",
"{",
"EdgeToBondMap",
"bonds",
"=",
"EdgeToBondMap",
".",
"withSpaceFor",
"(",
"mol",
")",
";",
"return",
"markRingAtomsAndBonds",
"(",
"mol",
",",
"GraphUtil",
".",
"toAdjList"... | Find and mark all cyclic atoms and bonds in the provided molecule.
@param mol molecule
@see IBond#isInRing()
@see IAtom#isInRing()
@return Number of rings found (circuit rank)
@see <a href="https://en.wikipedia.org/wiki/Circuit_rank">Circuit Rank</a> | [
"Find",
"and",
"mark",
"all",
"cyclic",
"atoms",
"and",
"bonds",
"in",
"the",
"provided",
"molecule",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/Cycles.java#L423-L426 |
113,772 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/Cycles.java | Cycles.markRingAtomsAndBonds | public static int markRingAtomsAndBonds(IAtomContainer mol, int[][] adjList, EdgeToBondMap bondMap) {
RingSearch ringSearch = new RingSearch(mol, adjList);
for (int v = 0; v < mol.getAtomCount(); v++) {
mol.getAtom(v).setIsInRing(false);
for (int w : adjList[v]) {
... | java | public static int markRingAtomsAndBonds(IAtomContainer mol, int[][] adjList, EdgeToBondMap bondMap) {
RingSearch ringSearch = new RingSearch(mol, adjList);
for (int v = 0; v < mol.getAtomCount(); v++) {
mol.getAtom(v).setIsInRing(false);
for (int w : adjList[v]) {
... | [
"public",
"static",
"int",
"markRingAtomsAndBonds",
"(",
"IAtomContainer",
"mol",
",",
"int",
"[",
"]",
"[",
"]",
"adjList",
",",
"EdgeToBondMap",
"bondMap",
")",
"{",
"RingSearch",
"ringSearch",
"=",
"new",
"RingSearch",
"(",
"mol",
",",
"adjList",
")",
";"... | Find and mark all cyclic atoms and bonds in the provided molecule. This optimised version
allows the caller to optionally provided indexed fast access structure which would otherwise
be created.
@param mol molecule
@see IBond#isInRing()
@see IAtom#isInRing()
@return Number of rings found (circuit rank)
@see <a href="h... | [
"Find",
"and",
"mark",
"all",
"cyclic",
"atoms",
"and",
"bonds",
"in",
"the",
"provided",
"molecule",
".",
"This",
"optimised",
"version",
"allows",
"the",
"caller",
"to",
"optionally",
"provided",
"indexed",
"fast",
"access",
"structure",
"which",
"would",
"o... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/Cycles.java#L439-L456 |
113,773 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/Cycles.java | Cycles.all | public static Cycles all(IAtomContainer container, int length) throws Intractable {
return all().find(container, length);
} | java | public static Cycles all(IAtomContainer container, int length) throws Intractable {
return all().find(container, length);
} | [
"public",
"static",
"Cycles",
"all",
"(",
"IAtomContainer",
"container",
",",
"int",
"length",
")",
"throws",
"Intractable",
"{",
"return",
"all",
"(",
")",
".",
"find",
"(",
"container",
",",
"length",
")",
";",
"}"
] | All cycles of smaller than or equal to the specified length.
@param container input container
@param length maximum size or cycle to find
@return all cycles
@throws Intractable computation was not feasible | [
"All",
"cycles",
"of",
"smaller",
"than",
"or",
"equal",
"to",
"the",
"specified",
"length",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/Cycles.java#L525-L527 |
113,774 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/Cycles.java | Cycles.lift | private static int[] lift(int[] path, int[] mapping) {
for (int i = 0; i < path.length; i++) {
path[i] = mapping[path[i]];
}
return path;
} | java | private static int[] lift(int[] path, int[] mapping) {
for (int i = 0; i < path.length; i++) {
path[i] = mapping[path[i]];
}
return path;
} | [
"private",
"static",
"int",
"[",
"]",
"lift",
"(",
"int",
"[",
"]",
"path",
",",
"int",
"[",
"]",
"mapping",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"path",
".",
"length",
";",
"i",
"++",
")",
"{",
"path",
"[",
"i",
"]",
... | Internal - lifts a path in a subgraph back to the original graph.
@param path a path
@param mapping vertex mapping
@return the lifted path | [
"Internal",
"-",
"lifts",
"a",
"path",
"in",
"a",
"subgraph",
"back",
"to",
"the",
"original",
"graph",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/Cycles.java#L899-L904 |
113,775 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/Cycles.java | Cycles.toRingSet | private static IRingSet toRingSet(IAtomContainer container, int[][] cycles, EdgeToBondMap bondMap) {
// note currently no way to say the size of the RingSet
// even through we know it
IChemObjectBuilder builder = container.getBuilder();
IRingSet rings = builder.newInstance(IRingSet.clas... | java | private static IRingSet toRingSet(IAtomContainer container, int[][] cycles, EdgeToBondMap bondMap) {
// note currently no way to say the size of the RingSet
// even through we know it
IChemObjectBuilder builder = container.getBuilder();
IRingSet rings = builder.newInstance(IRingSet.clas... | [
"private",
"static",
"IRingSet",
"toRingSet",
"(",
"IAtomContainer",
"container",
",",
"int",
"[",
"]",
"[",
"]",
"cycles",
",",
"EdgeToBondMap",
"bondMap",
")",
"{",
"// note currently no way to say the size of the RingSet",
"// even through we know it",
"IChemObjectBuilde... | Internal - convert a set of cycles to an ring set.
@param container molecule
@param cycles a cycle of the chemical graph
@param bondMap mapping of the edges (int,int) to the bonds of the
container
@return the ring set | [
"Internal",
"-",
"convert",
"a",
"set",
"of",
"cycles",
"to",
"an",
"ring",
"set",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/Cycles.java#L915-L927 |
113,776 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/Cycles.java | Cycles.toRing | private static IRing toRing(IAtomContainer container, int[] cycle, EdgeToBondMap bondMap) {
IAtom[] atoms = new IAtom[cycle.length - 1];
IBond[] bonds = new IBond[cycle.length - 1];
for (int i = 1; i < cycle.length; i++) {
int v = cycle[i];
int u = cycle[i - 1];
... | java | private static IRing toRing(IAtomContainer container, int[] cycle, EdgeToBondMap bondMap) {
IAtom[] atoms = new IAtom[cycle.length - 1];
IBond[] bonds = new IBond[cycle.length - 1];
for (int i = 1; i < cycle.length; i++) {
int v = cycle[i];
int u = cycle[i - 1];
... | [
"private",
"static",
"IRing",
"toRing",
"(",
"IAtomContainer",
"container",
",",
"int",
"[",
"]",
"cycle",
",",
"EdgeToBondMap",
"bondMap",
")",
"{",
"IAtom",
"[",
"]",
"atoms",
"=",
"new",
"IAtom",
"[",
"cycle",
".",
"length",
"-",
"1",
"]",
";",
"IBo... | Internal - convert a set of cycles to a ring.
@param container molecule
@param cycle a cycle of the chemical graph
@param bondMap mapping of the edges (int,int) to the bonds of the
container
@return the ring for the specified cycle | [
"Internal",
"-",
"convert",
"a",
"set",
"of",
"cycles",
"to",
"a",
"ring",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/Cycles.java#L938-L956 |
113,777 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/Cycles.java | Cycles.getBond | private static IBond getBond(IAtomContainer container, EdgeToBondMap bondMap, int u, int v) {
if (bondMap != null) return bondMap.get(u, v);
return container.getBond(container.getAtom(u), container.getAtom(v));
} | java | private static IBond getBond(IAtomContainer container, EdgeToBondMap bondMap, int u, int v) {
if (bondMap != null) return bondMap.get(u, v);
return container.getBond(container.getAtom(u), container.getAtom(v));
} | [
"private",
"static",
"IBond",
"getBond",
"(",
"IAtomContainer",
"container",
",",
"EdgeToBondMap",
"bondMap",
",",
"int",
"u",
",",
"int",
"v",
")",
"{",
"if",
"(",
"bondMap",
"!=",
"null",
")",
"return",
"bondMap",
".",
"get",
"(",
"u",
",",
"v",
")",... | Obtain the bond between the atoms at index 'u' and 'v'. If the 'bondMap'
is non-null it is used for direct lookup otherwise the slower linear
lookup in 'container' is used.
@param container a structure
@param bondMap optimised map of atom indices to bond instances
@param u an atom index
@param v an a... | [
"Obtain",
"the",
"bond",
"between",
"the",
"atoms",
"at",
"index",
"u",
"and",
"v",
".",
"If",
"the",
"bondMap",
"is",
"non",
"-",
"null",
"it",
"is",
"used",
"for",
"direct",
"lookup",
"otherwise",
"the",
"slower",
"linear",
"lookup",
"in",
"container",... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/Cycles.java#L969-L972 |
113,778 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/TXTBasedAtomTypeConfigurator.java | TXTBasedAtomTypeConfigurator.readAtomTypes | @Override
public List<IAtomType> readAtomTypes(IChemObjectBuilder builder) throws IOException {
List<IAtomType> atomTypes = new ArrayList<IAtomType>();
if (ins == null) {
// trying the default
//logger.debug("readAtomTypes getResourceAsStream:"
// ... | java | @Override
public List<IAtomType> readAtomTypes(IChemObjectBuilder builder) throws IOException {
List<IAtomType> atomTypes = new ArrayList<IAtomType>();
if (ins == null) {
// trying the default
//logger.debug("readAtomTypes getResourceAsStream:"
// ... | [
"@",
"Override",
"public",
"List",
"<",
"IAtomType",
">",
"readAtomTypes",
"(",
"IChemObjectBuilder",
"builder",
")",
"throws",
"IOException",
"{",
"List",
"<",
"IAtomType",
">",
"atomTypes",
"=",
"new",
"ArrayList",
"<",
"IAtomType",
">",
"(",
")",
";",
"if... | Reads a text based configuration file.
@param builder IChemObjectBuilder used to construct the IAtomType's.
@throws IOException when a problem occurred with reading from the InputStream
@return A List with read IAtomType's. | [
"Reads",
"a",
"text",
"based",
"configuration",
"file",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/TXTBasedAtomTypeConfigurator.java#L65-L135 |
113,779 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/tools/manipulator/AtomContainerSetManipulator.java | AtomContainerSetManipulator.getAllChemObjects | public static List<IChemObject> getAllChemObjects(IAtomContainerSet set) {
ArrayList<IChemObject> list = new ArrayList<IChemObject>();
list.add(set);
for (IAtomContainer atomContainer : set.atomContainers()) {
list.add(atomContainer);
}
return list;
} | java | public static List<IChemObject> getAllChemObjects(IAtomContainerSet set) {
ArrayList<IChemObject> list = new ArrayList<IChemObject>();
list.add(set);
for (IAtomContainer atomContainer : set.atomContainers()) {
list.add(atomContainer);
}
return list;
} | [
"public",
"static",
"List",
"<",
"IChemObject",
">",
"getAllChemObjects",
"(",
"IAtomContainerSet",
"set",
")",
"{",
"ArrayList",
"<",
"IChemObject",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"IChemObject",
">",
"(",
")",
";",
"list",
".",
"add",
"(",
"se... | Does not recursively return the contents of the AtomContainer.
@param set The collection of IAtomContainer objects
@return a list of individual ChemObject's | [
"Does",
"not",
"recursively",
"return",
"the",
"contents",
"of",
"the",
"AtomContainer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/AtomContainerSetManipulator.java#L190-L197 |
113,780 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/atompair/PiContactDetectionDescriptor.java | PiContactDetectionDescriptor.calculate | @Override
public DescriptorValue calculate(IAtom first, IAtom second, IAtomContainer atomContainer) {
IAtomContainer ac;
try {
ac = (IAtomContainer) atomContainer.clone();
} catch (CloneNotSupportedException e) {
return getDummyDescriptorValue(e);
}
IA... | java | @Override
public DescriptorValue calculate(IAtom first, IAtom second, IAtomContainer atomContainer) {
IAtomContainer ac;
try {
ac = (IAtomContainer) atomContainer.clone();
} catch (CloneNotSupportedException e) {
return getDummyDescriptorValue(e);
}
IA... | [
"@",
"Override",
"public",
"DescriptorValue",
"calculate",
"(",
"IAtom",
"first",
",",
"IAtom",
"second",
",",
"IAtomContainer",
"atomContainer",
")",
"{",
"IAtomContainer",
"ac",
";",
"try",
"{",
"ac",
"=",
"(",
"IAtomContainer",
")",
"atomContainer",
".",
"c... | The method returns if two atoms have pi-contact.
@param atomContainer AtomContainer
@return true if the atoms have pi-contact | [
"The",
"method",
"returns",
"if",
"two",
"atoms",
"have",
"pi",
"-",
"contact",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/atompair/PiContactDetectionDescriptor.java#L143-L193 |
113,781 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/atompair/PiContactDetectionDescriptor.java | PiContactDetectionDescriptor.isANeighboorsInAnAtomContainer | private boolean isANeighboorsInAnAtomContainer(List<IAtom> neighs, IAtomContainer ac) {
boolean isIn = false;
int count = 0;
for (IAtom neigh : neighs) {
if (ac.contains(neigh)) {
count += 1;
}
}
if (count > 0) {
isIn = true;
... | java | private boolean isANeighboorsInAnAtomContainer(List<IAtom> neighs, IAtomContainer ac) {
boolean isIn = false;
int count = 0;
for (IAtom neigh : neighs) {
if (ac.contains(neigh)) {
count += 1;
}
}
if (count > 0) {
isIn = true;
... | [
"private",
"boolean",
"isANeighboorsInAnAtomContainer",
"(",
"List",
"<",
"IAtom",
">",
"neighs",
",",
"IAtomContainer",
"ac",
")",
"{",
"boolean",
"isIn",
"=",
"false",
";",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"IAtom",
"neigh",
":",
"neighs",
")",
... | Gets if neighbours of an atom are in an atom container.
@param neighs array of atoms
@param ac AtomContainer
@return The boolean result | [
"Gets",
"if",
"neighbours",
"of",
"an",
"atom",
"are",
"in",
"an",
"atom",
"container",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/atompair/PiContactDetectionDescriptor.java#L202-L214 |
113,782 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java | GridGenerator.initializeGrid | public void initializeGrid(double value) {
for (int i = 0; i < grid.length; i++) {
for (int j = 0; j < grid[0].length; j++) {
for (int k = 0; k < grid[0][0].length; k++) {
grid[k][j][i] = value;
}
}
}
} | java | public void initializeGrid(double value) {
for (int i = 0; i < grid.length; i++) {
for (int j = 0; j < grid[0].length; j++) {
for (int k = 0; k < grid[0][0].length; k++) {
grid[k][j][i] = value;
}
}
}
} | [
"public",
"void",
"initializeGrid",
"(",
"double",
"value",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"grid",
".",
"length",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"grid",
"[",
"0",
"]",
... | Method initialise the given grid points with a value. | [
"Method",
"initialise",
"the",
"given",
"grid",
"points",
"with",
"a",
"value",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java#L143-L151 |
113,783 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java | GridGenerator.gridToGridArray | public double[] gridToGridArray(double[][][] grid) {
if (grid == null) {
grid = this.grid;
}
gridArray = new double[dim[0] * dim[1] * dim[2] + 3];
int dimCounter = 0;
for (int z = 0; z < grid[0][0].length; z++) {
for (int y = 0; y < grid[0].length; y++) {
... | java | public double[] gridToGridArray(double[][][] grid) {
if (grid == null) {
grid = this.grid;
}
gridArray = new double[dim[0] * dim[1] * dim[2] + 3];
int dimCounter = 0;
for (int z = 0; z < grid[0][0].length; z++) {
for (int y = 0; y < grid[0].length; y++) {
... | [
"public",
"double",
"[",
"]",
"gridToGridArray",
"(",
"double",
"[",
"]",
"[",
"]",
"[",
"]",
"grid",
")",
"{",
"if",
"(",
"grid",
"==",
"null",
")",
"{",
"grid",
"=",
"this",
".",
"grid",
";",
"}",
"gridArray",
"=",
"new",
"double",
"[",
"dim",
... | Method transforms the grid to an array. | [
"Method",
"transforms",
"the",
"grid",
"to",
"an",
"array",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java#L170-L185 |
113,784 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java | GridGenerator.getCoordinatesFromGridPoint | public Point3d getCoordinatesFromGridPoint(Point3d gridPoint) {
double dx = minx + latticeConstant * gridPoint.x;
double dy = miny + latticeConstant * gridPoint.y;
double dz = minz + latticeConstant * gridPoint.z;
return new Point3d(dx, dy, dz);
} | java | public Point3d getCoordinatesFromGridPoint(Point3d gridPoint) {
double dx = minx + latticeConstant * gridPoint.x;
double dy = miny + latticeConstant * gridPoint.y;
double dz = minz + latticeConstant * gridPoint.z;
return new Point3d(dx, dy, dz);
} | [
"public",
"Point3d",
"getCoordinatesFromGridPoint",
"(",
"Point3d",
"gridPoint",
")",
"{",
"double",
"dx",
"=",
"minx",
"+",
"latticeConstant",
"*",
"gridPoint",
".",
"x",
";",
"double",
"dy",
"=",
"miny",
"+",
"latticeConstant",
"*",
"gridPoint",
".",
"y",
... | Method calculates coordinates from a given grid point. | [
"Method",
"calculates",
"coordinates",
"from",
"a",
"given",
"grid",
"point",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java#L190-L195 |
113,785 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java | GridGenerator.getCoordinatesFromGridPoint | public Point3d getCoordinatesFromGridPoint(int gridPoint) {
int dimCounter = 0;
Point3d point = new Point3d(0, 0, 0);
for (int z = 0; z < grid[0][0].length; z++) {
for (int y = 0; y < grid[0].length; y++) {
for (int x = 0; x < grid.length; x++) {
i... | java | public Point3d getCoordinatesFromGridPoint(int gridPoint) {
int dimCounter = 0;
Point3d point = new Point3d(0, 0, 0);
for (int z = 0; z < grid[0][0].length; z++) {
for (int y = 0; y < grid[0].length; y++) {
for (int x = 0; x < grid.length; x++) {
i... | [
"public",
"Point3d",
"getCoordinatesFromGridPoint",
"(",
"int",
"gridPoint",
")",
"{",
"int",
"dimCounter",
"=",
"0",
";",
"Point3d",
"point",
"=",
"new",
"Point3d",
"(",
"0",
",",
"0",
",",
"0",
")",
";",
"for",
"(",
"int",
"z",
"=",
"0",
";",
"z",
... | Method calculates coordinates from a given grid array position. | [
"Method",
"calculates",
"coordinates",
"from",
"a",
"given",
"grid",
"array",
"position",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java#L200-L217 |
113,786 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java | GridGenerator.getGridPointFrom3dCoordinates | public Point3d getGridPointFrom3dCoordinates(Point3d coord) throws Exception {
Point3d gridPoint = new Point3d();
if (coord.x >= minx & coord.x <= maxx) {
gridPoint.x = (int) Math.round(Math.abs(minx - coord.x) / latticeConstant);
} else {
throw new Exception("CDKGridErr... | java | public Point3d getGridPointFrom3dCoordinates(Point3d coord) throws Exception {
Point3d gridPoint = new Point3d();
if (coord.x >= minx & coord.x <= maxx) {
gridPoint.x = (int) Math.round(Math.abs(minx - coord.x) / latticeConstant);
} else {
throw new Exception("CDKGridErr... | [
"public",
"Point3d",
"getGridPointFrom3dCoordinates",
"(",
"Point3d",
"coord",
")",
"throws",
"Exception",
"{",
"Point3d",
"gridPoint",
"=",
"new",
"Point3d",
"(",
")",
";",
"if",
"(",
"coord",
".",
"x",
">=",
"minx",
"&",
"coord",
".",
"x",
"<=",
"maxx",
... | Method calculates the nearest grid point from given coordinates. | [
"Method",
"calculates",
"the",
"nearest",
"grid",
"point",
"from",
"given",
"coordinates",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java#L222-L242 |
113,787 | cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java | GridGenerator.writeGridInPmeshFormat | public void writeGridInPmeshFormat(String outPutFileName) throws IOException {
BufferedWriter writer = new BufferedWriter(new FileWriter(outPutFileName + ".pmesh"));
int numberOfGridPoints = grid.length * grid[0].length * grid[0][0].length;
writer.write(numberOfGridPoints + "\n");
for (i... | java | public void writeGridInPmeshFormat(String outPutFileName) throws IOException {
BufferedWriter writer = new BufferedWriter(new FileWriter(outPutFileName + ".pmesh"));
int numberOfGridPoints = grid.length * grid[0].length * grid[0][0].length;
writer.write(numberOfGridPoints + "\n");
for (i... | [
"public",
"void",
"writeGridInPmeshFormat",
"(",
"String",
"outPutFileName",
")",
"throws",
"IOException",
"{",
"BufferedWriter",
"writer",
"=",
"new",
"BufferedWriter",
"(",
"new",
"FileWriter",
"(",
"outPutFileName",
"+",
"\".pmesh\"",
")",
")",
";",
"int",
"num... | Method transforms the grid into pmesh format. | [
"Method",
"transforms",
"the",
"grid",
"into",
"pmesh",
"format",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java#L247-L260 |
113,788 | cdk/cdk | tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java | GeometricTetrahedralEncoderFactory.create | @Override
public StereoEncoder create(IAtomContainer container, int[][] graph) {
// XXX: this code isn't pretty, the current IAtomContainer
// implementations are slow for the queries (i.e. looking at connected
// atoms/bonds) we need to ask to decide if something is a potential
//... | java | @Override
public StereoEncoder create(IAtomContainer container, int[][] graph) {
// XXX: this code isn't pretty, the current IAtomContainer
// implementations are slow for the queries (i.e. looking at connected
// atoms/bonds) we need to ask to decide if something is a potential
//... | [
"@",
"Override",
"public",
"StereoEncoder",
"create",
"(",
"IAtomContainer",
"container",
",",
"int",
"[",
"]",
"[",
"]",
"graph",
")",
"{",
"// XXX: this code isn't pretty, the current IAtomContainer",
"// implementations are slow for the queries (i.e. looking at connected",
... | Create a stereo encoder for all potential 2D and 3D tetrahedral
elements.
@param container an atom container
@param graph adjacency list representation of the container
@return a new encoder for tetrahedral elements | [
"Create",
"a",
"stereo",
"encoder",
"for",
"all",
"potential",
"2D",
"and",
"3D",
"tetrahedral",
"elements",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java#L62-L113 |
113,789 | cdk/cdk | tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java | GeometricTetrahedralEncoderFactory.geometric | private static GeometricParity geometric(Map<IAtom, Integer> elevationMap, List<IBond> bonds, int i,
int[] adjacent, IAtomContainer container) {
int nStereoBonds = nStereoBonds(bonds);
if (nStereoBonds > 0)
return geometric2D(elevationMap, bonds, i, adjacent, container);
... | java | private static GeometricParity geometric(Map<IAtom, Integer> elevationMap, List<IBond> bonds, int i,
int[] adjacent, IAtomContainer container) {
int nStereoBonds = nStereoBonds(bonds);
if (nStereoBonds > 0)
return geometric2D(elevationMap, bonds, i, adjacent, container);
... | [
"private",
"static",
"GeometricParity",
"geometric",
"(",
"Map",
"<",
"IAtom",
",",
"Integer",
">",
"elevationMap",
",",
"List",
"<",
"IBond",
">",
"bonds",
",",
"int",
"i",
",",
"int",
"[",
"]",
"adjacent",
",",
"IAtomContainer",
"container",
")",
"{",
... | Create the geometric part of an encoder
@param elevationMap temporary map to store the bond elevations (2D)
@param bonds list of bonds connected to the atom at i
@param i the central atom (index)
@param adjacent adjacent atoms (indices)
@param container container
@return geometric parity encod... | [
"Create",
"the",
"geometric",
"part",
"of",
"an",
"encoder"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java#L125-L132 |
113,790 | cdk/cdk | tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java | GeometricTetrahedralEncoderFactory.geometric2D | private static GeometricParity geometric2D(Map<IAtom, Integer> elevationMap, List<IBond> bonds, int i,
int[] adjacent, IAtomContainer container) {
IAtom atom = container.getAtom(i);
// create map of the atoms and their elevation from the center,
makeElevationMap(atom, bonds, elevat... | java | private static GeometricParity geometric2D(Map<IAtom, Integer> elevationMap, List<IBond> bonds, int i,
int[] adjacent, IAtomContainer container) {
IAtom atom = container.getAtom(i);
// create map of the atoms and their elevation from the center,
makeElevationMap(atom, bonds, elevat... | [
"private",
"static",
"GeometricParity",
"geometric2D",
"(",
"Map",
"<",
"IAtom",
",",
"Integer",
">",
"elevationMap",
",",
"List",
"<",
"IBond",
">",
"bonds",
",",
"int",
"i",
",",
"int",
"[",
"]",
"adjacent",
",",
"IAtomContainer",
"container",
")",
"{",
... | Create the geometric part of an encoder of 2D configurations
@param elevationMap temporary map to store the bond elevations (2D)
@param bonds list of bonds connected to the atom at i
@param i the central atom (index)
@param adjacent adjacent atoms (indices)
@param container container
@return g... | [
"Create",
"the",
"geometric",
"part",
"of",
"an",
"encoder",
"of",
"2D",
"configurations"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java#L144-L175 |
113,791 | cdk/cdk | tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java | GeometricTetrahedralEncoderFactory.geometric3D | private static GeometricParity geometric3D(int i, int[] adjacent, IAtomContainer container) {
IAtom atom = container.getAtom(i);
Point3d[] coordinates = new Point3d[4];
// set the forth ligand to centre as default (overwritten if
// we have 4 neighbors)
if (atom.getPoint3d() !=... | java | private static GeometricParity geometric3D(int i, int[] adjacent, IAtomContainer container) {
IAtom atom = container.getAtom(i);
Point3d[] coordinates = new Point3d[4];
// set the forth ligand to centre as default (overwritten if
// we have 4 neighbors)
if (atom.getPoint3d() !=... | [
"private",
"static",
"GeometricParity",
"geometric3D",
"(",
"int",
"i",
",",
"int",
"[",
"]",
"adjacent",
",",
"IAtomContainer",
"container",
")",
"{",
"IAtom",
"atom",
"=",
"container",
".",
"getAtom",
"(",
"i",
")",
";",
"Point3d",
"[",
"]",
"coordinates... | Create the geometric part of an encoder of 3D configurations
@param i the central atom (index)
@param adjacent adjacent atoms (indices)
@param container container
@return geometric parity encoder (or null) | [
"Create",
"the",
"geometric",
"part",
"of",
"an",
"encoder",
"of",
"3D",
"configurations"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java#L185-L210 |
113,792 | cdk/cdk | tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java | GeometricTetrahedralEncoderFactory.nStereoBonds | private static int nStereoBonds(List<IBond> bonds) {
int count = 0;
for (IBond bond : bonds) {
IBond.Stereo stereo = bond.getStereo();
switch (stereo) {
// query bonds... no configuration possible
case E_OR_Z:
case UP_OR_DOWN:
... | java | private static int nStereoBonds(List<IBond> bonds) {
int count = 0;
for (IBond bond : bonds) {
IBond.Stereo stereo = bond.getStereo();
switch (stereo) {
// query bonds... no configuration possible
case E_OR_Z:
case UP_OR_DOWN:
... | [
"private",
"static",
"int",
"nStereoBonds",
"(",
"List",
"<",
"IBond",
">",
"bonds",
")",
"{",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"IBond",
"bond",
":",
"bonds",
")",
"{",
"IBond",
".",
"Stereo",
"stereo",
"=",
"bond",
".",
"getStereo",
"(",
... | access the number of stereo bonds in the provided bond list.
@param bonds input list
@return number of UP/DOWN bonds in the list, -1 if a query bond was
found | [
"access",
"the",
"number",
"of",
"stereo",
"bonds",
"in",
"the",
"provided",
"bond",
"list",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java#L229-L248 |
113,793 | cdk/cdk | tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java | GeometricTetrahedralEncoderFactory.makeElevationMap | private static void makeElevationMap(IAtom atom, List<IBond> bonds, Map<IAtom, Integer> map) {
map.clear();
for (IBond bond : bonds) {
int elevation = 0;
switch (bond.getStereo()) {
case UP:
case DOWN_INVERTED:
elevation = +1;
... | java | private static void makeElevationMap(IAtom atom, List<IBond> bonds, Map<IAtom, Integer> map) {
map.clear();
for (IBond bond : bonds) {
int elevation = 0;
switch (bond.getStereo()) {
case UP:
case DOWN_INVERTED:
elevation = +1;
... | [
"private",
"static",
"void",
"makeElevationMap",
"(",
"IAtom",
"atom",
",",
"List",
"<",
"IBond",
">",
"bonds",
",",
"Map",
"<",
"IAtom",
",",
"Integer",
">",
"map",
")",
"{",
"map",
".",
"clear",
"(",
")",
";",
"for",
"(",
"IBond",
"bond",
":",
"b... | Maps the input bonds to a map of Atom->Elevation where the elevation is
whether the bond is off the plane with respect to the central atom.
@param atom central atom
@param bonds bonds connected to the central atom
@param map map to load with elevation values (can be reused) | [
"Maps",
"the",
"input",
"bonds",
"to",
"a",
"map",
"of",
"Atom",
"-",
">",
"Elevation",
"where",
"the",
"elevation",
"is",
"whether",
"the",
"bond",
"is",
"off",
"the",
"plane",
"with",
"respect",
"to",
"the",
"central",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java#L258-L282 |
113,794 | cdk/cdk | descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/StandardSubstructureSets.java | StandardSubstructureSets.readSMARTSPattern | private static String[] readSMARTSPattern(String filename) throws Exception {
InputStream ins = StandardSubstructureSets.class.getClassLoader().getResourceAsStream(filename);
BufferedReader reader = new BufferedReader(new InputStreamReader(ins));
List<String> tmp = new ArrayList<String>();
... | java | private static String[] readSMARTSPattern(String filename) throws Exception {
InputStream ins = StandardSubstructureSets.class.getClassLoader().getResourceAsStream(filename);
BufferedReader reader = new BufferedReader(new InputStreamReader(ins));
List<String> tmp = new ArrayList<String>();
... | [
"private",
"static",
"String",
"[",
"]",
"readSMARTSPattern",
"(",
"String",
"filename",
")",
"throws",
"Exception",
"{",
"InputStream",
"ins",
"=",
"StandardSubstructureSets",
".",
"class",
".",
"getClassLoader",
"(",
")",
".",
"getResourceAsStream",
"(",
"filena... | Load a list of SMARTS patterns from the specified file.
Each line in the file corresponds to a pattern with the following structure:
PATTERN_DESCRIPTION: SMARTS_PATTERN, <i>e.g., Thioketone: [#6][CX3](=[SX1])[#6]</i>
Empty lines and lines starting with a "#" are skipped.
@param filename list of the SMARTS pattern to... | [
"Load",
"a",
"list",
"of",
"SMARTS",
"patterns",
"from",
"the",
"specified",
"file",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/StandardSubstructureSets.java#L58-L74 |
113,795 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/fingerprint/HybridizationFingerprinter.java | HybridizationFingerprinter.getBondSymbol | protected String getBondSymbol(IBond bond) {
String bondSymbol = "";
if (bond.getOrder() == IBond.Order.SINGLE) {
if (isSP2Bond(bond)) {
bondSymbol = ":";
} else {
bondSymbol = "-";
}
} else if (bond.getOrder() == IBond.Order.DO... | java | protected String getBondSymbol(IBond bond) {
String bondSymbol = "";
if (bond.getOrder() == IBond.Order.SINGLE) {
if (isSP2Bond(bond)) {
bondSymbol = ":";
} else {
bondSymbol = "-";
}
} else if (bond.getOrder() == IBond.Order.DO... | [
"protected",
"String",
"getBondSymbol",
"(",
"IBond",
"bond",
")",
"{",
"String",
"bondSymbol",
"=",
"\"\"",
";",
"if",
"(",
"bond",
".",
"getOrder",
"(",
")",
"==",
"IBond",
".",
"Order",
".",
"SINGLE",
")",
"{",
"if",
"(",
"isSP2Bond",
"(",
"bond",
... | Gets the bond Symbol attribute of the Fingerprinter class.
@return The bondSymbol value | [
"Gets",
"the",
"bond",
"Symbol",
"attribute",
"of",
"the",
"Fingerprinter",
"class",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/fingerprint/HybridizationFingerprinter.java#L93-L113 |
113,796 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/fingerprint/HybridizationFingerprinter.java | HybridizationFingerprinter.isSP2Bond | private boolean isSP2Bond(IBond bond) {
return bond.getAtomCount() == 2 && bond.getBegin().getHybridization() == Hybridization.SP2
&& bond.getEnd().getHybridization() == Hybridization.SP2;
} | java | private boolean isSP2Bond(IBond bond) {
return bond.getAtomCount() == 2 && bond.getBegin().getHybridization() == Hybridization.SP2
&& bond.getEnd().getHybridization() == Hybridization.SP2;
} | [
"private",
"boolean",
"isSP2Bond",
"(",
"IBond",
"bond",
")",
"{",
"return",
"bond",
".",
"getAtomCount",
"(",
")",
"==",
"2",
"&&",
"bond",
".",
"getBegin",
"(",
")",
".",
"getHybridization",
"(",
")",
"==",
"Hybridization",
".",
"SP2",
"&&",
"bond",
... | Returns true if the bond binds two atoms, and both atoms are SP2. | [
"Returns",
"true",
"if",
"the",
"bond",
"binds",
"two",
"atoms",
"and",
"both",
"atoms",
"are",
"SP2",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/fingerprint/HybridizationFingerprinter.java#L118-L121 |
113,797 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/Reaction.java | Reaction.mappings | @Override
public Iterable<IMapping> mappings() {
return new Iterable<IMapping>() {
@Override
public Iterator<IMapping> iterator() {
return new MappingIterator();
}
};
} | java | @Override
public Iterable<IMapping> mappings() {
return new Iterable<IMapping>() {
@Override
public Iterator<IMapping> iterator() {
return new MappingIterator();
}
};
} | [
"@",
"Override",
"public",
"Iterable",
"<",
"IMapping",
">",
"mappings",
"(",
")",
"{",
"return",
"new",
"Iterable",
"<",
"IMapping",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Iterator",
"<",
"IMapping",
">",
"iterator",
"(",
")",
"{",
"return",
... | Returns the mappings between the reactant and the product side.
@return An Iterator to the Mappings.
@see #addMapping | [
"Returns",
"the",
"mappings",
"between",
"the",
"reactant",
"and",
"the",
"product",
"side",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/Reaction.java#L172-L181 |
113,798 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/Reaction.java | Reaction.addProduct | @Override
public void addProduct(IAtomContainer product, Double coefficient) {
products.addAtomContainer(product, coefficient);
/*
* notifyChanged() is called by addReactant(Molecule reactant, double
* coefficient)
*/
} | java | @Override
public void addProduct(IAtomContainer product, Double coefficient) {
products.addAtomContainer(product, coefficient);
/*
* notifyChanged() is called by addReactant(Molecule reactant, double
* coefficient)
*/
} | [
"@",
"Override",
"public",
"void",
"addProduct",
"(",
"IAtomContainer",
"product",
",",
"Double",
"coefficient",
")",
"{",
"products",
".",
"addAtomContainer",
"(",
"product",
",",
"coefficient",
")",
";",
"/*\n * notifyChanged() is called by addReactant(Molecule ... | Adds a product to this reaction.
@param product Molecule added as product to this reaction
@param coefficient Stoichiometry coefficient for this molecule
@see #getProducts | [
"Adds",
"a",
"product",
"to",
"this",
"reaction",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/Reaction.java#L268-L275 |
113,799 | cdk/cdk | base/silent/src/main/java/org/openscience/cdk/silent/Reaction.java | Reaction.setReactantCoefficient | @Override
public boolean setReactantCoefficient(IAtomContainer reactant, Double coefficient) {
boolean result = reactants.setMultiplier(reactant, coefficient);
return result;
} | java | @Override
public boolean setReactantCoefficient(IAtomContainer reactant, Double coefficient) {
boolean result = reactants.setMultiplier(reactant, coefficient);
return result;
} | [
"@",
"Override",
"public",
"boolean",
"setReactantCoefficient",
"(",
"IAtomContainer",
"reactant",
",",
"Double",
"coefficient",
")",
"{",
"boolean",
"result",
"=",
"reactants",
".",
"setMultiplier",
"(",
"reactant",
",",
"coefficient",
")",
";",
"return",
"result... | Sets the coefficient of a a reactant to a given value.
@param reactant Reactant for which the coefficient is set
@param coefficient The new coefficient for the given reactant
@return true if Molecule has been found and stoichiometry has been set.
@see #getReactantCoefficient | [
"Sets",
"the",
"coefficient",
"of",
"a",
"a",
"reactant",
"to",
"a",
"given",
"value",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/Reaction.java#L309-L313 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.