id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
114,500
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/graph/invariant/CanonicalLabeler.java
CanonicalLabeler.breakTies
private void breakTies(List<InvPair> v) { Iterator<InvPair> it = v.iterator(); InvPair curr; InvPair last = null; int tie = 0; boolean found = false; for (int x = 0; it.hasNext(); x++) { curr = it.next(); curr.setCurr(curr.getCurr() * 2); ...
java
private void breakTies(List<InvPair> v) { Iterator<InvPair> it = v.iterator(); InvPair curr; InvPair last = null; int tie = 0; boolean found = false; for (int x = 0; it.hasNext(); x++) { curr = it.next(); curr.setCurr(curr.getCurr() * 2); ...
[ "private", "void", "breakTies", "(", "List", "<", "InvPair", ">", "v", ")", "{", "Iterator", "<", "InvPair", ">", "it", "=", "v", ".", "iterator", "(", ")", ";", "InvPair", "curr", ";", "InvPair", "last", "=", "null", ";", "int", "tie", "=", "0", ...
Break ties. Corresponds to step 7 @param v the invariance pair vector
[ "Break", "ties", ".", "Corresponds", "to", "step", "7" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/graph/invariant/CanonicalLabeler.java#L243-L262
114,501
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java
ProteinPocketFinder.readBioPolymer
private void readBioPolymer(String biopolymerFile) { try { // Read PDB file FileReader fileReader = new FileReader(biopolymerFile); ISimpleChemObjectReader reader = new ReaderFactory().createReader(fileReader); IChemFile chemFile = (IChemFile) reader.read((IChemOb...
java
private void readBioPolymer(String biopolymerFile) { try { // Read PDB file FileReader fileReader = new FileReader(biopolymerFile); ISimpleChemObjectReader reader = new ReaderFactory().createReader(fileReader); IChemFile chemFile = (IChemFile) reader.read((IChemOb...
[ "private", "void", "readBioPolymer", "(", "String", "biopolymerFile", ")", "{", "try", "{", "// Read PDB file", "FileReader", "fileReader", "=", "new", "FileReader", "(", "biopolymerFile", ")", ";", "ISimpleChemObjectReader", "reader", "=", "new", "ReaderFactory", "...
Creates from a PDB File a BioPolymer.
[ "Creates", "from", "a", "PDB", "File", "a", "BioPolymer", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java#L124-L139
114,502
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java
ProteinPocketFinder.findGridBoundaries
public double[] findGridBoundaries() { IAtom[] atoms = AtomContainerManipulator.getAtomArray(protein); double[] minMax = new double[6]; minMax[0] = atoms[0].getPoint3d().x; minMax[1] = atoms[0].getPoint3d().x; minMax[2] = atoms[0].getPoint3d().y; minMax[3] = atoms[0].getP...
java
public double[] findGridBoundaries() { IAtom[] atoms = AtomContainerManipulator.getAtomArray(protein); double[] minMax = new double[6]; minMax[0] = atoms[0].getPoint3d().x; minMax[1] = atoms[0].getPoint3d().x; minMax[2] = atoms[0].getPoint3d().y; minMax[3] = atoms[0].getP...
[ "public", "double", "[", "]", "findGridBoundaries", "(", ")", "{", "IAtom", "[", "]", "atoms", "=", "AtomContainerManipulator", ".", "getAtomArray", "(", "protein", ")", ";", "double", "[", "]", "minMax", "=", "new", "double", "[", "6", "]", ";", "minMax...
Method determines the minimum and maximum values of a coordinate space up to 3D space. @return double[] stores min,max,min,max,min,max
[ "Method", "determines", "the", "minimum", "and", "maximum", "values", "of", "a", "coordinate", "space", "up", "to", "3D", "space", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java#L147-L172
114,503
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java
ProteinPocketFinder.createCubicGrid
public void createCubicGrid() { // logger.debug(" CREATE CUBIC GRID"); gridGenerator.setDimension(findGridBoundaries(), true); gridGenerator.generateGrid(); this.grid = gridGenerator.getGrid(); }
java
public void createCubicGrid() { // logger.debug(" CREATE CUBIC GRID"); gridGenerator.setDimension(findGridBoundaries(), true); gridGenerator.generateGrid(); this.grid = gridGenerator.getGrid(); }
[ "public", "void", "createCubicGrid", "(", ")", "{", "//\t\tlogger.debug(\"\tCREATE CUBIC GRID\");", "gridGenerator", ".", "setDimension", "(", "findGridBoundaries", "(", ")", ",", "true", ")", ";", "gridGenerator", ".", "generateGrid", "(", ")", ";", "this", ".", ...
Method creates a cubic grid with the grid generator class.
[ "Method", "creates", "a", "cubic", "grid", "with", "the", "grid", "generator", "class", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java#L177-L182
114,504
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java
ProteinPocketFinder.sortPockets
private void sortPockets() { // logger.debug(" SORT POCKETS Start#:" + pockets.size()); Hashtable<Integer, List<Integer>> hashPockets = new Hashtable<Integer, List<Integer>>(); List<Point3d> pocket; List<List<Point3d>> sortPockets = new ArrayList<List<Point3d>>(pockets.size()); ...
java
private void sortPockets() { // logger.debug(" SORT POCKETS Start#:" + pockets.size()); Hashtable<Integer, List<Integer>> hashPockets = new Hashtable<Integer, List<Integer>>(); List<Point3d> pocket; List<List<Point3d>> sortPockets = new ArrayList<List<Point3d>>(pockets.size()); ...
[ "private", "void", "sortPockets", "(", ")", "{", "//\t\tlogger.debug(\"\tSORT POCKETS Start#:\" + pockets.size());", "Hashtable", "<", "Integer", ",", "List", "<", "Integer", ">", ">", "hashPockets", "=", "new", "Hashtable", "<", "Integer", ",", "List", "<", "Intege...
Method sorts the pockets due to its size. The biggest pocket is the first.
[ "Method", "sorts", "the", "pockets", "due", "to", "its", "size", ".", "The", "biggest", "pocket", "is", "the", "first", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java#L331-L361
114,505
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java
ProteinPocketFinder.checkBoundaries
private int[] checkBoundaries(int[] minMax, int[] dim) { if (minMax[0] < 0) { minMax[0] = 0; } if (minMax[1] > dim[0]) { minMax[1] = dim[0]; } if (minMax[2] < 0) { minMax[2] = 0; } if (minMax[3] > dim[1]) { minMax[3]...
java
private int[] checkBoundaries(int[] minMax, int[] dim) { if (minMax[0] < 0) { minMax[0] = 0; } if (minMax[1] > dim[0]) { minMax[1] = dim[0]; } if (minMax[2] < 0) { minMax[2] = 0; } if (minMax[3] > dim[1]) { minMax[3]...
[ "private", "int", "[", "]", "checkBoundaries", "(", "int", "[", "]", "minMax", ",", "int", "[", "]", "dim", ")", "{", "if", "(", "minMax", "[", "0", "]", "<", "0", ")", "{", "minMax", "[", "0", "]", "=", "0", ";", "}", "if", "(", "minMax", ...
Method checks boundaries. @param minMax with minMax values @param dim dimension @return new minMax values between 0 and dim
[ "Method", "checks", "boundaries", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java#L458-L478
114,506
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java
ProteinPocketFinder.firePSPEvent
private void firePSPEvent(List<Point3d> line) { for (int i = 0; i < line.size(); i++) { this.grid[(int) line.get(i).x][(int) line.get(i).y][(int) line.get(i).z] = this.grid[(int) line.get(i).x][(int) line .get(i).y][(int) line.get(i).z] + 1; } }
java
private void firePSPEvent(List<Point3d> line) { for (int i = 0; i < line.size(); i++) { this.grid[(int) line.get(i).x][(int) line.get(i).y][(int) line.get(i).z] = this.grid[(int) line.get(i).x][(int) line .get(i).y][(int) line.get(i).z] + 1; } }
[ "private", "void", "firePSPEvent", "(", "List", "<", "Point3d", ">", "line", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "line", ".", "size", "(", ")", ";", "i", "++", ")", "{", "this", ".", "grid", "[", "(", "int", ")", "line"...
Method which assigns upon a PSP event +1 to these grid points.
[ "Method", "which", "assigns", "upon", "a", "PSP", "event", "+", "1", "to", "these", "grid", "points", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java#L483-L489
114,507
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java
ProteinPocketFinder.diagonalAxisScanXZY
public void diagonalAxisScanXZY(int dimK, int dimL, int dimM) { // x min ->x max;left upper corner z+y max->min//1 //logger.debug(" diagonalAxisScanXZY"); if (dimM < dimL) { dimL = dimM; } //int gridPoints = 0;//Debugging List<Point3d> line = new ArrayList<Poi...
java
public void diagonalAxisScanXZY(int dimK, int dimL, int dimM) { // x min ->x max;left upper corner z+y max->min//1 //logger.debug(" diagonalAxisScanXZY"); if (dimM < dimL) { dimL = dimM; } //int gridPoints = 0;//Debugging List<Point3d> line = new ArrayList<Poi...
[ "public", "void", "diagonalAxisScanXZY", "(", "int", "dimK", ",", "int", "dimL", ",", "int", "dimM", ")", "{", "// x min ->x max;left upper corner z+y max->min//1", "//logger.debug(\"\tdiagonalAxisScanXZY\");", "if", "(", "dimM", "<", "dimL", ")", "{", "dimL", "=", ...
Method performs a scan; works only for cubic grids! @param dimK first dimension @param dimL second dimension @param dimM third dimension
[ "Method", "performs", "a", "scan", ";", "works", "only", "for", "cubic", "grids!" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java#L498-L538
114,508
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java
ProteinPocketFinder.gridToPmesh
public void gridToPmesh(String outPutFileName) { try { gridGenerator.writeGridInPmeshFormat(outPutFileName); } catch (IOException e) { logger.debug(e); } }
java
public void gridToPmesh(String outPutFileName) { try { gridGenerator.writeGridInPmeshFormat(outPutFileName); } catch (IOException e) { logger.debug(e); } }
[ "public", "void", "gridToPmesh", "(", "String", "outPutFileName", ")", "{", "try", "{", "gridGenerator", ".", "writeGridInPmeshFormat", "(", "outPutFileName", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "logger", ".", "debug", "(", "e", ")", ...
Method writes the grid to pmesh format.
[ "Method", "writes", "the", "grid", "to", "pmesh", "format", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java#L837-L843
114,509
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java
ProteinPocketFinder.writePocketsToPMesh
public void writePocketsToPMesh(String outPutFileName) { try { for (int i = 0; i < pockets.size(); i++) {// go through every // pocket BufferedWriter writer = new BufferedWriter(new FileWriter(outPutFileName + "-" + i + ".pmesh")); List<Point3d> pocke...
java
public void writePocketsToPMesh(String outPutFileName) { try { for (int i = 0; i < pockets.size(); i++) {// go through every // pocket BufferedWriter writer = new BufferedWriter(new FileWriter(outPutFileName + "-" + i + ".pmesh")); List<Point3d> pocke...
[ "public", "void", "writePocketsToPMesh", "(", "String", "outPutFileName", ")", "{", "try", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "pockets", ".", "size", "(", ")", ";", "i", "++", ")", "{", "// go through every", "// pocket", "BufferedWrit...
Method writes the pockets to pmesh format.
[ "Method", "writes", "the", "pockets", "to", "pmesh", "format", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/protein/ProteinPocketFinder.java#L870-L890
114,510
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/geometry/CrystalGeometryTools.java
CrystalGeometryTools.calcInvertedAxes
public static Vector3d[] calcInvertedAxes(Vector3d aAxis, Vector3d bAxis, Vector3d cAxis) { double det = aAxis.x * bAxis.y * cAxis.z - aAxis.x * bAxis.z * cAxis.y - aAxis.y * bAxis.x * cAxis.z + aAxis.y * bAxis.z * cAxis.x + aAxis.z * bAxis.x * cAxis.y - aAxis.z * bAxis.y * cAxis.x; Vect...
java
public static Vector3d[] calcInvertedAxes(Vector3d aAxis, Vector3d bAxis, Vector3d cAxis) { double det = aAxis.x * bAxis.y * cAxis.z - aAxis.x * bAxis.z * cAxis.y - aAxis.y * bAxis.x * cAxis.z + aAxis.y * bAxis.z * cAxis.x + aAxis.z * bAxis.x * cAxis.y - aAxis.z * bAxis.y * cAxis.x; Vect...
[ "public", "static", "Vector3d", "[", "]", "calcInvertedAxes", "(", "Vector3d", "aAxis", ",", "Vector3d", "bAxis", ",", "Vector3d", "cAxis", ")", "{", "double", "det", "=", "aAxis", ".", "x", "*", "bAxis", ".", "y", "*", "cAxis", ".", "z", "-", "aAxis",...
Inverts three cell axes. @return a 3x3 matrix with the three Cartesian vectors representing the unit cell axes. The a axis is the first row.
[ "Inverts", "three", "cell", "axes", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/CrystalGeometryTools.java#L52-L71
114,511
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/geometry/CrystalGeometryTools.java
CrystalGeometryTools.notionalToCartesian
public static Vector3d[] notionalToCartesian(double alength, double blength, double clength, double alpha, double beta, double gamma) { Vector3d[] axes = new Vector3d[3]; /* 1. align the a axis with x axis */ axes[0] = new Vector3d(); axes[0].x = alength; axes[0].y =...
java
public static Vector3d[] notionalToCartesian(double alength, double blength, double clength, double alpha, double beta, double gamma) { Vector3d[] axes = new Vector3d[3]; /* 1. align the a axis with x axis */ axes[0] = new Vector3d(); axes[0].x = alength; axes[0].y =...
[ "public", "static", "Vector3d", "[", "]", "notionalToCartesian", "(", "double", "alength", ",", "double", "blength", ",", "double", "clength", ",", "double", "alpha", ",", "double", "beta", ",", "double", "gamma", ")", "{", "Vector3d", "[", "]", "axes", "=...
Calculates Cartesian vectors for unit cell axes from axes lengths and angles between axes. <p>To calculate Cartesian coordinates, it places the a axis on the x axes, the b axis in the xy plane, making an angle gamma with the a axis, and places the c axis to fulfill the remaining constraints. (See also <a href="http://...
[ "Calculates", "Cartesian", "vectors", "for", "unit", "cell", "axes", "from", "axes", "lengths", "and", "angles", "between", "axes", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/CrystalGeometryTools.java#L118-L154
114,512
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/geometry/CrystalGeometryTools.java
CrystalGeometryTools.fractionalToCartesian
public static void fractionalToCartesian(ICrystal crystal) { Iterator<IAtom> atoms = crystal.atoms().iterator(); Vector3d aAxis = crystal.getA(); Vector3d bAxis = crystal.getB(); Vector3d cAxis = crystal.getC(); while (atoms.hasNext()) { IAtom atom = atoms.next(); ...
java
public static void fractionalToCartesian(ICrystal crystal) { Iterator<IAtom> atoms = crystal.atoms().iterator(); Vector3d aAxis = crystal.getA(); Vector3d bAxis = crystal.getB(); Vector3d cAxis = crystal.getC(); while (atoms.hasNext()) { IAtom atom = atoms.next(); ...
[ "public", "static", "void", "fractionalToCartesian", "(", "ICrystal", "crystal", ")", "{", "Iterator", "<", "IAtom", ">", "atoms", "=", "crystal", ".", "atoms", "(", ")", ".", "iterator", "(", ")", ";", "Vector3d", "aAxis", "=", "crystal", ".", "getA", "...
Creates Cartesian coordinates for all Atoms in the Crystal.
[ "Creates", "Cartesian", "coordinates", "for", "all", "Atoms", "in", "the", "Crystal", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/CrystalGeometryTools.java#L188-L200
114,513
cdk/cdk
tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreBond.java
PharmacophoreBond.getBondLength
public double getBondLength() { PharmacophoreAtom atom1 = PharmacophoreAtom.get(getAtom(0)); PharmacophoreAtom atom2 = PharmacophoreAtom.get(getAtom(1)); return atom1.getPoint3d().distance(atom2.getPoint3d()); }
java
public double getBondLength() { PharmacophoreAtom atom1 = PharmacophoreAtom.get(getAtom(0)); PharmacophoreAtom atom2 = PharmacophoreAtom.get(getAtom(1)); return atom1.getPoint3d().distance(atom2.getPoint3d()); }
[ "public", "double", "getBondLength", "(", ")", "{", "PharmacophoreAtom", "atom1", "=", "PharmacophoreAtom", ".", "get", "(", "getAtom", "(", "0", ")", ")", ";", "PharmacophoreAtom", "atom2", "=", "PharmacophoreAtom", ".", "get", "(", "getAtom", "(", "1", ")"...
Get the distance between the two pharmacophore groups that make up the constraint. @return The distance between the two groups
[ "Get", "the", "distance", "between", "the", "two", "pharmacophore", "groups", "that", "make", "up", "the", "constraint", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreBond.java#L60-L64
114,514
cdk/cdk
tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreQueryAtom.java
PharmacophoreQueryAtom.matches
@Override public boolean matches(IAtom atom) { PharmacophoreAtom patom = PharmacophoreAtom.get(atom); return patom.getSymbol().equals(getSymbol()); }
java
@Override public boolean matches(IAtom atom) { PharmacophoreAtom patom = PharmacophoreAtom.get(atom); return patom.getSymbol().equals(getSymbol()); }
[ "@", "Override", "public", "boolean", "matches", "(", "IAtom", "atom", ")", "{", "PharmacophoreAtom", "patom", "=", "PharmacophoreAtom", ".", "get", "(", "atom", ")", ";", "return", "patom", ".", "getSymbol", "(", ")", ".", "equals", "(", "getSymbol", "(",...
Checks whether this query atom matches a target atom. Currently a query pharmacophore atom will match a target pharmacophore group if the symbols of the two groups match. This is based on the assumption that pharmacophore groups with the same symbol will have the same SMARTS pattern. @param atom A target pharmacophor...
[ "Checks", "whether", "this", "query", "atom", "matches", "a", "target", "atom", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/pcore/src/main/java/org/openscience/cdk/pharmacophore/PharmacophoreQueryAtom.java#L115-L119
114,515
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfPattern.java
DfPattern.matchRoot
Mappings matchRoot(IAtom root) { checkCompatibleAPI(root); IAtomContainer mol = root.getContainer(); if (query.getAtomCount() > 0 && ((IQueryAtom) query.getAtom(0)).matches(root)) { DfState local = new DfState(state); local.setRoot(root); return filter(new Map...
java
Mappings matchRoot(IAtom root) { checkCompatibleAPI(root); IAtomContainer mol = root.getContainer(); if (query.getAtomCount() > 0 && ((IQueryAtom) query.getAtom(0)).matches(root)) { DfState local = new DfState(state); local.setRoot(root); return filter(new Map...
[ "Mappings", "matchRoot", "(", "IAtom", "root", ")", "{", "checkCompatibleAPI", "(", "root", ")", ";", "IAtomContainer", "mol", "=", "root", ".", "getContainer", "(", ")", ";", "if", "(", "query", ".", "getAtomCount", "(", ")", ">", "0", "&&", "(", "(",...
Match the pattern at the provided root. @param root the root atom of the molecule @return mappings @see Mappings
[ "Match", "the", "pattern", "at", "the", "provided", "root", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/DfPattern.java#L141-L151
114,516
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/AtomRefinable.java
AtomRefinable.getInitialPartition
@Override public Partition getInitialPartition() { if (ignoreElements) { int n = atomContainer.getAtomCount(); return Partition.unit(n); } Map<String, SortedSet<Integer>> cellMap = new HashMap<String, SortedSet<Integer>>(); int numberOfAtoms = atomContainer.g...
java
@Override public Partition getInitialPartition() { if (ignoreElements) { int n = atomContainer.getAtomCount(); return Partition.unit(n); } Map<String, SortedSet<Integer>> cellMap = new HashMap<String, SortedSet<Integer>>(); int numberOfAtoms = atomContainer.g...
[ "@", "Override", "public", "Partition", "getInitialPartition", "(", ")", "{", "if", "(", "ignoreElements", ")", "{", "int", "n", "=", "atomContainer", ".", "getAtomCount", "(", ")", ";", "return", "Partition", ".", "unit", "(", "n", ")", ";", "}", "Map",...
Get the element partition from an atom container, which is simply a list of sets of atom indices where all atoms in one set have the same element symbol. So for atoms [C0, N1, C2, P3, C4, N5] the partition would be [{0, 2, 4}, {1, 5}, {3}] with cells for elements C, N, and P. @return a partition of the atom indices b...
[ "Get", "the", "element", "partition", "from", "an", "atom", "container", "which", "is", "simply", "a", "list", "of", "sets", "of", "atom", "indices", "where", "all", "atoms", "in", "one", "set", "have", "the", "same", "element", "symbol", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/AtomRefinable.java#L176-L207
114,517
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/AtomRefinable.java
AtomRefinable.setupConnectionTable
private void setupConnectionTable(IAtomContainer atomContainer) { int atomCount = atomContainer.getAtomCount(); connectionTable = new int[atomCount][]; if (!ignoreBondOrders) { bondOrders = new int[atomCount][]; } for (int atomIndex = 0; atomIndex < atomCount; atomInd...
java
private void setupConnectionTable(IAtomContainer atomContainer) { int atomCount = atomContainer.getAtomCount(); connectionTable = new int[atomCount][]; if (!ignoreBondOrders) { bondOrders = new int[atomCount][]; } for (int atomIndex = 0; atomIndex < atomCount; atomInd...
[ "private", "void", "setupConnectionTable", "(", "IAtomContainer", "atomContainer", ")", "{", "int", "atomCount", "=", "atomContainer", ".", "getAtomCount", "(", ")", ";", "connectionTable", "=", "new", "int", "[", "atomCount", "]", "[", "", "]", ";", "if", "...
Makes a lookup table for the connection between atoms, to avoid looking through the bonds each time. @param atomContainer the atom
[ "Makes", "a", "lookup", "table", "for", "the", "connection", "between", "atoms", "to", "avoid", "looking", "through", "the", "bonds", "each", "time", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/AtomRefinable.java#L215-L247
114,518
cdk/cdk
storage/io/src/main/java/org/openscience/cdk/io/listener/TextGUIListener.java
TextGUIListener.setInputReader
public void setInputReader(Reader reader) { if (reader instanceof BufferedReader) { this.in = (BufferedReader) reader; } else if (reader == null) { this.in = null; } else { this.in = new BufferedReader(reader); } }
java
public void setInputReader(Reader reader) { if (reader instanceof BufferedReader) { this.in = (BufferedReader) reader; } else if (reader == null) { this.in = null; } else { this.in = new BufferedReader(reader); } }
[ "public", "void", "setInputReader", "(", "Reader", "reader", ")", "{", "if", "(", "reader", "instanceof", "BufferedReader", ")", "{", "this", ".", "in", "=", "(", "BufferedReader", ")", "reader", ";", "}", "else", "if", "(", "reader", "==", "null", ")", ...
Overwrites the default reader from which the input is taken.
[ "Overwrites", "the", "default", "reader", "from", "which", "the", "input", "is", "taken", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/listener/TextGUIListener.java#L82-L90
114,519
cdk/cdk
storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNWriter.java
MDLRXNWriter.write
@Override public void write(IChemObject object) throws CDKException { if (object instanceof IReactionSet) { writeReactionSet((IReactionSet) object); } else if (object instanceof IReaction) { writeReaction((IReaction) object); } else { throw new CDKExceptio...
java
@Override public void write(IChemObject object) throws CDKException { if (object instanceof IReactionSet) { writeReactionSet((IReactionSet) object); } else if (object instanceof IReaction) { writeReaction((IReaction) object); } else { throw new CDKExceptio...
[ "@", "Override", "public", "void", "write", "(", "IChemObject", "object", ")", "throws", "CDKException", "{", "if", "(", "object", "instanceof", "IReactionSet", ")", "{", "writeReactionSet", "(", "(", "IReactionSet", ")", "object", ")", ";", "}", "else", "if...
Writes a IChemObject to the MDL RXN file formated output. It can only output ChemObjects of type Reaction @param object class must be of type Molecule or MoleculeSet. @see org.openscience.cdk.ChemFile
[ "Writes", "a", "IChemObject", "to", "the", "MDL", "RXN", "file", "formated", "output", ".", "It", "can", "only", "output", "ChemObjects", "of", "type", "Reaction" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNWriter.java#L170-L179
114,520
cdk/cdk
storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNWriter.java
MDLRXNWriter.writeReactionSet
private void writeReactionSet(IReactionSet reactions) throws CDKException { for (IReaction iReaction : reactions.reactions()) { writeReaction(iReaction); } }
java
private void writeReactionSet(IReactionSet reactions) throws CDKException { for (IReaction iReaction : reactions.reactions()) { writeReaction(iReaction); } }
[ "private", "void", "writeReactionSet", "(", "IReactionSet", "reactions", ")", "throws", "CDKException", "{", "for", "(", "IReaction", "iReaction", ":", "reactions", ".", "reactions", "(", ")", ")", "{", "writeReaction", "(", "iReaction", ")", ";", "}", "}" ]
Writes an array of Reaction to an OutputStream in MDL rdf format. @param reactions Array of Reactions that is written to an OutputStream
[ "Writes", "an", "array", "of", "Reaction", "to", "an", "OutputStream", "in", "MDL", "rdf", "format", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNWriter.java#L186-L191
114,521
cdk/cdk
storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNWriter.java
MDLRXNWriter.writeAtomContainerSet
private void writeAtomContainerSet(IAtomContainerSet som) throws IOException, CDKException { for (int i = 0; i < som.getAtomContainerCount(); i++) { IAtomContainer mol = som.getAtomContainer(i); for (int j = 0; j < som.getMultiplier(i); j++) { StringWriter sw = new Strin...
java
private void writeAtomContainerSet(IAtomContainerSet som) throws IOException, CDKException { for (int i = 0; i < som.getAtomContainerCount(); i++) { IAtomContainer mol = som.getAtomContainer(i); for (int j = 0; j < som.getMultiplier(i); j++) { StringWriter sw = new Strin...
[ "private", "void", "writeAtomContainerSet", "(", "IAtomContainerSet", "som", ")", "throws", "IOException", ",", "CDKException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "som", ".", "getAtomContainerCount", "(", ")", ";", "i", "++", ")", "{", ...
Writes a MoleculeSet to an OutputStream for the reaction. @param som The MoleculeSet that is written to an OutputStream
[ "Writes", "a", "MoleculeSet", "to", "an", "OutputStream", "for", "the", "reaction", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNWriter.java#L279-L300
114,522
cdk/cdk
storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNWriter.java
MDLRXNWriter.formatMDLInt
private String formatMDLInt(int i, int l) { String s = "", fs = ""; NumberFormat nf = NumberFormat.getNumberInstance(Locale.ENGLISH); nf.setParseIntegerOnly(true); nf.setMinimumIntegerDigits(1); nf.setMaximumIntegerDigits(l); nf.setGroupingUsed(false); s = nf.form...
java
private String formatMDLInt(int i, int l) { String s = "", fs = ""; NumberFormat nf = NumberFormat.getNumberInstance(Locale.ENGLISH); nf.setParseIntegerOnly(true); nf.setMinimumIntegerDigits(1); nf.setMaximumIntegerDigits(l); nf.setGroupingUsed(false); s = nf.form...
[ "private", "String", "formatMDLInt", "(", "int", "i", ",", "int", "l", ")", "{", "String", "s", "=", "\"\"", ",", "fs", "=", "\"\"", ";", "NumberFormat", "nf", "=", "NumberFormat", ".", "getNumberInstance", "(", "Locale", ".", "ENGLISH", ")", ";", "nf"...
Formats an int to fit into the connectiontable and changes it to a String. @param i The int to be formated @param l Length of the String @return The String to be written into the connectiontable
[ "Formats", "an", "int", "to", "fit", "into", "the", "connectiontable", "and", "changes", "it", "to", "a", "String", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/ctab/src/main/java/org/openscience/cdk/io/MDLRXNWriter.java#L310-L323
114,523
cdk/cdk
legacy/src/main/java/org/openscience/cdk/isomorphism/matchers/smarts/LogicalOperatorAtom.java
LogicalOperatorAtom.and
public static SMARTSAtom and(IQueryAtom left, IQueryAtom right) { return new Conjunction(left.getBuilder(), left, right); }
java
public static SMARTSAtom and(IQueryAtom left, IQueryAtom right) { return new Conjunction(left.getBuilder(), left, right); }
[ "public", "static", "SMARTSAtom", "and", "(", "IQueryAtom", "left", ",", "IQueryAtom", "right", ")", "{", "return", "new", "Conjunction", "(", "left", ".", "getBuilder", "(", ")", ",", "left", ",", "right", ")", ";", "}" ]
Conjunction the provided expressions. @param left expression @param right expression @return conjunction of the left and right expressions
[ "Conjunction", "the", "provided", "expressions", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/isomorphism/matchers/smarts/LogicalOperatorAtom.java#L151-L153
114,524
cdk/cdk
legacy/src/main/java/org/openscience/cdk/isomorphism/matchers/smarts/LogicalOperatorAtom.java
LogicalOperatorAtom.or
public static SMARTSAtom or(IQueryAtom left, IQueryAtom right) { return new Disjunction(left.getBuilder(), left, right); }
java
public static SMARTSAtom or(IQueryAtom left, IQueryAtom right) { return new Disjunction(left.getBuilder(), left, right); }
[ "public", "static", "SMARTSAtom", "or", "(", "IQueryAtom", "left", ",", "IQueryAtom", "right", ")", "{", "return", "new", "Disjunction", "(", "left", ".", "getBuilder", "(", ")", ",", "left", ",", "right", ")", ";", "}" ]
Disjunction the provided expressions. @param left expression @param right expression @return disjunction of the left and right expressions
[ "Disjunction", "the", "provided", "expressions", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/isomorphism/matchers/smarts/LogicalOperatorAtom.java#L162-L164
114,525
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/elements/path/PathBuilder.java
PathBuilder.quadTo
public PathBuilder quadTo(Point2d cp, Point2d ep) { add(new QuadTo(cp, ep)); return this; }
java
public PathBuilder quadTo(Point2d cp, Point2d ep) { add(new QuadTo(cp, ep)); return this; }
[ "public", "PathBuilder", "quadTo", "(", "Point2d", "cp", ",", "Point2d", "ep", ")", "{", "add", "(", "new", "QuadTo", "(", "cp", ",", "ep", ")", ")", ";", "return", "this", ";", "}" ]
Make a quadratic curve in the path, with one control point. @param cp the control point of the curve @param ep the end point of the curve @return a reference to this builder
[ "Make", "a", "quadratic", "curve", "in", "the", "path", "with", "one", "control", "point", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/elements/path/PathBuilder.java#L111-L114
114,526
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/elements/path/PathBuilder.java
PathBuilder.cubicTo
public PathBuilder cubicTo(Point2d cp1, Point2d cp2, Point2d ep) { add(new CubicTo(cp1, cp2, ep)); return this; }
java
public PathBuilder cubicTo(Point2d cp1, Point2d cp2, Point2d ep) { add(new CubicTo(cp1, cp2, ep)); return this; }
[ "public", "PathBuilder", "cubicTo", "(", "Point2d", "cp1", ",", "Point2d", "cp2", ",", "Point2d", "ep", ")", "{", "add", "(", "new", "CubicTo", "(", "cp1", ",", "cp2", ",", "ep", ")", ")", ";", "return", "this", ";", "}" ]
Make a cubic curve in the path, with two control points. @param cp1 the first control point @param cp2 the second control point @param ep the end point of the curve @return a reference to this builder
[ "Make", "a", "cubic", "curve", "in", "the", "path", "with", "two", "control", "points", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/elements/path/PathBuilder.java#L124-L127
114,527
cdk/cdk
display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/AtomMassGenerator.java
AtomMassGenerator.showCarbon
@Override public boolean showCarbon(IAtom atom, IAtomContainer container, RendererModel model) { Integer massNumber = atom.getMassNumber(); if (massNumber != null) { try { Integer expectedMassNumber = Isotopes.getInstance().getMajorIsotope(atom.getSymbol()).getMassNumber...
java
@Override public boolean showCarbon(IAtom atom, IAtomContainer container, RendererModel model) { Integer massNumber = atom.getMassNumber(); if (massNumber != null) { try { Integer expectedMassNumber = Isotopes.getInstance().getMajorIsotope(atom.getSymbol()).getMassNumber...
[ "@", "Override", "public", "boolean", "showCarbon", "(", "IAtom", "atom", ",", "IAtomContainer", "container", ",", "RendererModel", "model", ")", "{", "Integer", "massNumber", "=", "atom", ".", "getMassNumber", "(", ")", ";", "if", "(", "massNumber", "!=", "...
Returns true if the mass number of this element is set and not equal the mass number of the most abundant isotope of this element. @param atom {@link IAtom} which is being examined @param container {@link IAtomContainer} of which the atom is part @param model the {@link RendererModel} @return true, when ma...
[ "Returns", "true", "if", "the", "mass", "number", "of", "this", "element", "is", "set", "and", "not", "equal", "the", "mass", "number", "of", "the", "most", "abundant", "isotope", "of", "this", "element", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/AtomMassGenerator.java#L49-L62
114,528
cdk/cdk
descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/AtomPairs2DFingerprinter.java
AtomPairs2DFingerprinter.encodePath
private static String encodePath(int dist, IAtom a, IAtom b) { return dist + "_" + a.getSymbol() + "_" + b.getSymbol(); }
java
private static String encodePath(int dist, IAtom a, IAtom b) { return dist + "_" + a.getSymbol() + "_" + b.getSymbol(); }
[ "private", "static", "String", "encodePath", "(", "int", "dist", ",", "IAtom", "a", ",", "IAtom", "b", ")", "{", "return", "dist", "+", "\"_\"", "+", "a", ".", "getSymbol", "(", ")", "+", "\"_\"", "+", "b", ".", "getSymbol", "(", ")", ";", "}" ]
Creates the fingerprint name which is used as a key in our hashes @param dist @param a @param b @return
[ "Creates", "the", "fingerprint", "name", "which", "is", "used", "as", "a", "key", "in", "our", "hashes" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/AtomPairs2DFingerprinter.java#L114-L116
114,529
cdk/cdk
descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/AtomPairs2DFingerprinter.java
AtomPairs2DFingerprinter.encodeHalPath
private static String encodeHalPath(int dist, IAtom a, IAtom b) { return dist + "_" + (isHalogen(a) ? "X" : a.getSymbol()) + "_" + (isHalogen(b) ? "X" : b.getSymbol()); }
java
private static String encodeHalPath(int dist, IAtom a, IAtom b) { return dist + "_" + (isHalogen(a) ? "X" : a.getSymbol()) + "_" + (isHalogen(b) ? "X" : b.getSymbol()); }
[ "private", "static", "String", "encodeHalPath", "(", "int", "dist", ",", "IAtom", "a", ",", "IAtom", "b", ")", "{", "return", "dist", "+", "\"_\"", "+", "(", "isHalogen", "(", "a", ")", "?", "\"X\"", ":", "a", ".", "getSymbol", "(", ")", ")", "+", ...
Encodes name for halogen paths @param dist @param a @param b @return
[ "Encodes", "name", "for", "halogen", "paths" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/AtomPairs2DFingerprinter.java#L125-L128
114,530
cdk/cdk
descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/AtomPairs2DFingerprinter.java
AtomPairs2DFingerprinter.calculate
private void calculate(List<String> paths, IAtomContainer mol) { AllPairsShortestPaths apsp = new AllPairsShortestPaths(mol); int numAtoms = mol.getAtomCount(); for (int i = 0; i < numAtoms; i++) { if (!include(mol.getAtom(i))) continue; ...
java
private void calculate(List<String> paths, IAtomContainer mol) { AllPairsShortestPaths apsp = new AllPairsShortestPaths(mol); int numAtoms = mol.getAtomCount(); for (int i = 0; i < numAtoms; i++) { if (!include(mol.getAtom(i))) continue; ...
[ "private", "void", "calculate", "(", "List", "<", "String", ">", "paths", ",", "IAtomContainer", "mol", ")", "{", "AllPairsShortestPaths", "apsp", "=", "new", "AllPairsShortestPaths", "(", "mol", ")", ";", "int", "numAtoms", "=", "mol", ".", "getAtomCount", ...
This performs the calculations used to generate the fingerprint @param paths @param mol
[ "This", "performs", "the", "calculations", "used", "to", "generate", "the", "fingerprint" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/AtomPairs2DFingerprinter.java#L135-L156
114,531
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/io/INChIReader.java
INChIReader.init
private void init() { boolean success = false; // If JAXP is prefered (comes with Sun JVM 1.4.0 and higher) if (!success) { try { javax.xml.parsers.SAXParserFactory spf = javax.xml.parsers.SAXParserFactory.newInstance(); spf.setNamespaceAware(true); ...
java
private void init() { boolean success = false; // If JAXP is prefered (comes with Sun JVM 1.4.0 and higher) if (!success) { try { javax.xml.parsers.SAXParserFactory spf = javax.xml.parsers.SAXParserFactory.newInstance(); spf.setNamespaceAware(true); ...
[ "private", "void", "init", "(", ")", "{", "boolean", "success", "=", "false", ";", "// If JAXP is prefered (comes with Sun JVM 1.4.0 and higher)", "if", "(", "!", "success", ")", "{", "try", "{", "javax", ".", "xml", ".", "parsers", ".", "SAXParserFactory", "spf...
Initializes this reader.
[ "Initializes", "this", "reader", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/io/INChIReader.java#L114-L157
114,532
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.add3DCoordinatesForSinglyBondedLigands
public void add3DCoordinatesForSinglyBondedLigands(IAtomContainer atomContainer) throws CDKException { IAtom refAtom = null; IAtom atomC = null; int nwanted = 0; for (int i = 0; i < atomContainer.getAtomCount(); i++) { refAtom = atomContainer.getAtom(i); if (!refA...
java
public void add3DCoordinatesForSinglyBondedLigands(IAtomContainer atomContainer) throws CDKException { IAtom refAtom = null; IAtom atomC = null; int nwanted = 0; for (int i = 0; i < atomContainer.getAtomCount(); i++) { refAtom = atomContainer.getAtom(i); if (!refA...
[ "public", "void", "add3DCoordinatesForSinglyBondedLigands", "(", "IAtomContainer", "atomContainer", ")", "throws", "CDKException", "{", "IAtom", "refAtom", "=", "null", ";", "IAtom", "atomC", "=", "null", ";", "int", "nwanted", "=", "0", ";", "for", "(", "int", ...
Generate coordinates for all atoms which are singly bonded and have no coordinates. This is useful when hydrogens are present but have no coordinates. It knows about C, O, N, S only and will give tetrahedral or trigonal geometry elsewhere. Bond lengths are computed from covalent radii or taken out of a parameter set if...
[ "Generate", "coordinates", "for", "all", "atoms", "which", "are", "singly", "bonded", "and", "have", "no", "coordinates", ".", "This", "is", "useful", "when", "hydrogens", "are", "present", "but", "have", "no", "coordinates", ".", "It", "knows", "about", "C"...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L88-L120
114,533
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.rescaleBondLength
public Point3d rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2) { Point3d point1 = atom1.getPoint3d(); Double d1 = atom1.getCovalentRadius(); Double d2 = atom2.getCovalentRadius(); // in case we have no covalent radii, set to 1.0 double distance = (d1 == null || d2 == ...
java
public Point3d rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2) { Point3d point1 = atom1.getPoint3d(); Double d1 = atom1.getCovalentRadius(); Double d2 = atom2.getCovalentRadius(); // in case we have no covalent radii, set to 1.0 double distance = (d1 == null || d2 == ...
[ "public", "Point3d", "rescaleBondLength", "(", "IAtom", "atom1", ",", "IAtom", "atom2", ",", "Point3d", "point2", ")", "{", "Point3d", "point1", "=", "atom1", ".", "getPoint3d", "(", ")", ";", "Double", "d1", "=", "atom1", ".", "getCovalentRadius", "(", ")...
Rescales Point2 so that length 1-2 is sum of covalent radii. If covalent radii cannot be found, use bond length of 1.0 @param atom1 stationary atom @param atom2 movable atom @param point2 coordinates for atom 2 @return new coordinates for atom 2
[ "Rescales", "Point2", "so", "that", "length", "1", "-", "2", "is", "sum", "of", "covalent", "radii", ".", "If", "covalent", "radii", "cannot", "be", "found", "use", "bond", "length", "of", "1", ".", "0" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L131-L147
114,534
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.get3DCoordinatesForSP2Ligands
public Point3d[] get3DCoordinatesForSP2Ligands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords, IAtom atomC, double length, double angle) { //logger.debug(" SP2 Ligands start"); Point3d newPoints[] = new Point3d[1]; if (angle < 0) { angle = SP2_ANGLE; ...
java
public Point3d[] get3DCoordinatesForSP2Ligands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords, IAtom atomC, double length, double angle) { //logger.debug(" SP2 Ligands start"); Point3d newPoints[] = new Point3d[1]; if (angle < 0) { angle = SP2_ANGLE; ...
[ "public", "Point3d", "[", "]", "get3DCoordinatesForSP2Ligands", "(", "IAtom", "refAtom", ",", "IAtomContainer", "noCoords", ",", "IAtomContainer", "withCoords", ",", "IAtom", "atomC", ",", "double", "length", ",", "double", "angle", ")", "{", "//logger.debug(\" SP2 ...
Main method for the calculation of the ligand coordinates for sp2 atoms. Decides if one or two coordinates should be created @param refAtom central atom (Atom) @param noCoords Description of the Parameter @param withCoords Description of the Parameter @param atomC Descript...
[ "Main", "method", "for", "the", "calculation", "of", "the", "ligand", "coordinates", "for", "sp2", "atoms", ".", "Decides", "if", "one", "or", "two", "coordinates", "should", "be", "created" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L258-L277
114,535
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.get3DCoordinatesForSP3Ligands
public Point3d[] get3DCoordinatesForSP3Ligands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords, IAtom atomC, int nwanted, double length, double angle) { //logger.debug("SP3 Ligands start "); Point3d newPoints[] = new Point3d[0]; Point3d aPoint = refAtom.getPoint3d()...
java
public Point3d[] get3DCoordinatesForSP3Ligands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords, IAtom atomC, int nwanted, double length, double angle) { //logger.debug("SP3 Ligands start "); Point3d newPoints[] = new Point3d[0]; Point3d aPoint = refAtom.getPoint3d()...
[ "public", "Point3d", "[", "]", "get3DCoordinatesForSP3Ligands", "(", "IAtom", "refAtom", ",", "IAtomContainer", "noCoords", ",", "IAtomContainer", "withCoords", ",", "IAtom", "atomC", ",", "int", "nwanted", ",", "double", "length", ",", "double", "angle", ")", "...
Main method for the calculation of the ligand coordinates for sp3 atoms. Decides how many coordinates should be created @param refAtom central atom (Atom) @param nwanted how many ligands should be created @param length bond length @param angle angle in a B-A-(X) syste...
[ "Main", "method", "for", "the", "calculation", "of", "the", "ligand", "coordinates", "for", "sp3", "atoms", ".", "Decides", "how", "many", "coordinates", "should", "be", "created" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L293-L320
114,536
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.getNonColinearVector
private Vector3d getNonColinearVector(Vector3d ab) { Vector3d cr = new Vector3d(); cr.cross(ab, XV); if (cr.length() > 0.00001) { return XV; } else { return YV; } }
java
private Vector3d getNonColinearVector(Vector3d ab) { Vector3d cr = new Vector3d(); cr.cross(ab, XV); if (cr.length() > 0.00001) { return XV; } else { return YV; } }
[ "private", "Vector3d", "getNonColinearVector", "(", "Vector3d", "ab", ")", "{", "Vector3d", "cr", "=", "new", "Vector3d", "(", ")", ";", "cr", ".", "cross", "(", "ab", ",", "XV", ")", ";", "if", "(", "cr", ".", "length", "(", ")", ">", "0.00001", "...
Gets the nonColinearVector attribute of the AtomLigandPlacer3D class @param ab Description of the Parameter @return The nonColinearVector value
[ "Gets", "the", "nonColinearVector", "attribute", "of", "the", "AtomLigandPlacer3D", "class" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L645-L653
114,537
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.rotate
public static Vector3d rotate(Vector3d vector, Vector3d axis, double angle) { Matrix3d rotate = new Matrix3d(); rotate.set(new AxisAngle4d(axis.x, axis.y, axis.z, angle)); Vector3d result = new Vector3d(); rotate.transform(vector, result); return result; }
java
public static Vector3d rotate(Vector3d vector, Vector3d axis, double angle) { Matrix3d rotate = new Matrix3d(); rotate.set(new AxisAngle4d(axis.x, axis.y, axis.z, angle)); Vector3d result = new Vector3d(); rotate.transform(vector, result); return result; }
[ "public", "static", "Vector3d", "rotate", "(", "Vector3d", "vector", ",", "Vector3d", "axis", ",", "double", "angle", ")", "{", "Matrix3d", "rotate", "=", "new", "Matrix3d", "(", ")", ";", "rotate", ".", "set", "(", "new", "AxisAngle4d", "(", "axis", "."...
Rotates a vector around an axis. @param vector vector to be rotated around axis @param axis axis of rotation @param angle angle to vector rotate around @return rotated vector author: egonw
[ "Rotates", "a", "vector", "around", "an", "axis", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L664-L670
114,538
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.getDistanceValue
private double getDistanceValue(String id1, String id2) { String dkey = ""; if (pSet.containsKey(("bond" + id1 + ";" + id2))) { dkey = "bond" + id1 + ";" + id2; } else if (pSet.containsKey(("bond" + id2 + ";" + id1))) { dkey = "bond" + id2 + ";" + id1; } else { ...
java
private double getDistanceValue(String id1, String id2) { String dkey = ""; if (pSet.containsKey(("bond" + id1 + ";" + id2))) { dkey = "bond" + id1 + ";" + id2; } else if (pSet.containsKey(("bond" + id2 + ";" + id1))) { dkey = "bond" + id2 + ";" + id1; } else { ...
[ "private", "double", "getDistanceValue", "(", "String", "id1", ",", "String", "id2", ")", "{", "String", "dkey", "=", "\"\"", ";", "if", "(", "pSet", ".", "containsKey", "(", "(", "\"bond\"", "+", "id1", "+", "\";\"", "+", "id2", ")", ")", ")", "{", ...
Gets the distance between two atoms out of the parameter set. @param id1 id of the parameter set for atom1 (atom1.getAtomTypeName()) @param id2 id of the parameter set for atom2 @return The distanceValue value @exception Exception Description of the Exception
[ "Gets", "the", "distance", "between", "two", "atoms", "out", "of", "the", "parameter", "set", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L680-L691
114,539
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.getSpatproduct
public double getSpatproduct(Vector3d a, Vector3d b, Vector3d c) { return (c.x * (b.y * a.z - b.z * a.y) + c.y * (b.z * a.x - b.x * a.z) + c.z * (b.x * a.y - b.y * a.x)); }
java
public double getSpatproduct(Vector3d a, Vector3d b, Vector3d c) { return (c.x * (b.y * a.z - b.z * a.y) + c.y * (b.z * a.x - b.x * a.z) + c.z * (b.x * a.y - b.y * a.x)); }
[ "public", "double", "getSpatproduct", "(", "Vector3d", "a", ",", "Vector3d", "b", ",", "Vector3d", "c", ")", "{", "return", "(", "c", ".", "x", "*", "(", "b", ".", "y", "*", "a", ".", "z", "-", "b", ".", "z", "*", "a", ".", "y", ")", "+", "...
Gets the spatproduct of three vectors. @param a vector a @param b vector b @param c vector c @return double value of the spatproduct
[ "Gets", "the", "spatproduct", "of", "three", "vectors", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L774-L776
114,540
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.getTorsionAngle
public double getTorsionAngle(Point3d a, Point3d b, Point3d c, Point3d d) { Vector3d ab = new Vector3d(a.x - b.x, a.y - b.y, a.z - b.z); Vector3d cb = new Vector3d(c.x - b.x, c.y - b.y, c.z - b.z); Vector3d dc = new Vector3d(d.x - c.x, d.y - c.y, d.z - c.z); Vector3d bc = new Vector3d(b....
java
public double getTorsionAngle(Point3d a, Point3d b, Point3d c, Point3d d) { Vector3d ab = new Vector3d(a.x - b.x, a.y - b.y, a.z - b.z); Vector3d cb = new Vector3d(c.x - b.x, c.y - b.y, c.z - b.z); Vector3d dc = new Vector3d(d.x - c.x, d.y - c.y, d.z - c.z); Vector3d bc = new Vector3d(b....
[ "public", "double", "getTorsionAngle", "(", "Point3d", "a", ",", "Point3d", "b", ",", "Point3d", "c", ",", "Point3d", "d", ")", "{", "Vector3d", "ab", "=", "new", "Vector3d", "(", "a", ".", "x", "-", "b", ".", "x", ",", "a", ".", "y", "-", "b", ...
Calculates the torsionAngle of a-b-c-d. @param a Point3d @param b Point3d @param c Point3d @param d Point3d @return The torsionAngle value
[ "Calculates", "the", "torsionAngle", "of", "a", "-", "b", "-", "c", "-", "d", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L787-L806
114,541
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.getPlacedAtomsInAtomContainer
public IAtomContainer getPlacedAtomsInAtomContainer(IAtom atom, IAtomContainer ac) { List bonds = ac.getConnectedBondsList(atom); IAtomContainer connectedAtoms = atom.getBuilder().newInstance(IAtomContainer.class); IAtom connectedAtom = null; for (int i = 0; i < bonds.size(); i++) { ...
java
public IAtomContainer getPlacedAtomsInAtomContainer(IAtom atom, IAtomContainer ac) { List bonds = ac.getConnectedBondsList(atom); IAtomContainer connectedAtoms = atom.getBuilder().newInstance(IAtomContainer.class); IAtom connectedAtom = null; for (int i = 0; i < bonds.size(); i++) { ...
[ "public", "IAtomContainer", "getPlacedAtomsInAtomContainer", "(", "IAtom", "atom", ",", "IAtomContainer", "ac", ")", "{", "List", "bonds", "=", "ac", ".", "getConnectedBondsList", "(", "atom", ")", ";", "IAtomContainer", "connectedAtoms", "=", "atom", ".", "getBui...
Gets all placed neighbouring atoms of a atom. @param atom central atom (Atom) @param ac the molecule @return all connected and placed atoms to the central atom ((AtomContainer)
[ "Gets", "all", "placed", "neighbouring", "atoms", "of", "a", "atom", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L816-L828
114,542
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.getUnsetAtomsInAtomContainer
public IAtomContainer getUnsetAtomsInAtomContainer(IAtom atom, IAtomContainer ac) { List atoms = ac.getConnectedAtomsList(atom); IAtomContainer connectedAtoms = atom.getBuilder().newInstance(IAtomContainer.class); for (int i = 0; i < atoms.size(); i++) { IAtom curAtom = (IAtom) atoms...
java
public IAtomContainer getUnsetAtomsInAtomContainer(IAtom atom, IAtomContainer ac) { List atoms = ac.getConnectedAtomsList(atom); IAtomContainer connectedAtoms = atom.getBuilder().newInstance(IAtomContainer.class); for (int i = 0; i < atoms.size(); i++) { IAtom curAtom = (IAtom) atoms...
[ "public", "IAtomContainer", "getUnsetAtomsInAtomContainer", "(", "IAtom", "atom", ",", "IAtomContainer", "ac", ")", "{", "List", "atoms", "=", "ac", ".", "getConnectedAtomsList", "(", "atom", ")", ";", "IAtomContainer", "connectedAtoms", "=", "atom", ".", "getBuil...
Gets the unsetAtomsInAtomContainer attribute of the AtomTetrahedralLigandPlacer3D object. @param atom Description of the Parameter @param ac Description of the Parameter @return The unsetAtomsInAtomContainer value
[ "Gets", "the", "unsetAtomsInAtomContainer", "attribute", "of", "the", "AtomTetrahedralLigandPlacer3D", "object", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L838-L848
114,543
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.getPlacedHeavyAtomInAtomContainer
public IAtom getPlacedHeavyAtomInAtomContainer(IAtom atomA, IAtom atomB, IAtomContainer ac) { List atoms = ac.getConnectedAtomsList(atomA); IAtom atom = null; for (int i = 0; i < atoms.size(); i++) { IAtom curAtom = (IAtom) atoms.get(i); if (curAtom.getFlag(CDKConstants.I...
java
public IAtom getPlacedHeavyAtomInAtomContainer(IAtom atomA, IAtom atomB, IAtomContainer ac) { List atoms = ac.getConnectedAtomsList(atomA); IAtom atom = null; for (int i = 0; i < atoms.size(); i++) { IAtom curAtom = (IAtom) atoms.get(i); if (curAtom.getFlag(CDKConstants.I...
[ "public", "IAtom", "getPlacedHeavyAtomInAtomContainer", "(", "IAtom", "atomA", ",", "IAtom", "atomB", ",", "IAtomContainer", "ac", ")", "{", "List", "atoms", "=", "ac", ".", "getConnectedAtomsList", "(", "atomA", ")", ";", "IAtom", "atom", "=", "null", ";", ...
Returns a placed neighbouring atom of a central atom atomA, which is not atomB. @param atomA central atom (Atom) @param atomB atom connected to atomA (Atom) @param ac molecule @return returns a connected atom (Atom)
[ "Returns", "a", "placed", "neighbouring", "atom", "of", "a", "central", "atom", "atomA", "which", "is", "not", "atomB", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L870-L880
114,544
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/periodictable/PeriodicTable.java
PeriodicTable.getChemicalSeries
public static String getChemicalSeries(String symbol) { Elements e = Elements.ofString(symbol); for (Series s : Series.values()) if (s.contains(e)) return s.name(); return null; }
java
public static String getChemicalSeries(String symbol) { Elements e = Elements.ofString(symbol); for (Series s : Series.values()) if (s.contains(e)) return s.name(); return null; }
[ "public", "static", "String", "getChemicalSeries", "(", "String", "symbol", ")", "{", "Elements", "e", "=", "Elements", ".", "ofString", "(", "symbol", ")", ";", "for", "(", "Series", "s", ":", "Series", ".", "values", "(", ")", ")", "if", "(", "s", ...
Get the chemical series for an element. @param symbol the symbol of the element @return the chemical series of the element
[ "Get", "the", "chemical", "series", "for", "an", "element", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/periodictable/PeriodicTable.java#L91-L96
114,545
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/periodictable/PeriodicTable.java
PeriodicTable.getPhase
public static String getPhase(String symbol) { Elements e = Elements.ofString(symbol); for (Phase p : Phase.values()) if (p.contains(e)) return p.name(); return null; }
java
public static String getPhase(String symbol) { Elements e = Elements.ofString(symbol); for (Phase p : Phase.values()) if (p.contains(e)) return p.name(); return null; }
[ "public", "static", "String", "getPhase", "(", "String", "symbol", ")", "{", "Elements", "e", "=", "Elements", ".", "ofString", "(", "symbol", ")", ";", "for", "(", "Phase", "p", ":", "Phase", ".", "values", "(", ")", ")", "if", "(", "p", ".", "con...
Get the phase of the element. @param symbol the symbol of the element @return the phase of the element
[ "Get", "the", "phase", "of", "the", "element", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/periodictable/PeriodicTable.java#L134-L139
114,546
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/periodictable/PeriodicTable.java
PeriodicTable.casIds
private static Map<Elements, String> casIds() { Map<Elements, String> result = ids; if (result == null) { synchronized (LOCK) { result = ids; if (result == null) { ids = result = initCasIds(); } } } ...
java
private static Map<Elements, String> casIds() { Map<Elements, String> result = ids; if (result == null) { synchronized (LOCK) { result = ids; if (result == null) { ids = result = initCasIds(); } } } ...
[ "private", "static", "Map", "<", "Elements", ",", "String", ">", "casIds", "(", ")", "{", "Map", "<", "Elements", ",", "String", ">", "result", "=", "ids", ";", "if", "(", "result", "==", "null", ")", "{", "synchronized", "(", "LOCK", ")", "{", "re...
Lazily obtain the CAS ID Mapping. @return CAS id mapping
[ "Lazily", "obtain", "the", "CAS", "ID", "Mapping", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/periodictable/PeriodicTable.java#L249-L260
114,547
cdk/cdk
storage/pdb/src/main/java/org/openscience/cdk/tools/ProteinBuilderTool.java
ProteinBuilderTool.addAminoAcidAtNTerminus
public static IBioPolymer addAminoAcidAtNTerminus(IBioPolymer protein, IAminoAcid aaToAdd, IStrand strand, IAminoAcid aaToAddTo) { // then add the amino acid addAminoAcid(protein, aaToAdd, strand); // Now think about the protein back bone connection if (protein.getMonomerCoun...
java
public static IBioPolymer addAminoAcidAtNTerminus(IBioPolymer protein, IAminoAcid aaToAdd, IStrand strand, IAminoAcid aaToAddTo) { // then add the amino acid addAminoAcid(protein, aaToAdd, strand); // Now think about the protein back bone connection if (protein.getMonomerCoun...
[ "public", "static", "IBioPolymer", "addAminoAcidAtNTerminus", "(", "IBioPolymer", "protein", ",", "IAminoAcid", "aaToAdd", ",", "IStrand", "strand", ",", "IAminoAcid", "aaToAddTo", ")", "{", "// then add the amino acid", "addAminoAcid", "(", "protein", ",", "aaToAdd", ...
Builds a protein by connecting a new amino acid at the N-terminus of the given strand. @param protein protein to which the strand belongs @param aaToAdd amino acid to add to the strand of the protein @param strand strand to which the protein is added
[ "Builds", "a", "protein", "by", "connecting", "a", "new", "amino", "acid", "at", "the", "N", "-", "terminus", "of", "the", "given", "strand", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/pdb/src/main/java/org/openscience/cdk/tools/ProteinBuilderTool.java#L60-L72
114,548
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LongestAliphaticChainDescriptor.java
LongestAliphaticChainDescriptor.getMaxDepth
private static int getMaxDepth(int[][] adjlist, int v, int prev) { int longest = 0; for (int w : adjlist[v]) { if (w == prev) continue; // no cycles so don't need to check previous int length = getMaxDepth(adjlist, w, v); if (length > longest) ...
java
private static int getMaxDepth(int[][] adjlist, int v, int prev) { int longest = 0; for (int w : adjlist[v]) { if (w == prev) continue; // no cycles so don't need to check previous int length = getMaxDepth(adjlist, w, v); if (length > longest) ...
[ "private", "static", "int", "getMaxDepth", "(", "int", "[", "]", "[", "]", "adjlist", ",", "int", "v", ",", "int", "prev", ")", "{", "int", "longest", "=", "0", ";", "for", "(", "int", "w", ":", "adjlist", "[", "v", "]", ")", "{", "if", "(", ...
Depth-First-Search on an acyclic graph. Since we have no cycles we don't need the visit flags and only need to know which atom we came from. @param adjlist adjacency list representation of grah @param v the current atom index @param prev the previous atom index @return the max length traversed
[ "Depth", "-", "First", "-", "Search", "on", "an", "acyclic", "graph", ".", "Since", "we", "have", "no", "cycles", "we", "don", "t", "need", "the", "visit", "flags", "and", "only", "need", "to", "know", "which", "atom", "we", "came", "from", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LongestAliphaticChainDescriptor.java#L154-L164
114,549
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LongestAliphaticChainDescriptor.java
LongestAliphaticChainDescriptor.getParameterType
@Override public Object getParameterType(String name) { if (name.equals(CHECK_RING_SYSTEM)) return Boolean.TRUE; else throw new IllegalArgumentException("No parameter for name: " + name); }
java
@Override public Object getParameterType(String name) { if (name.equals(CHECK_RING_SYSTEM)) return Boolean.TRUE; else throw new IllegalArgumentException("No parameter for name: " + name); }
[ "@", "Override", "public", "Object", "getParameterType", "(", "String", "name", ")", "{", "if", "(", "name", ".", "equals", "(", "CHECK_RING_SYSTEM", ")", ")", "return", "Boolean", ".", "TRUE", ";", "else", "throw", "new", "IllegalArgumentException", "(", "\...
Gets the parameterType attribute of the LongestAliphaticChainDescriptor object. @param name Description of the Parameter @return An Object of class equal to that of the parameter being requested
[ "Gets", "the", "parameterType", "attribute", "of", "the", "LongestAliphaticChainDescriptor", "object", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/LongestAliphaticChainDescriptor.java#L245-L251
114,550
cdk/cdk
storage/inchi/src/main/java/org/openscience/cdk/inchi/InChIToStructure.java
InChIToStructure.findOtherSinglyBonded
private static IAtom findOtherSinglyBonded(IAtomContainer container, IAtom atom, IAtom exclude) { for (final IBond bond : container.getConnectedBondsList(atom)) { if (!IBond.Order.SINGLE.equals(bond.getOrder()) || bond.contains(exclude)) continue; return bond.getOther(atom); } ...
java
private static IAtom findOtherSinglyBonded(IAtomContainer container, IAtom atom, IAtom exclude) { for (final IBond bond : container.getConnectedBondsList(atom)) { if (!IBond.Order.SINGLE.equals(bond.getOrder()) || bond.contains(exclude)) continue; return bond.getOther(atom); } ...
[ "private", "static", "IAtom", "findOtherSinglyBonded", "(", "IAtomContainer", "container", ",", "IAtom", "atom", ",", "IAtom", "exclude", ")", "{", "for", "(", "final", "IBond", "bond", ":", "container", ".", "getConnectedBondsList", "(", "atom", ")", ")", "{"...
Finds a neighbor attached to 'atom' that is singley bonded and isn't 'exclude'. If no such atom exists, the 'atom' is returned. @param container a molecule container @param atom the atom to find the neighbor or @param exclude don't find this atom @return the other atom (or 'atom')
[ "Finds", "a", "neighbor", "attached", "to", "atom", "that", "is", "singley", "bonded", "and", "isn", "t", "exclude", ".", "If", "no", "such", "atom", "exists", "the", "atom", "is", "returned", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/inchi/src/main/java/org/openscience/cdk/inchi/InChIToStructure.java#L394-L400
114,551
cdk/cdk
storage/io/src/main/java/org/openscience/cdk/io/Gaussian98Reader.java
Gaussian98Reader.readChemFile
private IChemFile readChemFile(IChemFile chemFile) throws CDKException, IOException { IChemSequence sequence = chemFile.getBuilder().newInstance(IChemSequence.class); IChemModel model = null; String line = input.readLine(); String levelOfTheory; String description; int mo...
java
private IChemFile readChemFile(IChemFile chemFile) throws CDKException, IOException { IChemSequence sequence = chemFile.getBuilder().newInstance(IChemSequence.class); IChemModel model = null; String line = input.readLine(); String levelOfTheory; String description; int mo...
[ "private", "IChemFile", "readChemFile", "(", "IChemFile", "chemFile", ")", "throws", "CDKException", ",", "IOException", "{", "IChemSequence", "sequence", "=", "chemFile", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IChemSequence", ".", "class", ")", ...
Read the Gaussian98 output. @return a ChemFile with the coordinates, energies, and vibrations. @throws IOException if an I/O error occurs @throws CDKException Description of the Exception
[ "Read", "the", "Gaussian98", "output", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/Gaussian98Reader.java#L178-L256
114,552
cdk/cdk
storage/io/src/main/java/org/openscience/cdk/io/Gaussian98Reader.java
Gaussian98Reader.readNMRData
private void readNMRData(IChemModel model, String labelLine) throws CDKException { List<IAtomContainer> containers = ChemModelManipulator.getAllAtomContainers(model); if (containers.size() == 0) { // nothing to store the results into return; } // otherwise insert in the f...
java
private void readNMRData(IChemModel model, String labelLine) throws CDKException { List<IAtomContainer> containers = ChemModelManipulator.getAllAtomContainers(model); if (containers.size() == 0) { // nothing to store the results into return; } // otherwise insert in the f...
[ "private", "void", "readNMRData", "(", "IChemModel", "model", ",", "String", "labelLine", ")", "throws", "CDKException", "{", "List", "<", "IAtomContainer", ">", "containers", "=", "ChemModelManipulator", ".", "getAllAtomContainers", "(", "model", ")", ";", "if", ...
Reads NMR nuclear shieldings.
[ "Reads", "NMR", "nuclear", "shieldings", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/Gaussian98Reader.java#L413-L461
114,553
cdk/cdk
storage/io/src/main/java/org/openscience/cdk/io/Gaussian98Reader.java
Gaussian98Reader.parseLevelOfTheory
private String parseLevelOfTheory(String line) { StringBuffer summary = new StringBuffer(); summary.append(line); try { do { line = input.readLine().trim(); summary.append(line); } while (!(line.indexOf('@') >= 0)); } catch (Except...
java
private String parseLevelOfTheory(String line) { StringBuffer summary = new StringBuffer(); summary.append(line); try { do { line = input.readLine().trim(); summary.append(line); } while (!(line.indexOf('@') >= 0)); } catch (Except...
[ "private", "String", "parseLevelOfTheory", "(", "String", "line", ")", "{", "StringBuffer", "summary", "=", "new", "StringBuffer", "(", ")", ";", "summary", ".", "append", "(", "line", ")", ";", "try", "{", "do", "{", "line", "=", "input", ".", "readLine...
Select the theory and basis set from the first archive line. @param line Description of the Parameter @return Description of the Return Value
[ "Select", "the", "theory", "and", "basis", "set", "from", "the", "first", "archive", "line", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/Gaussian98Reader.java#L469-L496
114,554
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/formula/rules/NitrogenRule.java
NitrogenRule.validate
@Override public double validate(IMolecularFormula formula) throws CDKException { logger.info("Start validation of ", formula); double mass = MolecularFormulaManipulator.getTotalMassNumber(formula); if (mass == 0) return 0.0; int numberN = MolecularFormulaManipulator.getElementCoun...
java
@Override public double validate(IMolecularFormula formula) throws CDKException { logger.info("Start validation of ", formula); double mass = MolecularFormulaManipulator.getTotalMassNumber(formula); if (mass == 0) return 0.0; int numberN = MolecularFormulaManipulator.getElementCoun...
[ "@", "Override", "public", "double", "validate", "(", "IMolecularFormula", "formula", ")", "throws", "CDKException", "{", "logger", ".", "info", "(", "\"Start validation of \"", ",", "formula", ")", ";", "double", "mass", "=", "MolecularFormulaManipulator", ".", "...
Validate the nitrogen rule of this IMolecularFormula. @param formula Parameter is the IMolecularFormula @return A double value meaning 1.0 True, 0.0 False
[ "Validate", "the", "nitrogen", "rule", "of", "this", "IMolecularFormula", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/NitrogenRule.java#L95-L121
114,555
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/formula/rules/NitrogenRule.java
NitrogenRule.getOthers
private int getOthers(IMolecularFormula formula) { int number = 0; String[] elements = {"Co", "Hg", "Pt", "As"}; for (int i = 0; i < elements.length; i++) number += MolecularFormulaManipulator.getElementCount(formula, formula.getBuilder().newInstance(IElement.clas...
java
private int getOthers(IMolecularFormula formula) { int number = 0; String[] elements = {"Co", "Hg", "Pt", "As"}; for (int i = 0; i < elements.length; i++) number += MolecularFormulaManipulator.getElementCount(formula, formula.getBuilder().newInstance(IElement.clas...
[ "private", "int", "getOthers", "(", "IMolecularFormula", "formula", ")", "{", "int", "number", "=", "0", ";", "String", "[", "]", "elements", "=", "{", "\"Co\"", ",", "\"Hg\"", ",", "\"Pt\"", ",", "\"As\"", "}", ";", "for", "(", "int", "i", "=", "0",...
Get the number of other elements which affect to the calculation of the nominal mass. For example Fe, Co, Hg, Pt, As. @param formula The IMolecularFormula to analyze @return Number of elements
[ "Get", "the", "number", "of", "other", "elements", "which", "affect", "to", "the", "calculation", "of", "the", "nominal", "mass", ".", "For", "example", "Fe", "Co", "Hg", "Pt", "As", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/NitrogenRule.java#L130-L138
114,556
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/tools/MoleculeSanityCheck.java
MoleculeSanityCheck.checkAndCleanMolecule
public static IAtomContainer checkAndCleanMolecule(IAtomContainer molecule) { boolean isMarkush = false; for (IAtom atom : molecule.atoms()) { if (atom.getSymbol().equals("R")) { isMarkush = true; break; } } if (isMarkush) { ...
java
public static IAtomContainer checkAndCleanMolecule(IAtomContainer molecule) { boolean isMarkush = false; for (IAtom atom : molecule.atoms()) { if (atom.getSymbol().equals("R")) { isMarkush = true; break; } } if (isMarkush) { ...
[ "public", "static", "IAtomContainer", "checkAndCleanMolecule", "(", "IAtomContainer", "molecule", ")", "{", "boolean", "isMarkush", "=", "false", ";", "for", "(", "IAtom", "atom", ":", "molecule", ".", "atoms", "(", ")", ")", "{", "if", "(", "atom", ".", "...
Modules for cleaning a molecule @param molecule @return cleaned AtomContainer
[ "Modules", "for", "cleaning", "a", "molecule" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/tools/MoleculeSanityCheck.java#L56-L89
114,557
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.createEntry
Entry<String, Point2d[]> createEntry(final IAtomContainer container) { try { final int n = container.getAtomCount(); final int[] ordering = new int[n]; final String smiles = cansmi(container, ordering); // build point array that is in the canonical output order ...
java
Entry<String, Point2d[]> createEntry(final IAtomContainer container) { try { final int n = container.getAtomCount(); final int[] ordering = new int[n]; final String smiles = cansmi(container, ordering); // build point array that is in the canonical output order ...
[ "Entry", "<", "String", ",", "Point2d", "[", "]", ">", "createEntry", "(", "final", "IAtomContainer", "container", ")", "{", "try", "{", "final", "int", "n", "=", "container", ".", "getAtomCount", "(", ")", ";", "final", "int", "[", "]", "ordering", "=...
Create a library entry from an atom container. Note the entry is not added to the library. @param container structure representation @return a new library entry (not stored). @see #add(java.util.Map.Entry)
[ "Create", "a", "library", "entry", "from", "an", "atom", "container", ".", "Note", "the", "entry", "is", "not", "added", "to", "the", "library", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L200-L227
114,558
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.decodeCoordinates
static Point2d[] decodeCoordinates(String str) { if (str.startsWith("|(")) { int end = str.indexOf(')', 2); if (end < 0) return new Point2d[0]; String[] strs = str.substring(2, end).split(";"); Point2d[] points = new Point2d[strs.length]; ...
java
static Point2d[] decodeCoordinates(String str) { if (str.startsWith("|(")) { int end = str.indexOf(')', 2); if (end < 0) return new Point2d[0]; String[] strs = str.substring(2, end).split(";"); Point2d[] points = new Point2d[strs.length]; ...
[ "static", "Point2d", "[", "]", "decodeCoordinates", "(", "String", "str", ")", "{", "if", "(", "str", ".", "startsWith", "(", "\"|(\"", ")", ")", "{", "int", "end", "=", "str", ".", "indexOf", "(", "'", "'", ",", "2", ")", ";", "if", "(", "end", ...
Decode coordinates that have been placed in a byte buffer. @param str the string to decode @return array of coordinates
[ "Decode", "coordinates", "that", "have", "been", "placed", "in", "a", "byte", "buffer", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L249-L272
114,559
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.encodeEntry
static String encodeEntry(Entry<String, Point2d[]> entry) { StringBuilder sb = new StringBuilder(); sb.append(entry.getKey()); sb.append(' '); sb.append(encodeCoordinates(entry.getValue())); return sb.toString(); }
java
static String encodeEntry(Entry<String, Point2d[]> entry) { StringBuilder sb = new StringBuilder(); sb.append(entry.getKey()); sb.append(' '); sb.append(encodeCoordinates(entry.getValue())); return sb.toString(); }
[ "static", "String", "encodeEntry", "(", "Entry", "<", "String", ",", "Point2d", "[", "]", ">", "entry", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "entry", ".", "getKey", "(", ")", ")", ";",...
Encodes an entry in a compact string representation. The encoded entry is a SMILES string with the coordinates suffixed in binary. @param entry the entry to encode @return encoded entry
[ "Encodes", "an", "entry", "in", "a", "compact", "string", "representation", ".", "The", "encoded", "entry", "is", "a", "SMILES", "string", "with", "the", "coordinates", "suffixed", "in", "binary", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L281-L287
114,560
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.encodeCoordinates
static String encodeCoordinates(Point2d[] points) { StringBuilder sb = new StringBuilder(); sb.append("|("); for (Point2d point : points) { if (sb.length() > 2) sb.append(";"); sb.append(DECIMAL_FORMAT.format(point.x)); sb.append(','); sb.append(DE...
java
static String encodeCoordinates(Point2d[] points) { StringBuilder sb = new StringBuilder(); sb.append("|("); for (Point2d point : points) { if (sb.length() > 2) sb.append(";"); sb.append(DECIMAL_FORMAT.format(point.x)); sb.append(','); sb.append(DE...
[ "static", "String", "encodeCoordinates", "(", "Point2d", "[", "]", "points", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "\"|(\"", ")", ";", "for", "(", "Point2d", "point", ":", "points", ")", ...
Encode coordinates in a string. @param points points @return extended SMILES format coordinates
[ "Encode", "coordinates", "in", "a", "string", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L295-L307
114,561
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.add
void add(Entry<String, Point2d[]> entry) { if (entry != null) templateMap.put(entry.getKey(), entry.getValue()); }
java
void add(Entry<String, Point2d[]> entry) { if (entry != null) templateMap.put(entry.getKey(), entry.getValue()); }
[ "void", "add", "(", "Entry", "<", "String", ",", "Point2d", "[", "]", ">", "entry", ")", "{", "if", "(", "entry", "!=", "null", ")", "templateMap", ".", "put", "(", "entry", ".", "getKey", "(", ")", ",", "entry", ".", "getValue", "(", ")", ")", ...
Add a created entry to the library. @param entry entry
[ "Add", "a", "created", "entry", "to", "the", "library", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L314-L316
114,562
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.assignLayout
boolean assignLayout(IAtomContainer container) { try { // create the library key to lookup an entry, we also store // the canonical out ordering int n = container.getAtomCount(); int[] ordering = new int[n]; String smiles = cansmi(container, ordering)...
java
boolean assignLayout(IAtomContainer container) { try { // create the library key to lookup an entry, we also store // the canonical out ordering int n = container.getAtomCount(); int[] ordering = new int[n]; String smiles = cansmi(container, ordering)...
[ "boolean", "assignLayout", "(", "IAtomContainer", "container", ")", "{", "try", "{", "// create the library key to lookup an entry, we also store", "// the canonical out ordering", "int", "n", "=", "container", ".", "getAtomCount", "(", ")", ";", "int", "[", "]", "order...
Assign a 2D layout to the atom container using the contents of the library. If multiple coordinates are available the first is choosen. @param container structure representation @return a layout was assigned
[ "Assign", "a", "2D", "layout", "to", "the", "atom", "container", "using", "the", "contents", "of", "the", "library", ".", "If", "multiple", "coordinates", "are", "available", "the", "first", "is", "choosen", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L334-L355
114,563
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.getCoordinates
Collection<Point2d[]> getCoordinates(IAtomContainer mol) { try { // create the library key to lookup an entry, we also store // the canonical out ordering int n = mol.getAtomCount(); int[] ordering = new int[n]; String smiles = cansmi(mol, ordering); ...
java
Collection<Point2d[]> getCoordinates(IAtomContainer mol) { try { // create the library key to lookup an entry, we also store // the canonical out ordering int n = mol.getAtomCount(); int[] ordering = new int[n]; String smiles = cansmi(mol, ordering); ...
[ "Collection", "<", "Point2d", "[", "]", ">", "getCoordinates", "(", "IAtomContainer", "mol", ")", "{", "try", "{", "// create the library key to lookup an entry, we also store", "// the canonical out ordering", "int", "n", "=", "mol", ".", "getAtomCount", "(", ")", ";...
Get all templated coordinates for the provided molecule. The return collection has coordinates ordered based on the input. @param mol molecule (or fragment) to lookup @return the coordinates
[ "Get", "all", "templated", "coordinates", "for", "the", "provided", "molecule", ".", "The", "return", "collection", "has", "coordinates", "ordered", "based", "on", "the", "input", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L364-L386
114,564
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.loadFromResource
static IdentityTemplateLibrary loadFromResource(String resource) { InputStream in = IdentityTemplateLibrary.class.getResourceAsStream(resource); try { return load(in); } catch (IOException e) { throw new IllegalArgumentException("Could not load template library from resou...
java
static IdentityTemplateLibrary loadFromResource(String resource) { InputStream in = IdentityTemplateLibrary.class.getResourceAsStream(resource); try { return load(in); } catch (IOException e) { throw new IllegalArgumentException("Could not load template library from resou...
[ "static", "IdentityTemplateLibrary", "loadFromResource", "(", "String", "resource", ")", "{", "InputStream", "in", "=", "IdentityTemplateLibrary", ".", "class", ".", "getResourceAsStream", "(", "resource", ")", ";", "try", "{", "return", "load", "(", "in", ")", ...
Load a template library from a resource on the class path. @return loaded template library @throws java.lang.IllegalArgumentException resource not found or could not be loaded
[ "Load", "a", "template", "library", "from", "a", "resource", "on", "the", "class", "path", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L403-L416
114,565
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.load
static IdentityTemplateLibrary load(InputStream in) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(in)); String line = null; IdentityTemplateLibrary library = new IdentityTemplateLibrary(); while ((line = br.readLine()) != null) { // skip co...
java
static IdentityTemplateLibrary load(InputStream in) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(in)); String line = null; IdentityTemplateLibrary library = new IdentityTemplateLibrary(); while ((line = br.readLine()) != null) { // skip co...
[ "static", "IdentityTemplateLibrary", "load", "(", "InputStream", "in", ")", "throws", "IOException", "{", "BufferedReader", "br", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "in", ")", ")", ";", "String", "line", "=", "null", ";", "Iden...
Load a template library from an input stream. @return loaded template library @throws java.io.IOException low level IO error
[ "Load", "a", "template", "library", "from", "an", "input", "stream", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L424-L434
114,566
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.reorderCoords
static Point2d[] reorderCoords(Point2d[] coords, int[] order) { Point2d[] neworder = new Point2d[coords.length]; for (int i = 0; i < order.length; i++) neworder[order[i]] = coords[i]; return neworder; }
java
static Point2d[] reorderCoords(Point2d[] coords, int[] order) { Point2d[] neworder = new Point2d[coords.length]; for (int i = 0; i < order.length; i++) neworder[order[i]] = coords[i]; return neworder; }
[ "static", "Point2d", "[", "]", "reorderCoords", "(", "Point2d", "[", "]", "coords", ",", "int", "[", "]", "order", ")", "{", "Point2d", "[", "]", "neworder", "=", "new", "Point2d", "[", "coords", ".", "length", "]", ";", "for", "(", "int", "i", "="...
Reorder coordinates. @param coords coordinates @param order permutation @return reordered coordinates
[ "Reorder", "coordinates", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L443-L448
114,567
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.update
void update(IChemObjectBuilder bldr) { final SmilesParser smipar = new SmilesParser(bldr); Multimap<String,Point2d[]> updated = LinkedListMultimap.create(); for (Map.Entry<String,Collection<Point2d[]>> e : templateMap.asMap().entrySet()) { try { IAtomContainer mol = s...
java
void update(IChemObjectBuilder bldr) { final SmilesParser smipar = new SmilesParser(bldr); Multimap<String,Point2d[]> updated = LinkedListMultimap.create(); for (Map.Entry<String,Collection<Point2d[]>> e : templateMap.asMap().entrySet()) { try { IAtomContainer mol = s...
[ "void", "update", "(", "IChemObjectBuilder", "bldr", ")", "{", "final", "SmilesParser", "smipar", "=", "new", "SmilesParser", "(", "bldr", ")", ";", "Multimap", "<", "String", ",", "Point2d", "[", "]", ">", "updated", "=", "LinkedListMultimap", ".", "create"...
Update the template library - can be called for safety after each load. @param bldr builder
[ "Update", "the", "template", "library", "-", "can", "be", "called", "for", "safety", "after", "each", "load", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L456-L473
114,568
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.store
void store(OutputStream out) throws IOException { BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out)); for (Entry<String, Point2d[]> e : templateMap.entries()) { bw.write(encodeEntry(e)); bw.write('\n'); } bw.close(); }
java
void store(OutputStream out) throws IOException { BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out)); for (Entry<String, Point2d[]> e : templateMap.entries()) { bw.write(encodeEntry(e)); bw.write('\n'); } bw.close(); }
[ "void", "store", "(", "OutputStream", "out", ")", "throws", "IOException", "{", "BufferedWriter", "bw", "=", "new", "BufferedWriter", "(", "new", "OutputStreamWriter", "(", "out", ")", ")", ";", "for", "(", "Entry", "<", "String", ",", "Point2d", "[", "]",...
Store a template library to the provided output stream. @param out output stream @throws IOException low level IO error
[ "Store", "a", "template", "library", "to", "the", "provided", "output", "stream", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L481-L491
114,569
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/graph/Matching.java
Matching.perfect
public boolean perfect(int[][] graph, BitSet subset) { if (graph.length != match.length || subset.cardinality() > graph.length) throw new IllegalArgumentException("graph and matching had different capacity"); // and odd set can never provide a perfect matching if ((subset.cardinali...
java
public boolean perfect(int[][] graph, BitSet subset) { if (graph.length != match.length || subset.cardinality() > graph.length) throw new IllegalArgumentException("graph and matching had different capacity"); // and odd set can never provide a perfect matching if ((subset.cardinali...
[ "public", "boolean", "perfect", "(", "int", "[", "]", "[", "]", "graph", ",", "BitSet", "subset", ")", "{", "if", "(", "graph", ".", "length", "!=", "match", ".", "length", "||", "subset", ".", "cardinality", "(", ")", ">", "graph", ".", "length", ...
Attempt to augment the matching such that it is perfect over the subset of vertices in the provided graph. @param graph adjacency list representation of graph @param subset subset of vertices @return the matching was perfect @throws IllegalArgumentException the graph was a different size to the matching capacity
[ "Attempt", "to", "augment", "the", "matching", "such", "that", "it", "is", "perfect", "over", "the", "subset", "of", "vertices", "in", "the", "provided", "graph", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/graph/Matching.java#L130-L148
114,570
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/graph/Matching.java
Matching.arbitaryMatching
boolean arbitaryMatching(final int[][] graph, final BitSet subset) { final BitSet unmatched = new BitSet(); // indicates the deg of each vertex in unmatched subset final int[] deg = new int[graph.length]; // queue/stack of vertices with deg1 vertices final int[] deg1 = new int...
java
boolean arbitaryMatching(final int[][] graph, final BitSet subset) { final BitSet unmatched = new BitSet(); // indicates the deg of each vertex in unmatched subset final int[] deg = new int[graph.length]; // queue/stack of vertices with deg1 vertices final int[] deg1 = new int...
[ "boolean", "arbitaryMatching", "(", "final", "int", "[", "]", "[", "]", "graph", ",", "final", "BitSet", "subset", ")", "{", "final", "BitSet", "unmatched", "=", "new", "BitSet", "(", ")", ";", "// indicates the deg of each vertex in unmatched subset", "final", ...
Assign an arbitrary matching that covers the subset of vertices. @param graph adjacency list representation of graph @param subset subset of vertices in the graph @return the matching was perfect
[ "Assign", "an", "arbitrary", "matching", "that", "covers", "the", "subset", "of", "vertices", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/graph/Matching.java#L157-L216
114,571
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/QueryStereoFilter.java
QueryStereoFilter.otherIndex
private int otherIndex(int i) { IDoubleBondStereochemistry element = (IDoubleBondStereochemistry) queryElements[i]; return queryMap.get(element.getStereoBond().getOther(query.getAtom(i))); }
java
private int otherIndex(int i) { IDoubleBondStereochemistry element = (IDoubleBondStereochemistry) queryElements[i]; return queryMap.get(element.getStereoBond().getOther(query.getAtom(i))); }
[ "private", "int", "otherIndex", "(", "int", "i", ")", "{", "IDoubleBondStereochemistry", "element", "=", "(", "IDoubleBondStereochemistry", ")", "queryElements", "[", "i", "]", ";", "return", "queryMap", ".", "get", "(", "element", ".", "getStereoBond", "(", "...
Given an index of an atom in the query get the index of the other atom in the double bond. @param i query atom index @return the other atom index involved in a double bond
[ "Given", "an", "index", "of", "an", "atom", "in", "the", "query", "get", "the", "index", "of", "the", "other", "atom", "in", "the", "double", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/QueryStereoFilter.java#L315-L318
114,572
cdk/cdk
base/dict/src/main/java/org/openscience/cdk/dict/EntryReact.java
EntryReact.setParameters
public void setParameters(String nameParam, String typeParam, String value) { this.parameters.put(nameParam, typeParam); this.parametersValue.add(value); }
java
public void setParameters(String nameParam, String typeParam, String value) { this.parameters.put(nameParam, typeParam); this.parametersValue.add(value); }
[ "public", "void", "setParameters", "(", "String", "nameParam", ",", "String", "typeParam", ",", "String", "value", ")", "{", "this", ".", "parameters", ".", "put", "(", "nameParam", ",", "typeParam", ")", ";", "this", ".", "parametersValue", ".", "add", "(...
Set the parameters of the reaction. @param nameParam The parameter names of the reaction as String @param typeParam The parameter types of the reaction as String @param value The value default of the parameter
[ "Set", "the", "parameters", "of", "the", "reaction", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/dict/src/main/java/org/openscience/cdk/dict/EntryReact.java#L108-L111
114,573
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/PetitjeanShapeIndexDescriptor.java
PetitjeanShapeIndexDescriptor.calculate
@Override public DescriptorValue calculate(IAtomContainer container) { IAtomContainer local = AtomContainerManipulator.removeHydrogens(container); int tradius = PathTools.getMolecularGraphRadius(local); int tdiameter = PathTools.getMolecularGraphDiameter(local); DoubleArrayResult r...
java
@Override public DescriptorValue calculate(IAtomContainer container) { IAtomContainer local = AtomContainerManipulator.removeHydrogens(container); int tradius = PathTools.getMolecularGraphRadius(local); int tdiameter = PathTools.getMolecularGraphDiameter(local); DoubleArrayResult r...
[ "@", "Override", "public", "DescriptorValue", "calculate", "(", "IAtomContainer", "container", ")", "{", "IAtomContainer", "local", "=", "AtomContainerManipulator", ".", "removeHydrogens", "(", "container", ")", ";", "int", "tradius", "=", "PathTools", ".", "getMole...
Calculates the two Petitjean shape indices. @param container Parameter is the atom container. @return A DoubleArrayResult value representing the Petitjean shape indices
[ "Calculates", "the", "two", "Petitjean", "shape", "indices", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/PetitjeanShapeIndexDescriptor.java#L141-L189
114,574
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/ComponentFilter.java
ComponentFilter.apply
@Override public boolean apply(final int[] mapping) { // no grouping required if (queryComponents == null) return true; // bidirectional map of query/target components, last index // of query components holds the count int[] usedBy = new int[targetComponents[targetComponent...
java
@Override public boolean apply(final int[] mapping) { // no grouping required if (queryComponents == null) return true; // bidirectional map of query/target components, last index // of query components holds the count int[] usedBy = new int[targetComponents[targetComponent...
[ "@", "Override", "public", "boolean", "apply", "(", "final", "int", "[", "]", "mapping", ")", "{", "// no grouping required", "if", "(", "queryComponents", "==", "null", ")", "return", "true", ";", "// bidirectional map of query/target components, last index", "// of ...
Does the mapping respected the component grouping specified by the query. @param mapping a permutation of the query vertices @return the mapping preserves the specified grouping
[ "Does", "the", "mapping", "respected", "the", "component", "grouping", "specified", "by", "the", "query", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/ComponentFilter.java#L137-L170
114,575
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.setTemplateHandler
@Deprecated public void setTemplateHandler(TemplateHandler templateHandler) { IdentityTemplateLibrary lib = templateHandler.toIdentityTemplateLibrary(); lib.add(identityLibrary); identityLibrary = lib; // new ones take priority }
java
@Deprecated public void setTemplateHandler(TemplateHandler templateHandler) { IdentityTemplateLibrary lib = templateHandler.toIdentityTemplateLibrary(); lib.add(identityLibrary); identityLibrary = lib; // new ones take priority }
[ "@", "Deprecated", "public", "void", "setTemplateHandler", "(", "TemplateHandler", "templateHandler", ")", "{", "IdentityTemplateLibrary", "lib", "=", "templateHandler", ".", "toIdentityTemplateLibrary", "(", ")", ";", "lib", ".", "add", "(", "identityLibrary", ")", ...
Sets the templateHandler attribute of the StructureDiagramGenerator object @param templateHandler The new templateHandler value @deprecated substructure templates are no longer used for layout but those provided here will be converted to identity templates
[ "Sets", "the", "templateHandler", "attribute", "of", "the", "StructureDiagramGenerator", "object" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L490-L495
114,576
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.generateExperimentalCoordinates
@Deprecated public void generateExperimentalCoordinates(Vector2d firstBondVector) throws CDKException { // first make a shallow copy: Atom/Bond references are kept IAtomContainer original = molecule; IAtomContainer shallowCopy = molecule.getBuilder().newInstance(IAtomContainer.class, molecul...
java
@Deprecated public void generateExperimentalCoordinates(Vector2d firstBondVector) throws CDKException { // first make a shallow copy: Atom/Bond references are kept IAtomContainer original = molecule; IAtomContainer shallowCopy = molecule.getBuilder().newInstance(IAtomContainer.class, molecul...
[ "@", "Deprecated", "public", "void", "generateExperimentalCoordinates", "(", "Vector2d", "firstBondVector", ")", "throws", "CDKException", "{", "// first make a shallow copy: Atom/Bond references are kept", "IAtomContainer", "original", "=", "molecule", ";", "IAtomContainer", "...
Generates 2D coordinates on the non-hydrogen skeleton, after which coordinates for the hydrogens are calculated. @param firstBondVector the vector of the first bond to lay out @throws CDKException if an error occurs @deprecated use {@link #generateCoordinates()}
[ "Generates", "2D", "coordinates", "on", "the", "non", "-", "hydrogen", "skeleton", "after", "which", "coordinates", "for", "the", "hydrogens", "are", "calculated", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L558-L581
114,577
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.countAlignedBonds
private static int countAlignedBonds(IAtomContainer mol) { final double ref = Math.toRadians(30); final double diff = Math.toRadians(1); int count = 0; for (IBond bond : mol.bonds()) { Point2d beg = bond.getBegin().getPoint2d(); Point2d end = bond.getEnd().getPoin...
java
private static int countAlignedBonds(IAtomContainer mol) { final double ref = Math.toRadians(30); final double diff = Math.toRadians(1); int count = 0; for (IBond bond : mol.bonds()) { Point2d beg = bond.getBegin().getPoint2d(); Point2d end = bond.getEnd().getPoin...
[ "private", "static", "int", "countAlignedBonds", "(", "IAtomContainer", "mol", ")", "{", "final", "double", "ref", "=", "Math", ".", "toRadians", "(", "30", ")", ";", "final", "double", "diff", "=", "Math", ".", "toRadians", "(", "1", ")", ";", "int", ...
Count the number of bonds aligned to 30 degrees. @param mol molecule @return number of aligned bonds
[ "Count", "the", "number", "of", "bonds", "aligned", "to", "30", "degrees", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L1010-L1030
114,578
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.selectIons
private List<IAtom> selectIons(IAtomContainer frag, int sign) { int fragChg = frag.getProperty(FRAGMENT_CHARGE); assert Integer.signum(fragChg) == sign; final List<IAtom> atoms = new ArrayList<>(); FIRST_PASS: for (IAtom atom : frag.atoms()) { if (fragChg == 0) ...
java
private List<IAtom> selectIons(IAtomContainer frag, int sign) { int fragChg = frag.getProperty(FRAGMENT_CHARGE); assert Integer.signum(fragChg) == sign; final List<IAtom> atoms = new ArrayList<>(); FIRST_PASS: for (IAtom atom : frag.atoms()) { if (fragChg == 0) ...
[ "private", "List", "<", "IAtom", ">", "selectIons", "(", "IAtomContainer", "frag", ",", "int", "sign", ")", "{", "int", "fragChg", "=", "frag", ".", "getProperty", "(", "FRAGMENT_CHARGE", ")", ";", "assert", "Integer", ".", "signum", "(", "fragChg", ")", ...
Select ions from a charged fragment. Ions not in charge separated bonds are favoured but select if needed. If an atom has lost or gained more than one electron it is added mutliple times to the output list @param frag charged fragment @param sign the charge sign to select (+1 : cation, -1: anion) @return the select at...
[ "Select", "ions", "from", "a", "charged", "fragment", ".", "Ions", "not", "in", "charge", "separated", "bonds", "are", "favoured", "but", "select", "if", "needed", ".", "If", "an", "atom", "has", "lost", "or", "gained", "more", "than", "one", "electron", ...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L1331-L1374
114,579
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.toList
private List<IAtomContainer> toList(IAtomContainerSet frags) { return new ArrayList<>(FluentIterable.from(frags.atomContainers()).toList()); }
java
private List<IAtomContainer> toList(IAtomContainerSet frags) { return new ArrayList<>(FluentIterable.from(frags.atomContainers()).toList()); }
[ "private", "List", "<", "IAtomContainer", ">", "toList", "(", "IAtomContainerSet", "frags", ")", "{", "return", "new", "ArrayList", "<>", "(", "FluentIterable", ".", "from", "(", "frags", ".", "atomContainers", "(", ")", ")", ".", "toList", "(", ")", ")", ...
Utility - get the IAtomContainers as a list. @param frags connected fragments @return list of fragments
[ "Utility", "-", "get", "the", "IAtomContainers", "as", "a", "list", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L1494-L1496
114,580
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.lookupRingSystem
private boolean lookupRingSystem(IRingSet rs, IAtomContainer molecule, boolean anon) { // identity templates are disabled if (!useIdentTemplates) return false; final IChemObjectBuilder bldr = molecule.getBuilder(); final IAtomContainer ringSystem = bldr.newInstance(IAtomContainer.clas...
java
private boolean lookupRingSystem(IRingSet rs, IAtomContainer molecule, boolean anon) { // identity templates are disabled if (!useIdentTemplates) return false; final IChemObjectBuilder bldr = molecule.getBuilder(); final IAtomContainer ringSystem = bldr.newInstance(IAtomContainer.clas...
[ "private", "boolean", "lookupRingSystem", "(", "IRingSet", "rs", ",", "IAtomContainer", "molecule", ",", "boolean", "anon", ")", "{", "// identity templates are disabled", "if", "(", "!", "useIdentTemplates", ")", "return", "false", ";", "final", "IChemObjectBuilder",...
Using a fast identity template library, lookup the the ring system and assign coordinates. The method indicates whether a match was found and coordinates were assigned. @param rs the ring set @param molecule the rest of the compound @param anon check for anonmised templates @return coordinates were assigned
[ "Using", "a", "fast", "identity", "template", "library", "lookup", "the", "the", "ring", "system", "and", "assign", "coordinates", ".", "The", "method", "indicates", "whether", "a", "match", "was", "found", "and", "coordinates", "were", "assigned", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L1518-L1575
114,581
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.isHydrogen
private static boolean isHydrogen(IAtom atom) { if (atom.getAtomicNumber() != null) return atom.getAtomicNumber() == 1; return "H".equals(atom.getSymbol()); }
java
private static boolean isHydrogen(IAtom atom) { if (atom.getAtomicNumber() != null) return atom.getAtomicNumber() == 1; return "H".equals(atom.getSymbol()); }
[ "private", "static", "boolean", "isHydrogen", "(", "IAtom", "atom", ")", "{", "if", "(", "atom", ".", "getAtomicNumber", "(", ")", "!=", "null", ")", "return", "atom", ".", "getAtomicNumber", "(", ")", "==", "1", ";", "return", "\"H\"", ".", "equals", ...
Is an atom a hydrogen atom. @param atom an atom @return the atom is a hydrogen
[ "Is", "an", "atom", "a", "hydrogen", "atom", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L1583-L1586
114,582
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.clearHydrogenCounts
private static IAtomContainer clearHydrogenCounts(IAtomContainer container) { for (IAtom atom : container.atoms()) atom.setImplicitHydrogenCount(0); return container; }
java
private static IAtomContainer clearHydrogenCounts(IAtomContainer container) { for (IAtom atom : container.atoms()) atom.setImplicitHydrogenCount(0); return container; }
[ "private", "static", "IAtomContainer", "clearHydrogenCounts", "(", "IAtomContainer", "container", ")", "{", "for", "(", "IAtom", "atom", ":", "container", ".", "atoms", "(", ")", ")", "atom", ".", "setImplicitHydrogenCount", "(", "0", ")", ";", "return", "cont...
Simple helper function that sets all hydrogen counts to 0. @param container a structure representation @return the input container
[ "Simple", "helper", "function", "that", "sets", "all", "hydrogen", "counts", "to", "0", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L1594-L1598
114,583
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.isMacroCycle
private boolean isMacroCycle(IRing ring, IRingSet rs) { if (ring.getAtomCount() < 8) return false; for (IBond bond : ring.bonds()) { boolean found = false; for (IAtomContainer other : rs.atomContainers()) { if (ring == other) contin...
java
private boolean isMacroCycle(IRing ring, IRingSet rs) { if (ring.getAtomCount() < 8) return false; for (IBond bond : ring.bonds()) { boolean found = false; for (IAtomContainer other : rs.atomContainers()) { if (ring == other) contin...
[ "private", "boolean", "isMacroCycle", "(", "IRing", "ring", ",", "IRingSet", "rs", ")", "{", "if", "(", "ring", ".", "getAtomCount", "(", ")", "<", "8", ")", "return", "false", ";", "for", "(", "IBond", "bond", ":", "ring", ".", "bonds", "(", ")", ...
Check if a ring in a ring set is a macro cycle. We define this as a ring with >= 10 atom and has at least one bond that isn't contained in any other rings. @param ring ring to check @param rs rest of ring system @return ring is a macro cycle
[ "Check", "if", "a", "ring", "in", "a", "ring", "set", "is", "a", "macro", "cycle", ".", "We", "define", "this", "as", "a", "ring", "with", ">", "=", "10", "atom", "and", "has", "at", "least", "one", "bond", "that", "isn", "t", "contained", "in", ...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L1735-L1752
114,584
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.layoutAcyclicParts
private void layoutAcyclicParts() throws CDKException { logger.debug("Start of handleAliphatics"); int safetyCounter = 0; IAtomContainer unplacedAtoms = null; IAtomContainer placedAtoms = null; IAtomContainer longestUnplacedChain = null; IAtom atom = null; Vecto...
java
private void layoutAcyclicParts() throws CDKException { logger.debug("Start of handleAliphatics"); int safetyCounter = 0; IAtomContainer unplacedAtoms = null; IAtomContainer placedAtoms = null; IAtomContainer longestUnplacedChain = null; IAtom atom = null; Vecto...
[ "private", "void", "layoutAcyclicParts", "(", ")", "throws", "CDKException", "{", "logger", ".", "debug", "(", "\"Start of handleAliphatics\"", ")", ";", "int", "safetyCounter", "=", "0", ";", "IAtomContainer", "unplacedAtoms", "=", "null", ";", "IAtomContainer", ...
Does a layout of all aliphatic parts connected to the parts of the molecule that have already been laid out. Starts at the first bond with unplaced neighbours and stops when a ring is encountered. @throws CDKException if an error occurs
[ "Does", "a", "layout", "of", "all", "aliphatic", "parts", "connected", "to", "the", "parts", "of", "the", "molecule", "that", "have", "already", "been", "laid", "out", ".", "Starts", "at", "the", "first", "bond", "with", "unplaced", "neighbours", "and", "s...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L1761-L1825
114,585
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.layoutCyclicParts
private void layoutCyclicParts() throws CDKException { logger.debug("Start of layoutNextRingSystem()"); resetUnplacedRings(); IAtomContainer placedAtoms = AtomPlacer.getPlacedAtoms(molecule); logger.debug("Finding attachment bond to already placed part..."); IBond nextRingAttach...
java
private void layoutCyclicParts() throws CDKException { logger.debug("Start of layoutNextRingSystem()"); resetUnplacedRings(); IAtomContainer placedAtoms = AtomPlacer.getPlacedAtoms(molecule); logger.debug("Finding attachment bond to already placed part..."); IBond nextRingAttach...
[ "private", "void", "layoutCyclicParts", "(", ")", "throws", "CDKException", "{", "logger", ".", "debug", "(", "\"Start of layoutNextRingSystem()\"", ")", ";", "resetUnplacedRings", "(", ")", ";", "IAtomContainer", "placedAtoms", "=", "AtomPlacer", ".", "getPlacedAtoms...
Does the layout for the next RingSystem that is connected to those parts of the molecule that have already been laid out. Finds the next ring with an unplaced ring atom and lays out this ring. Then lays out the ring substituents of this ring. Then moves and rotates the laid out ring to match the position of its attachm...
[ "Does", "the", "layout", "for", "the", "next", "RingSystem", "that", "is", "connected", "to", "those", "parts", "of", "the", "molecule", "that", "have", "already", "been", "laid", "out", ".", "Finds", "the", "next", "ring", "with", "an", "unplaced", "ring"...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L1836-L1934
114,586
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.getUnplacedAtoms
private IAtomContainer getUnplacedAtoms(IAtom atom) { IAtomContainer unplacedAtoms = atom.getBuilder().newInstance(IAtomContainer.class); List bonds = molecule.getConnectedBondsList(atom); IAtom connectedAtom; for (int f = 0; f < bonds.size(); f++) { connectedAtom = ((IBond) ...
java
private IAtomContainer getUnplacedAtoms(IAtom atom) { IAtomContainer unplacedAtoms = atom.getBuilder().newInstance(IAtomContainer.class); List bonds = molecule.getConnectedBondsList(atom); IAtom connectedAtom; for (int f = 0; f < bonds.size(); f++) { connectedAtom = ((IBond) ...
[ "private", "IAtomContainer", "getUnplacedAtoms", "(", "IAtom", "atom", ")", "{", "IAtomContainer", "unplacedAtoms", "=", "atom", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IAtomContainer", ".", "class", ")", ";", "List", "bonds", "=", "molecule", "...
Returns an AtomContainer with all unplaced atoms connected to a given atom @param atom The Atom whose unplaced bonding partners are to be returned @return an AtomContainer with all unplaced atoms connected to a given atom
[ "Returns", "an", "AtomContainer", "with", "all", "unplaced", "atoms", "connected", "to", "a", "given", "atom" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L1944-L1955
114,587
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.getNextAtomWithAliphaticUnplacedNeigbors
private IAtom getNextAtomWithAliphaticUnplacedNeigbors() { IBond bond; for (int f = 0; f < molecule.getBondCount(); f++) { bond = molecule.getBond(f); if (bond.getEnd().getFlag(CDKConstants.ISPLACED) && !bond.getBegin().getFlag(CDKConstants.ISPLACED)) { return bo...
java
private IAtom getNextAtomWithAliphaticUnplacedNeigbors() { IBond bond; for (int f = 0; f < molecule.getBondCount(); f++) { bond = molecule.getBond(f); if (bond.getEnd().getFlag(CDKConstants.ISPLACED) && !bond.getBegin().getFlag(CDKConstants.ISPLACED)) { return bo...
[ "private", "IAtom", "getNextAtomWithAliphaticUnplacedNeigbors", "(", ")", "{", "IBond", "bond", ";", "for", "(", "int", "f", "=", "0", ";", "f", "<", "molecule", ".", "getBondCount", "(", ")", ";", "f", "++", ")", "{", "bond", "=", "molecule", ".", "ge...
Returns the next atom with unplaced aliphatic neighbors @return the next atom with unplaced aliphatic neighbors
[ "Returns", "the", "next", "atom", "with", "unplaced", "aliphatic", "neighbors" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L1983-L1997
114,588
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.getNextBondWithUnplacedRingAtom
private IBond getNextBondWithUnplacedRingAtom() { for (IBond bond : molecule.bonds()) { IAtom beg = bond.getBegin(); IAtom end = bond.getEnd(); if (beg.getPoint2d() != null && end.getPoint2d() != null) { if (end.getFlag(CDKConstants.ISPLACED) && !beg.getFlag(C...
java
private IBond getNextBondWithUnplacedRingAtom() { for (IBond bond : molecule.bonds()) { IAtom beg = bond.getBegin(); IAtom end = bond.getEnd(); if (beg.getPoint2d() != null && end.getPoint2d() != null) { if (end.getFlag(CDKConstants.ISPLACED) && !beg.getFlag(C...
[ "private", "IBond", "getNextBondWithUnplacedRingAtom", "(", ")", "{", "for", "(", "IBond", "bond", ":", "molecule", ".", "bonds", "(", ")", ")", "{", "IAtom", "beg", "=", "bond", ".", "getBegin", "(", ")", ";", "IAtom", "end", "=", "bond", ".", "getEnd...
Returns the next bond with an unplaced ring atom @return the next bond with an unplaced ring atom
[ "Returns", "the", "next", "bond", "with", "an", "unplaced", "ring", "atom" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L2004-L2018
114,589
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.allPlaced
private boolean allPlaced(IRingSet rings) { for (int f = 0; f < rings.getAtomContainerCount(); f++) { if (!((IRing) rings.getAtomContainer(f)).getFlag(CDKConstants.ISPLACED)) { logger.debug("allPlaced->Ring " + f + " not placed"); return false; } }...
java
private boolean allPlaced(IRingSet rings) { for (int f = 0; f < rings.getAtomContainerCount(); f++) { if (!((IRing) rings.getAtomContainer(f)).getFlag(CDKConstants.ISPLACED)) { logger.debug("allPlaced->Ring " + f + " not placed"); return false; } }...
[ "private", "boolean", "allPlaced", "(", "IRingSet", "rings", ")", "{", "for", "(", "int", "f", "=", "0", ";", "f", "<", "rings", ".", "getAtomContainerCount", "(", ")", ";", "f", "++", ")", "{", "if", "(", "!", "(", "(", "IRing", ")", "rings", "....
Are all rings in the Vector placed? @param rings The Vector to be checked @return true if all rings are placed, false otherwise
[ "Are", "all", "rings", "in", "the", "Vector", "placed?" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L2068-L2076
114,590
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.getRingAtom
private IAtom getRingAtom(IBond bond) { if (bond.getBegin().getFlag(CDKConstants.ISINRING) && !bond.getBegin().getFlag(CDKConstants.ISPLACED)) { return bond.getBegin(); } if (bond.getEnd().getFlag(CDKConstants.ISINRING) && !bond.getEnd().getFlag(CDKConstants.ISPLACED)) { ...
java
private IAtom getRingAtom(IBond bond) { if (bond.getBegin().getFlag(CDKConstants.ISINRING) && !bond.getBegin().getFlag(CDKConstants.ISPLACED)) { return bond.getBegin(); } if (bond.getEnd().getFlag(CDKConstants.ISINRING) && !bond.getEnd().getFlag(CDKConstants.ISPLACED)) { ...
[ "private", "IAtom", "getRingAtom", "(", "IBond", "bond", ")", "{", "if", "(", "bond", ".", "getBegin", "(", ")", ".", "getFlag", "(", "CDKConstants", ".", "ISINRING", ")", "&&", "!", "bond", ".", "getBegin", "(", ")", ".", "getFlag", "(", "CDKConstants...
Get the unplaced ring atom in this bond @param bond the bond to be search for the unplaced ring atom @return the unplaced ring atom in this bond
[ "Get", "the", "unplaced", "ring", "atom", "in", "this", "bond" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L2084-L2092
114,591
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.getRingSystemOfAtom
private IRingSet getRingSystemOfAtom(List ringSystems, IAtom ringAtom) { IRingSet ringSet = null; for (int f = 0; f < ringSystems.size(); f++) { ringSet = (IRingSet) ringSystems.get(f); if (ringSet.contains(ringAtom)) { return ringSet; } } ...
java
private IRingSet getRingSystemOfAtom(List ringSystems, IAtom ringAtom) { IRingSet ringSet = null; for (int f = 0; f < ringSystems.size(); f++) { ringSet = (IRingSet) ringSystems.get(f); if (ringSet.contains(ringAtom)) { return ringSet; } } ...
[ "private", "IRingSet", "getRingSystemOfAtom", "(", "List", "ringSystems", ",", "IAtom", "ringAtom", ")", "{", "IRingSet", "ringSet", "=", "null", ";", "for", "(", "int", "f", "=", "0", ";", "f", "<", "ringSystems", ".", "size", "(", ")", ";", "f", "++"...
Get the ring system of which the given atom is part of @param ringSystems a List of ring systems to be searched @param ringAtom the ring atom to be search in the ring system. @return the ring system the given atom is part of
[ "Get", "the", "ring", "system", "of", "which", "the", "given", "atom", "is", "part", "of" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L2101-L2110
114,592
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.resetUnplacedRings
private void resetUnplacedRings() { IRing ring = null; if (sssr == null) { return; } int unplacedCounter = 0; for (int f = 0; f < sssr.getAtomContainerCount(); f++) { ring = (IRing) sssr.getAtomContainer(f); if (!ring.getFlag(CDKConstants.ISPLA...
java
private void resetUnplacedRings() { IRing ring = null; if (sssr == null) { return; } int unplacedCounter = 0; for (int f = 0; f < sssr.getAtomContainerCount(); f++) { ring = (IRing) sssr.getAtomContainer(f); if (!ring.getFlag(CDKConstants.ISPLA...
[ "private", "void", "resetUnplacedRings", "(", ")", "{", "IRing", "ring", "=", "null", ";", "if", "(", "sssr", "==", "null", ")", "{", "return", ";", "}", "int", "unplacedCounter", "=", "0", ";", "for", "(", "int", "f", "=", "0", ";", "f", "<", "s...
Set all the atoms in unplaced rings to be unplaced
[ "Set", "all", "the", "atoms", "in", "unplaced", "rings", "to", "be", "unplaced" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L2115-L2132
114,593
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.getOtherBondAtom
public IAtom getOtherBondAtom(IAtom atom, IBond bond) { if (!bond.contains(atom)) return null; if (bond.getBegin().equals(atom)) return bond.getEnd(); else return bond.getBegin(); }
java
public IAtom getOtherBondAtom(IAtom atom, IBond bond) { if (!bond.contains(atom)) return null; if (bond.getBegin().equals(atom)) return bond.getEnd(); else return bond.getBegin(); }
[ "public", "IAtom", "getOtherBondAtom", "(", "IAtom", "atom", ",", "IBond", "bond", ")", "{", "if", "(", "!", "bond", ".", "contains", "(", "atom", ")", ")", "return", "null", ";", "if", "(", "bond", ".", "getBegin", "(", ")", ".", "equals", "(", "a...
Returns the other atom of the bond. Expects bond to have only two atoms. Returns null if the given atom is not part of the given bond. @param atom the atom we already have @param bond the bond @return the other atom of the bond
[ "Returns", "the", "other", "atom", "of", "the", "bond", ".", "Expects", "bond", "to", "have", "only", "two", "atoms", ".", "Returns", "null", "if", "the", "given", "atom", "is", "not", "part", "of", "the", "given", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L2176-L2182
114,594
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.placeSgroupBrackets
private void placeSgroupBrackets(IAtomContainer mol) { List<Sgroup> sgroups = mol.getProperty(CDKConstants.CTAB_SGROUPS); if (sgroups == null) return; // index all crossing bonds final Multimap<IBond,Sgroup> bondMap = HashMultimap.create(); final Map<IBond,Integer> counter = new...
java
private void placeSgroupBrackets(IAtomContainer mol) { List<Sgroup> sgroups = mol.getProperty(CDKConstants.CTAB_SGROUPS); if (sgroups == null) return; // index all crossing bonds final Multimap<IBond,Sgroup> bondMap = HashMultimap.create(); final Map<IBond,Integer> counter = new...
[ "private", "void", "placeSgroupBrackets", "(", "IAtomContainer", "mol", ")", "{", "List", "<", "Sgroup", ">", "sgroups", "=", "mol", ".", "getProperty", "(", "CDKConstants", ".", "CTAB_SGROUPS", ")", ";", "if", "(", "sgroups", "==", "null", ")", "return", ...
Place and update brackets for polymer Sgroups. @param mol molecule
[ "Place", "and", "update", "brackets", "for", "polymer", "Sgroups", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L2586-L2659
114,595
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.newCrossingBracket
private SgroupBracket newCrossingBracket(IBond bond, Multimap<IBond,Sgroup> bonds, Map<IBond,Integer> counter, boolean vert) { final IAtom beg = bond.getBegin(); final IAtom end = bond.getEnd(); final Point2d begXy = beg.getPoint2d(); final Point2d endXy = end.getPoint2d(); final...
java
private SgroupBracket newCrossingBracket(IBond bond, Multimap<IBond,Sgroup> bonds, Map<IBond,Integer> counter, boolean vert) { final IAtom beg = bond.getBegin(); final IAtom end = bond.getEnd(); final Point2d begXy = beg.getPoint2d(); final Point2d endXy = end.getPoint2d(); final...
[ "private", "SgroupBracket", "newCrossingBracket", "(", "IBond", "bond", ",", "Multimap", "<", "IBond", ",", "Sgroup", ">", "bonds", ",", "Map", "<", "IBond", ",", "Integer", ">", "counter", ",", "boolean", "vert", ")", "{", "final", "IAtom", "beg", "=", ...
Generate a new bracket across the provided bond. @param bond bond @param bonds bond map to Sgroups @param counter count how many brackets this group has already @param vert vertical align bonds @return the new bracket
[ "Generate", "a", "new", "bracket", "across", "the", "provided", "bond", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L2676-L2718
114,596
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java
StructureDiagramGenerator.hasBrackets
private static boolean hasBrackets(Sgroup sgroup) { switch (sgroup.getType()) { case CtabStructureRepeatUnit: case CtabAnyPolymer: case CtabCrossLink: case CtabComponent: case CtabMixture: case CtabFormulation: case CtabGraft: ...
java
private static boolean hasBrackets(Sgroup sgroup) { switch (sgroup.getType()) { case CtabStructureRepeatUnit: case CtabAnyPolymer: case CtabCrossLink: case CtabComponent: case CtabMixture: case CtabFormulation: case CtabGraft: ...
[ "private", "static", "boolean", "hasBrackets", "(", "Sgroup", "sgroup", ")", "{", "switch", "(", "sgroup", ".", "getType", "(", ")", ")", "{", "case", "CtabStructureRepeatUnit", ":", "case", "CtabAnyPolymer", ":", "case", "CtabCrossLink", ":", "case", "CtabCom...
Determine whether and Sgroup type has brackets to be placed. @param sgroup the Sgroup @return brackets need to be placed
[ "Determine", "whether", "and", "Sgroup", "type", "has", "brackets", "to", "be", "placed", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java#L2725-L2745
114,597
cdk/cdk
legacy/src/main/java/org/openscience/cdk/ringsearch/SSSRFinder.java
SSSRFinder.findSSSR
public IRingSet findSSSR() { if (atomContainer == null) { return null; } IRingSet ringSet = toRingSet(atomContainer, cycleBasis().cycles()); // atomContainer.setProperty(CDKConstants.SMALLEST_RINGS, ringSet); return ringSet; }
java
public IRingSet findSSSR() { if (atomContainer == null) { return null; } IRingSet ringSet = toRingSet(atomContainer, cycleBasis().cycles()); // atomContainer.setProperty(CDKConstants.SMALLEST_RINGS, ringSet); return ringSet; }
[ "public", "IRingSet", "findSSSR", "(", ")", "{", "if", "(", "atomContainer", "==", "null", ")", "{", "return", "null", ";", "}", "IRingSet", "ringSet", "=", "toRingSet", "(", "atomContainer", ",", "cycleBasis", "(", ")", ".", "cycles", "(", ")", ")", "...
Finds a Smallest Set of Smallest Rings. The returned set is not uniquely defined. @return a RingSet containing the SSSR
[ "Finds", "a", "Smallest", "Set", "of", "Smallest", "Rings", ".", "The", "returned", "set", "is", "not", "uniquely", "defined", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/ringsearch/SSSRFinder.java#L80-L88
114,598
cdk/cdk
legacy/src/main/java/org/openscience/cdk/ringsearch/SSSRFinder.java
SSSRFinder.findEssentialRings
public IRingSet findEssentialRings() { if (atomContainer == null) { return null; } IRingSet ringSet = toRingSet(atomContainer, cycleBasis().essentialCycles()); // atomContainer.setProperty(CDKConstants.ESSENTIAL_RINGS, ringSet); return ringSet; }
java
public IRingSet findEssentialRings() { if (atomContainer == null) { return null; } IRingSet ringSet = toRingSet(atomContainer, cycleBasis().essentialCycles()); // atomContainer.setProperty(CDKConstants.ESSENTIAL_RINGS, ringSet); return ringSet; }
[ "public", "IRingSet", "findEssentialRings", "(", ")", "{", "if", "(", "atomContainer", "==", "null", ")", "{", "return", "null", ";", "}", "IRingSet", "ringSet", "=", "toRingSet", "(", "atomContainer", ",", "cycleBasis", "(", ")", ".", "essentialCycles", "("...
Finds the Set of Essential Rings. These rings are contained in every possible SSSR. The returned set is uniquely defined. @return a RingSet containing the Essential Rings
[ "Finds", "the", "Set", "of", "Essential", "Rings", ".", "These", "rings", "are", "contained", "in", "every", "possible", "SSSR", ".", "The", "returned", "set", "is", "uniquely", "defined", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/ringsearch/SSSRFinder.java#L97-L104
114,599
cdk/cdk
legacy/src/main/java/org/openscience/cdk/ringsearch/SSSRFinder.java
SSSRFinder.findRelevantRings
public IRingSet findRelevantRings() { if (atomContainer == null) { return null; } IRingSet ringSet = toRingSet(atomContainer, cycleBasis().relevantCycles().keySet()); // atomContainer.setProperty(CDKConstants.RELEVANT_RINGS, ringSet); return ringSet; }
java
public IRingSet findRelevantRings() { if (atomContainer == null) { return null; } IRingSet ringSet = toRingSet(atomContainer, cycleBasis().relevantCycles().keySet()); // atomContainer.setProperty(CDKConstants.RELEVANT_RINGS, ringSet); return ringSet; }
[ "public", "IRingSet", "findRelevantRings", "(", ")", "{", "if", "(", "atomContainer", "==", "null", ")", "{", "return", "null", ";", "}", "IRingSet", "ringSet", "=", "toRingSet", "(", "atomContainer", ",", "cycleBasis", "(", ")", ".", "relevantCycles", "(", ...
Finds the Set of Relevant Rings. These rings are contained in every possible SSSR. The returned set is uniquely defined. @return a RingSet containing the Relevant Rings
[ "Finds", "the", "Set", "of", "Relevant", "Rings", ".", "These", "rings", "are", "contained", "in", "every", "possible", "SSSR", ".", "The", "returned", "set", "is", "uniquely", "defined", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/ringsearch/SSSRFinder.java#L113-L121