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,000 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/Bond.java | Bond.get3DCenter | @Override
public Point3d get3DCenter() {
double xOfCenter = 0;
double yOfCenter = 0;
double zOfCenter = 0;
for (IAtom atom : atoms) {
xOfCenter += atom.getPoint3d().x;
yOfCenter += atom.getPoint3d().y;
zOfCenter += atom.getPoint3d().z;
}
... | java | @Override
public Point3d get3DCenter() {
double xOfCenter = 0;
double yOfCenter = 0;
double zOfCenter = 0;
for (IAtom atom : atoms) {
xOfCenter += atom.getPoint3d().x;
yOfCenter += atom.getPoint3d().y;
zOfCenter += atom.getPoint3d().z;
}
... | [
"@",
"Override",
"public",
"Point3d",
"get3DCenter",
"(",
")",
"{",
"double",
"xOfCenter",
"=",
"0",
";",
"double",
"yOfCenter",
"=",
"0",
";",
"double",
"zOfCenter",
"=",
"0",
";",
"for",
"(",
"IAtom",
"atom",
":",
"atoms",
")",
"{",
"xOfCenter",
"+="... | Returns the geometric 3D center of the bond.
@return The geometric 3D center of the bond | [
"Returns",
"the",
"geometric",
"3D",
"center",
"of",
"the",
"bond",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Bond.java#L436-L448 |
114,001 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/Bond.java | Bond.compare | @Override
public boolean compare(Object object) {
if (object instanceof IBond) {
Bond bond = (Bond) object;
for (IAtom atom : atoms) {
if (!bond.contains(atom)) {
return false;
}
}
// not important ??!!
... | java | @Override
public boolean compare(Object object) {
if (object instanceof IBond) {
Bond bond = (Bond) object;
for (IAtom atom : atoms) {
if (!bond.contains(atom)) {
return false;
}
}
// not important ??!!
... | [
"@",
"Override",
"public",
"boolean",
"compare",
"(",
"Object",
"object",
")",
"{",
"if",
"(",
"object",
"instanceof",
"IBond",
")",
"{",
"Bond",
"bond",
"=",
"(",
"Bond",
")",
"object",
";",
"for",
"(",
"IAtom",
"atom",
":",
"atoms",
")",
"{",
"if",... | Compares a bond with this bond.
@param object Object of type Bond
@return true if the bond is equal to this bond | [
"Compares",
"a",
"bond",
"with",
"this",
"bond",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Bond.java#L456-L473 |
114,002 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/Bond.java | Bond.isConnectedTo | @Override
public boolean isConnectedTo(IBond bond) {
for (IAtom atom : atoms) {
if (bond.contains(atom)) return true;
}
return false;
} | java | @Override
public boolean isConnectedTo(IBond bond) {
for (IAtom atom : atoms) {
if (bond.contains(atom)) return true;
}
return false;
} | [
"@",
"Override",
"public",
"boolean",
"isConnectedTo",
"(",
"IBond",
"bond",
")",
"{",
"for",
"(",
"IAtom",
"atom",
":",
"atoms",
")",
"{",
"if",
"(",
"bond",
".",
"contains",
"(",
"atom",
")",
")",
"return",
"true",
";",
"}",
"return",
"false",
";",... | Checks whether a bond is connected to another one.
This can only be true if the bonds have an Atom in common.
@param bond The bond which is checked to be connect with this one
@return true if the bonds share an atom, otherwise false | [
"Checks",
"whether",
"a",
"bond",
"is",
"connected",
"to",
"another",
"one",
".",
"This",
"can",
"only",
"be",
"true",
"if",
"the",
"bonds",
"have",
"an",
"Atom",
"in",
"common",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/Bond.java#L482-L488 |
114,003 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getParameters | @Override
public Object[] getParameters() {
// return the parameters as used for the descriptor calculation
Object[] params = new Object[2];
params[0] = checkAromaticity;
params[1] = salicylFlag;
return params;
} | java | @Override
public Object[] getParameters() {
// return the parameters as used for the descriptor calculation
Object[] params = new Object[2];
params[0] = checkAromaticity;
params[1] = salicylFlag;
return params;
} | [
"@",
"Override",
"public",
"Object",
"[",
"]",
"getParameters",
"(",
")",
"{",
"// return the parameters as used for the descriptor calculation",
"Object",
"[",
"]",
"params",
"=",
"new",
"Object",
"[",
"2",
"]",
";",
"params",
"[",
"0",
"]",
"=",
"checkAromatic... | Gets the parameters attribute of the XLogPDescriptor object.
@return The parameters value [boolean checkAromaticity, boolean salicylFlag]
@see #setParameters | [
"Gets",
"the",
"parameters",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L170-L177 |
114,004 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.initializeHydrogenPairCheck | private int[][] initializeHydrogenPairCheck(int[][] pairCheck) {
for (int i = 0; i < pairCheck.length; i++) {
for (int j = 0; j < pairCheck[0].length; j++) {
pairCheck[i][j] = 0;
}
}
return pairCheck;
} | java | private int[][] initializeHydrogenPairCheck(int[][] pairCheck) {
for (int i = 0; i < pairCheck.length; i++) {
for (int j = 0; j < pairCheck[0].length; j++) {
pairCheck[i][j] = 0;
}
}
return pairCheck;
} | [
"private",
"int",
"[",
"]",
"[",
"]",
"initializeHydrogenPairCheck",
"(",
"int",
"[",
"]",
"[",
"]",
"pairCheck",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"pairCheck",
".",
"length",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
... | Method initialise the HydrogenpairCheck with a value
@param pairCheck value
@return void | [
"Method",
"initialise",
"the",
"HydrogenpairCheck",
"with",
"a",
"value"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L977-L984 |
114,005 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.checkRingLink | private boolean checkRingLink(IRingSet ringSet, IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
if (ringSet.contains(atom)) {
return true;
}
for (IAtom neighbour : neighbours) {
if (ringSet.contains(neighbour)) {
... | java | private boolean checkRingLink(IRingSet ringSet, IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
if (ringSet.contains(atom)) {
return true;
}
for (IAtom neighbour : neighbours) {
if (ringSet.contains(neighbour)) {
... | [
"private",
"boolean",
"checkRingLink",
"(",
"IRingSet",
"ringSet",
",",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"if",
"(",
"ringSet",
"... | Check if atom or neighbour atom is part of a ring
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The hydrogenCount value | [
"Check",
"if",
"atom",
"or",
"neighbour",
"atom",
"is",
"part",
"of",
"a",
"ring"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L993-L1004 |
114,006 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getHydrogenCount | private int getHydrogenCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int hcounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("H")) {
hcounter += 1;
}
}
return... | java | private int getHydrogenCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int hcounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("H")) {
hcounter += 1;
}
}
return... | [
"private",
"int",
"getHydrogenCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"int",
"hcounter",
"=",
"0",
";",
"for",
"(",
"IAt... | Gets the hydrogenCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The hydrogenCount value | [
"Gets",
"the",
"hydrogenCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1013-L1022 |
114,007 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getHalogenCount | private int getHalogenCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int acounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("F") || neighbour.getSymbol().equals("I")
|| neighbour.get... | java | private int getHalogenCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int acounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("F") || neighbour.getSymbol().equals("I")
|| neighbour.get... | [
"private",
"int",
"getHalogenCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"int",
"acounter",
"=",
"0",
";",
"for",
"(",
"IAto... | Gets the HalogenCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The alogenCount value | [
"Gets",
"the",
"HalogenCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1031-L1041 |
114,008 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getAtomTypeXCount | private int getAtomTypeXCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int nocounter = 0;
IBond bond;
for (IAtom neighbour : neighbours) {
if ((neighbour.getSymbol().equals("N") || neighbour.getSymbol().equals("O"))
... | java | private int getAtomTypeXCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int nocounter = 0;
IBond bond;
for (IAtom neighbour : neighbours) {
if ((neighbour.getSymbol().equals("N") || neighbour.getSymbol().equals("O"))
... | [
"private",
"int",
"getAtomTypeXCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"int",
"nocounter",
"=",
"0",
";",
"IBond",
"bond",... | Gets the atomType X Count attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The nitrogenOrOxygenCount value | [
"Gets",
"the",
"atomType",
"X",
"Count",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1050-L1065 |
114,009 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getAromaticCarbonsCount | private int getAromaticCarbonsCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int carocounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("C") && neighbour.getFlag(CDKConstants.ISAROMATIC)) {
... | java | private int getAromaticCarbonsCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int carocounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("C") && neighbour.getFlag(CDKConstants.ISAROMATIC)) {
... | [
"private",
"int",
"getAromaticCarbonsCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"int",
"carocounter",
"=",
"0",
";",
"for",
"... | Gets the aromaticCarbonsCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The aromaticCarbonsCount value | [
"Gets",
"the",
"aromaticCarbonsCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1074-L1083 |
114,010 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getCarbonsCount | private int getCarbonsCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int ccounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("C")) {
if (!neighbour.getFlag(CDKConstants.ISAROMATIC)) {
... | java | private int getCarbonsCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int ccounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("C")) {
if (!neighbour.getFlag(CDKConstants.ISAROMATIC)) {
... | [
"private",
"int",
"getCarbonsCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"int",
"ccounter",
"=",
"0",
";",
"for",
"(",
"IAto... | Gets the carbonsCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The carbonsCount value | [
"Gets",
"the",
"carbonsCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1092-L1103 |
114,011 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getOxygenCount | private int getOxygenCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int ocounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("O")) {
if (!neighbour.getFlag(CDKConstants.ISAROMATIC)) {
... | java | private int getOxygenCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int ocounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("O")) {
if (!neighbour.getFlag(CDKConstants.ISAROMATIC)) {
... | [
"private",
"int",
"getOxygenCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"int",
"ocounter",
"=",
"0",
";",
"for",
"(",
"IAtom... | Gets the oxygenCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The carbonsCount value | [
"Gets",
"the",
"oxygenCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1112-L1123 |
114,012 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getDoubleBondedCarbonsCount | private int getDoubleBondedCarbonsCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
IBond bond;
int cdbcounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("C")) {
bond = ac.getBond(ne... | java | private int getDoubleBondedCarbonsCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
IBond bond;
int cdbcounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("C")) {
bond = ac.getBond(ne... | [
"private",
"int",
"getDoubleBondedCarbonsCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"IBond",
"bond",
";",
"int",
"cdbcounter",
... | Gets the doubleBondedCarbonsCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The doubleBondedCarbonsCount value | [
"Gets",
"the",
"doubleBondedCarbonsCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1132-L1145 |
114,013 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getDoubleBondedOxygenCount | private int getDoubleBondedOxygenCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
IBond bond;
int odbcounter = 0;
boolean chargeFlag = false;
if (atom.getFormalCharge() >= 1) {
chargeFlag = true;
}
for (IA... | java | private int getDoubleBondedOxygenCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
IBond bond;
int odbcounter = 0;
boolean chargeFlag = false;
if (atom.getFormalCharge() >= 1) {
chargeFlag = true;
}
for (IA... | [
"private",
"int",
"getDoubleBondedOxygenCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"IBond",
"bond",
";",
"int",
"odbcounter",
"... | Gets the doubleBondedOxygenCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The doubleBondedOxygenCount value | [
"Gets",
"the",
"doubleBondedOxygenCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1154-L1176 |
114,014 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getDoubleBondedSulfurCount | private int getDoubleBondedSulfurCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
IBond bond;
int sdbcounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("S")) {
if (atom.getFormalCha... | java | private int getDoubleBondedSulfurCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
IBond bond;
int sdbcounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("S")) {
if (atom.getFormalCha... | [
"private",
"int",
"getDoubleBondedSulfurCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"IBond",
"bond",
";",
"int",
"sdbcounter",
"... | Gets the doubleBondedSulfurCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The doubleBondedSulfurCount value | [
"Gets",
"the",
"doubleBondedSulfurCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1185-L1203 |
114,015 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getDoubleBondedNitrogenCount | private int getDoubleBondedNitrogenCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
IBond bond;
int ndbcounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("N")) {
bond = ac.getBond(n... | java | private int getDoubleBondedNitrogenCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
IBond bond;
int ndbcounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("N")) {
bond = ac.getBond(n... | [
"private",
"int",
"getDoubleBondedNitrogenCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"IBond",
"bond",
";",
"int",
"ndbcounter",
... | Gets the doubleBondedNitrogenCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The doubleBondedNitrogenCount value | [
"Gets",
"the",
"doubleBondedNitrogenCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1212-L1227 |
114,016 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getAromaticNitrogensCount | private int getAromaticNitrogensCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int narocounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("N") && (Boolean) neighbour.getProperty("IS_IN_AROMATIC_RING")) {... | java | private int getAromaticNitrogensCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int narocounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("N") && (Boolean) neighbour.getProperty("IS_IN_AROMATIC_RING")) {... | [
"private",
"int",
"getAromaticNitrogensCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"int",
"narocounter",
"=",
"0",
";",
"for",
... | Gets the aromaticNitrogensCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The aromaticNitrogensCount value | [
"Gets",
"the",
"aromaticNitrogensCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1236-L1245 |
114,017 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getPiSystemsCount | private int getPiSystemsCount(IAtomContainer ac, IAtom atom) {
List neighbours = ac.getConnectedAtomsList(atom);
int picounter = 0;
List bonds = null;
for (int i = 0; i < neighbours.size(); i++) {
IAtom neighbour = (IAtom) neighbours.get(i);
bonds = ac.getConnecte... | java | private int getPiSystemsCount(IAtomContainer ac, IAtom atom) {
List neighbours = ac.getConnectedAtomsList(atom);
int picounter = 0;
List bonds = null;
for (int i = 0; i < neighbours.size(); i++) {
IAtom neighbour = (IAtom) neighbours.get(i);
bonds = ac.getConnecte... | [
"private",
"int",
"getPiSystemsCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"int",
"picounter",
"=",
"0",
";",
"List",
"bonds",
"=",
"null",
";",
... | Gets the piSystemsCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The piSystemsCount value | [
"Gets",
"the",
"piSystemsCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1255-L1278 |
114,018 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getPresenceOfHydroxy | private boolean getPresenceOfHydroxy(IAtomContainer ac, IAtom atom) {
IAtom neighbour0 = (IAtom) ac.getConnectedAtomsList(atom).get(0);
List first = null;
if (neighbour0.getSymbol().equals("C")) {
first = ac.getConnectedAtomsList(neighbour0);
for (int i = 0; i < first.siz... | java | private boolean getPresenceOfHydroxy(IAtomContainer ac, IAtom atom) {
IAtom neighbour0 = (IAtom) ac.getConnectedAtomsList(atom).get(0);
List first = null;
if (neighbour0.getSymbol().equals("C")) {
first = ac.getConnectedAtomsList(neighbour0);
for (int i = 0; i < first.siz... | [
"private",
"boolean",
"getPresenceOfHydroxy",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"IAtom",
"neighbour0",
"=",
"(",
"IAtom",
")",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
".",
"get",
"(",
"0",
")",
";",
"List",
"first",... | Gets the presenceOf Hydroxy group attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The presenceOfCarbonil value | [
"Gets",
"the",
"presenceOf",
"Hydroxy",
"group",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1287-L1306 |
114,019 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getPresenceOfNitro | private boolean getPresenceOfNitro(IAtomContainer ac, IAtom atom) {
List neighbours = ac.getConnectedAtomsList(atom);
List second = null;
IBond bond = null;
//int counter = 0;
for (int i = 0; i < neighbours.size(); i++) {
IAtom neighbour = (IAtom) neighbours.get(i);
... | java | private boolean getPresenceOfNitro(IAtomContainer ac, IAtom atom) {
List neighbours = ac.getConnectedAtomsList(atom);
List second = null;
IBond bond = null;
//int counter = 0;
for (int i = 0; i < neighbours.size(); i++) {
IAtom neighbour = (IAtom) neighbours.get(i);
... | [
"private",
"boolean",
"getPresenceOfNitro",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"List",
"second",
"=",
"null",
";",
"IBond",
"bond",
"=",
"null",
... | Gets the presenceOfN=O attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The presenceOfNitor [boolean] | [
"Gets",
"the",
"presenceOfN",
"=",
"O",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1315-L1336 |
114,020 | cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getIfCarbonIsHydrophobic | private boolean getIfCarbonIsHydrophobic(IAtomContainer ac, IAtom atom) {
List first = ac.getConnectedAtomsList(atom);
List second = null;
List third = null;
//org.openscience.cdk.interfaces.IAtom[] fourth = null;
if (first.size() > 0) {
for (int i = 0; i < first.size... | java | private boolean getIfCarbonIsHydrophobic(IAtomContainer ac, IAtom atom) {
List first = ac.getConnectedAtomsList(atom);
List second = null;
List third = null;
//org.openscience.cdk.interfaces.IAtom[] fourth = null;
if (first.size() > 0) {
for (int i = 0; i < first.size... | [
"private",
"boolean",
"getIfCarbonIsHydrophobic",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"first",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"List",
"second",
"=",
"null",
";",
"List",
"third",
"=",
"null",
... | Gets the ifCarbonIsHydrophobic attribute of the XLogPDescriptor object.
C must be sp2 or sp3 and, for all distances C-1-2-3 only C atoms are permitted
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The ifCarbonIsHydrophobic value | [
"Gets",
"the",
"ifCarbonIsHydrophobic",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
".",
"C",
"must",
"be",
"sp2",
"or",
"sp3",
"and",
"for",
"all",
"distances",
"C",
"-",
"1",
"-",
"2",
"-",
"3",
"only",
"C",
"atoms",
"are",
"permitted"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1397-L1449 |
114,021 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java | MMElementRule.setParameters | @Override
public void setParameters(Object[] params) throws CDKException {
if (params.length > 2) throw new CDKException("MMElementRule only expects maximal two parameters");
if (params[0] != null) {
if (!(params[0] instanceof Database))
throw new CDKException("The param... | java | @Override
public void setParameters(Object[] params) throws CDKException {
if (params.length > 2) throw new CDKException("MMElementRule only expects maximal two parameters");
if (params[0] != null) {
if (!(params[0] instanceof Database))
throw new CDKException("The param... | [
"@",
"Override",
"public",
"void",
"setParameters",
"(",
"Object",
"[",
"]",
"params",
")",
"throws",
"CDKException",
"{",
"if",
"(",
"params",
".",
"length",
">",
"2",
")",
"throw",
"new",
"CDKException",
"(",
"\"MMElementRule only expects maximal two parameters\... | Sets the parameters attribute of the MMElementRule object.
@param params The new parameters value
@throws CDKException Description of the Exception
@see #getParameters | [
"Sets",
"the",
"parameters",
"attribute",
"of",
"the",
"MMElementRule",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java#L113-L143 |
114,022 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java | MMElementRule.getParameters | @Override
public Object[] getParameters() {
// return the parameters as used for the rule validation
Object[] params = new Object[2];
params[0] = databaseUsed;
params[1] = rangeMassUsed;
return params;
} | java | @Override
public Object[] getParameters() {
// return the parameters as used for the rule validation
Object[] params = new Object[2];
params[0] = databaseUsed;
params[1] = rangeMassUsed;
return params;
} | [
"@",
"Override",
"public",
"Object",
"[",
"]",
"getParameters",
"(",
")",
"{",
"// return the parameters as used for the rule validation",
"Object",
"[",
"]",
"params",
"=",
"new",
"Object",
"[",
"2",
"]",
";",
"params",
"[",
"0",
"]",
"=",
"databaseUsed",
";"... | Gets the parameters attribute of the MMElementRule object.
@return The parameters value
@see #setParameters | [
"Gets",
"the",
"parameters",
"attribute",
"of",
"the",
"MMElementRule",
"object",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java#L151-L158 |
114,023 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java | MMElementRule.getDNP_500 | private HashMap<String, Integer> getDNP_500() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 29);
map.put("H", 72);
map.put("N", 10);
map.put("O", 18);
map.put("P", 4);
map.put("S", 7);
map.put("F", 15);
map.put("Cl"... | java | private HashMap<String, Integer> getDNP_500() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 29);
map.put("H", 72);
map.put("N", 10);
map.put("O", 18);
map.put("P", 4);
map.put("S", 7);
map.put("F", 15);
map.put("Cl"... | [
"private",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"getDNP_500",
"(",
")",
"{",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"map",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"(",
")",
";",
"map",
".",
"put",
"(",
"\"C\"",
... | Get the map linking the symbol of the element and number maximum of occurrence.
For the analysis with the DNP database and mass lower than 500 Da.
@return The HashMap of the symbol linked with the maximum occurrence | [
"Get",
"the",
"map",
"linking",
"the",
"symbol",
"of",
"the",
"element",
"and",
"number",
"maximum",
"of",
"occurrence",
".",
"For",
"the",
"analysis",
"with",
"the",
"DNP",
"database",
"and",
"mass",
"lower",
"than",
"500",
"Da",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java#L190-L204 |
114,024 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java | MMElementRule.getDNP_1000 | private HashMap<String, Integer> getDNP_1000() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 66);
map.put("H", 126);
map.put("N", 25);
map.put("O", 27);
map.put("P", 6);
map.put("S", 8);
map.put("F", 16);
map.put("C... | java | private HashMap<String, Integer> getDNP_1000() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 66);
map.put("H", 126);
map.put("N", 25);
map.put("O", 27);
map.put("P", 6);
map.put("S", 8);
map.put("F", 16);
map.put("C... | [
"private",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"getDNP_1000",
"(",
")",
"{",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"map",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"(",
")",
";",
"map",
".",
"put",
"(",
"\"C\"",
... | Get the map linking the symbol of the element and number maximum of occurrence.
For the analysis with the DNP database and mass lower than 1000 Da.
@return The HashMap of the symbol linked with the maximum occurrence | [
"Get",
"the",
"map",
"linking",
"the",
"symbol",
"of",
"the",
"element",
"and",
"number",
"maximum",
"of",
"occurrence",
".",
"For",
"the",
"analysis",
"with",
"the",
"DNP",
"database",
"and",
"mass",
"lower",
"than",
"1000",
"Da",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java#L212-L226 |
114,025 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java | MMElementRule.getDNP_2000 | private HashMap<String, Integer> getDNP_2000() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 115);
map.put("H", 236);
map.put("N", 32);
map.put("O", 63);
map.put("P", 6);
map.put("S", 8);
map.put("F", 16);
map.put("... | java | private HashMap<String, Integer> getDNP_2000() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 115);
map.put("H", 236);
map.put("N", 32);
map.put("O", 63);
map.put("P", 6);
map.put("S", 8);
map.put("F", 16);
map.put("... | [
"private",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"getDNP_2000",
"(",
")",
"{",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"map",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"(",
")",
";",
"map",
".",
"put",
"(",
"\"C\"",
... | Get the map linking the symbol of the element and number maximum of occurrence.
For the analysis with the DNP database and mass lower than 2000 Da.
@return The HashMap of the symbol linked with the maximum occurrence | [
"Get",
"the",
"map",
"linking",
"the",
"symbol",
"of",
"the",
"element",
"and",
"number",
"maximum",
"of",
"occurrence",
".",
"For",
"the",
"analysis",
"with",
"the",
"DNP",
"database",
"and",
"mass",
"lower",
"than",
"2000",
"Da",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java#L234-L248 |
114,026 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java | MMElementRule.getDNP_3000 | private HashMap<String, Integer> getDNP_3000() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 162);
map.put("H", 208);
map.put("N", 48);
map.put("O", 78);
map.put("P", 6);
map.put("S", 9);
map.put("F", 16);
map.put("... | java | private HashMap<String, Integer> getDNP_3000() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 162);
map.put("H", 208);
map.put("N", 48);
map.put("O", 78);
map.put("P", 6);
map.put("S", 9);
map.put("F", 16);
map.put("... | [
"private",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"getDNP_3000",
"(",
")",
"{",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"map",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"(",
")",
";",
"map",
".",
"put",
"(",
"\"C\"",
... | Get the map linking the symbol of the element and number maximum of occurrence.
For the analysis with the DNP database and mass lower than 3000 Da.
@return The HashMap of the symbol linked with the maximum occurrence | [
"Get",
"the",
"map",
"linking",
"the",
"symbol",
"of",
"the",
"element",
"and",
"number",
"maximum",
"of",
"occurrence",
".",
"For",
"the",
"analysis",
"with",
"the",
"DNP",
"database",
"and",
"mass",
"lower",
"than",
"3000",
"Da",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java#L256-L270 |
114,027 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java | MMElementRule.getWisley_500 | private HashMap<String, Integer> getWisley_500() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 39);
map.put("H", 72);
map.put("N", 20);
map.put("O", 20);
map.put("P", 9);
map.put("S", 10);
map.put("F", 16);
map.put(... | java | private HashMap<String, Integer> getWisley_500() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 39);
map.put("H", 72);
map.put("N", 20);
map.put("O", 20);
map.put("P", 9);
map.put("S", 10);
map.put("F", 16);
map.put(... | [
"private",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"getWisley_500",
"(",
")",
"{",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"map",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"(",
")",
";",
"map",
".",
"put",
"(",
"\"C\"",... | Get the map linking the symbol of the element and number maximum of occurrence.
For the analysis with the Wisley database and mass lower than 500 Da.
@return The HashMap of the symbol linked with the maximum occurrence | [
"Get",
"the",
"map",
"linking",
"the",
"symbol",
"of",
"the",
"element",
"and",
"number",
"maximum",
"of",
"occurrence",
".",
"For",
"the",
"analysis",
"with",
"the",
"Wisley",
"database",
"and",
"mass",
"lower",
"than",
"500",
"Da",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java#L278-L293 |
114,028 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java | MMElementRule.getWisley_1000 | private HashMap<String, Integer> getWisley_1000() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 78);
map.put("H", 126);
map.put("N", 20);
map.put("O", 27);
map.put("P", 9);
map.put("S", 14);
map.put("F", 34);
map.pu... | java | private HashMap<String, Integer> getWisley_1000() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 78);
map.put("H", 126);
map.put("N", 20);
map.put("O", 27);
map.put("P", 9);
map.put("S", 14);
map.put("F", 34);
map.pu... | [
"private",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"getWisley_1000",
"(",
")",
"{",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"map",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"(",
")",
";",
"map",
".",
"put",
"(",
"\"C\""... | Get the map linking the symbol of the element and number maximum of occurrence.
For the analysis with the Wisley database and mass lower than 1000 Da.
@return The HashMap of the symbol linked with the maximum occurrence | [
"Get",
"the",
"map",
"linking",
"the",
"symbol",
"of",
"the",
"element",
"and",
"number",
"maximum",
"of",
"occurrence",
".",
"For",
"the",
"analysis",
"with",
"the",
"Wisley",
"database",
"and",
"mass",
"lower",
"than",
"1000",
"Da",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java#L301-L316 |
114,029 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java | MMElementRule.getWisley_2000 | private HashMap<String, Integer> getWisley_2000() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 156);
map.put("H", 180);
map.put("N", 20);
map.put("O", 40);
map.put("P", 9);
map.put("S", 14);
map.put("F", 48);
map.p... | java | private HashMap<String, Integer> getWisley_2000() {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("C", 156);
map.put("H", 180);
map.put("N", 20);
map.put("O", 40);
map.put("P", 9);
map.put("S", 14);
map.put("F", 48);
map.p... | [
"private",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"getWisley_2000",
"(",
")",
"{",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"map",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"(",
")",
";",
"map",
".",
"put",
"(",
"\"C\""... | Get the map linking the symbol of the element and number maximum of occurrence.
For the analysis with the Wisley database and mass lower than 2000 Da.
@return The HashMap of the symbol linked with the maximum occurrence | [
"Get",
"the",
"map",
"linking",
"the",
"symbol",
"of",
"the",
"element",
"and",
"number",
"maximum",
"of",
"occurrence",
".",
"For",
"the",
"analysis",
"with",
"the",
"Wisley",
"database",
"and",
"mass",
"lower",
"than",
"2000",
"Da",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java#L324-L339 |
114,030 | cdk/cdk | tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePattern.java | IsotopePattern.setMonoIsotope | public void setMonoIsotope(IsotopeContainer isoContainer) {
if (!isotopeCList.contains(isoContainer))
isotopeCList.add(isoContainer);
monoIsotopePosition = isotopeCList.indexOf(isoContainer);
} | java | public void setMonoIsotope(IsotopeContainer isoContainer) {
if (!isotopeCList.contains(isoContainer))
isotopeCList.add(isoContainer);
monoIsotopePosition = isotopeCList.indexOf(isoContainer);
} | [
"public",
"void",
"setMonoIsotope",
"(",
"IsotopeContainer",
"isoContainer",
")",
"{",
"if",
"(",
"!",
"isotopeCList",
".",
"contains",
"(",
"isoContainer",
")",
")",
"isotopeCList",
".",
"add",
"(",
"isoContainer",
")",
";",
"monoIsotopePosition",
"=",
"isotope... | Set the mono isotope object. Adds the isoContainer to the isotope
pattern, if it is not already added.
@param isoContainer The IsotopeContainer object | [
"Set",
"the",
"mono",
"isotope",
"object",
".",
"Adds",
"the",
"isoContainer",
"to",
"the",
"isotope",
"pattern",
"if",
"it",
"is",
"not",
"already",
"added",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePattern.java#L37-L41 |
114,031 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/tools/manipulator/AtomContainerComparatorBy2DCenter.java | AtomContainerComparatorBy2DCenter.compare | @Override
public int compare(IAtomContainer a, IAtomContainer b) {
Point2d p1 = center(a);
Point2d p2 = center(b);
if (p1.x > p2.x) return +1;
if (p1.x < p2.x) return -1;
if (p1.y > p2.y) return +1;
if (p1.y < p2.y) return -1;
return 0;
} | java | @Override
public int compare(IAtomContainer a, IAtomContainer b) {
Point2d p1 = center(a);
Point2d p2 = center(b);
if (p1.x > p2.x) return +1;
if (p1.x < p2.x) return -1;
if (p1.y > p2.y) return +1;
if (p1.y < p2.y) return -1;
return 0;
} | [
"@",
"Override",
"public",
"int",
"compare",
"(",
"IAtomContainer",
"a",
",",
"IAtomContainer",
"b",
")",
"{",
"Point2d",
"p1",
"=",
"center",
"(",
"a",
")",
";",
"Point2d",
"p2",
"=",
"center",
"(",
"b",
")",
";",
"if",
"(",
"p1",
".",
"x",
">",
... | Compare two AtomContainers based on their 2D position.
@see java.util.Comparator#compare(java.lang.Object, java.lang.Object) | [
"Compare",
"two",
"AtomContainers",
"based",
"on",
"their",
"2D",
"position",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/AtomContainerComparatorBy2DCenter.java#L46-L59 |
114,032 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.placeRing | public void placeRing(IRing ring, Point2d ringCenter, double bondLength, Map<Integer, Double> startAngles) {
double radius = this.getNativeRingRadius(ring, bondLength);
double addAngle = 2 * Math.PI / ring.getRingSize();
IAtom startAtom = ring.getAtom(0);
Point2d p = new Point2d(ringCen... | java | public void placeRing(IRing ring, Point2d ringCenter, double bondLength, Map<Integer, Double> startAngles) {
double radius = this.getNativeRingRadius(ring, bondLength);
double addAngle = 2 * Math.PI / ring.getRingSize();
IAtom startAtom = ring.getAtom(0);
Point2d p = new Point2d(ringCen... | [
"public",
"void",
"placeRing",
"(",
"IRing",
"ring",
",",
"Point2d",
"ringCenter",
",",
"double",
"bondLength",
",",
"Map",
"<",
"Integer",
",",
"Double",
">",
"startAngles",
")",
"{",
"double",
"radius",
"=",
"this",
".",
"getNativeRingRadius",
"(",
"ring",... | Place ring with user provided angles.
@param ring the ring to place.
@param ringCenter center coordinates of the ring.
@param bondLength given bond length.
@param startAngles a map with start angles when drawing the ring. | [
"Place",
"ring",
"with",
"user",
"provided",
"angles",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L149-L179 |
114,033 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.placeRingSubstituents | public IAtomContainer placeRingSubstituents(IRingSet rs, double bondLength) {
logger.debug("RingPlacer.placeRingSubstituents() start");
IRing ring = null;
IAtom atom = null;
IRingSet rings = null;
IAtomContainer unplacedPartners = rs.getBuilder().newInstance(IAtomContainer.class)... | java | public IAtomContainer placeRingSubstituents(IRingSet rs, double bondLength) {
logger.debug("RingPlacer.placeRingSubstituents() start");
IRing ring = null;
IAtom atom = null;
IRingSet rings = null;
IAtomContainer unplacedPartners = rs.getBuilder().newInstance(IAtomContainer.class)... | [
"public",
"IAtomContainer",
"placeRingSubstituents",
"(",
"IRingSet",
"rs",
",",
"double",
"bondLength",
")",
"{",
"logger",
".",
"debug",
"(",
"\"RingPlacer.placeRingSubstituents() start\"",
")",
";",
"IRing",
"ring",
"=",
"null",
";",
"IAtom",
"atom",
"=",
"null... | Positions the aliphatic substituents of a ring system
@param rs The RingSystem for which the substituents are to be laid out
@return A list of atoms that where laid out | [
"Positions",
"the",
"aliphatic",
"substituents",
"of",
"a",
"ring",
"system"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L187-L227 |
114,034 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.placeSpiroRing | public void placeSpiroRing(IRing ring, IAtomContainer sharedAtoms, Point2d sharedAtomsCenter, Vector2d ringCenterVector, double bondLength) {
IAtom startAtom = sharedAtoms.getAtom(0);
List<IBond> mBonds = molecule.getConnectedBondsList(sharedAtoms.getAtom(0));
final int degree = mBonds.size();
... | java | public void placeSpiroRing(IRing ring, IAtomContainer sharedAtoms, Point2d sharedAtomsCenter, Vector2d ringCenterVector, double bondLength) {
IAtom startAtom = sharedAtoms.getAtom(0);
List<IBond> mBonds = molecule.getConnectedBondsList(sharedAtoms.getAtom(0));
final int degree = mBonds.size();
... | [
"public",
"void",
"placeSpiroRing",
"(",
"IRing",
"ring",
",",
"IAtomContainer",
"sharedAtoms",
",",
"Point2d",
"sharedAtomsCenter",
",",
"Vector2d",
"ringCenterVector",
",",
"double",
"bondLength",
")",
"{",
"IAtom",
"startAtom",
"=",
"sharedAtoms",
".",
"getAtom",... | Generated coordinates for a given ring, which is connected to a spiro ring.
The rings share exactly one atom.
@param ring The ring to be placed
@param sharedAtoms The atoms of this ring, also members of another ring, which are already placed
@param sharedAtomsCenter The geometric center of these atoms
@param ... | [
"Generated",
"coordinates",
"for",
"a",
"given",
"ring",
"which",
"is",
"connected",
"to",
"a",
"spiro",
"ring",
".",
"The",
"rings",
"share",
"exactly",
"one",
"atom",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L345-L415 |
114,035 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.completePartiallyPlacedRing | boolean completePartiallyPlacedRing(IRingSet rset, IRing ring, double bondLength) {
if (ring.getFlag(CDKConstants.ISPLACED))
return true;
IRing partiallyPlacedRing = molecule.getBuilder().newInstance(IRing.class);
for (IAtom atom : ring.atoms())
if (atom.getPoint2d() != n... | java | boolean completePartiallyPlacedRing(IRingSet rset, IRing ring, double bondLength) {
if (ring.getFlag(CDKConstants.ISPLACED))
return true;
IRing partiallyPlacedRing = molecule.getBuilder().newInstance(IRing.class);
for (IAtom atom : ring.atoms())
if (atom.getPoint2d() != n... | [
"boolean",
"completePartiallyPlacedRing",
"(",
"IRingSet",
"rset",
",",
"IRing",
"ring",
",",
"double",
"bondLength",
")",
"{",
"if",
"(",
"ring",
".",
"getFlag",
"(",
"CDKConstants",
".",
"ISPLACED",
")",
")",
"return",
"true",
";",
"IRing",
"partiallyPlacedR... | Completes the layout of a partially laid out ring.
@param rset ring set
@param ring the ring to complete
@param bondLength the bond length | [
"Completes",
"the",
"layout",
"of",
"a",
"partially",
"laid",
"out",
"ring",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L543-L562 |
114,036 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.getMidPoint | private static Point2d getMidPoint(Tuple2d a, Tuple2d b) {
return new Point2d((a.x + b.x) / 2, (a.y + b.y) / 2);
} | java | private static Point2d getMidPoint(Tuple2d a, Tuple2d b) {
return new Point2d((a.x + b.x) / 2, (a.y + b.y) / 2);
} | [
"private",
"static",
"Point2d",
"getMidPoint",
"(",
"Tuple2d",
"a",
",",
"Tuple2d",
"b",
")",
"{",
"return",
"new",
"Point2d",
"(",
"(",
"a",
".",
"x",
"+",
"b",
".",
"x",
")",
"/",
"2",
",",
"(",
"a",
".",
"y",
"+",
"b",
".",
"y",
")",
"/",
... | Get the middle of two provide points.
@param a first point
@param b second point
@return mid | [
"Get",
"the",
"middle",
"of",
"two",
"provide",
"points",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L571-L573 |
114,037 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.getPerpendicular | private static Vector2d getPerpendicular(Tuple2d a, Tuple2d b, Vector2d ref) {
final Vector2d pVec = new Vector2d(-(a.y-b.y), a.x-b.x);
if (pVec.dot(ref) < 0)
pVec.negate();
return pVec;
} | java | private static Vector2d getPerpendicular(Tuple2d a, Tuple2d b, Vector2d ref) {
final Vector2d pVec = new Vector2d(-(a.y-b.y), a.x-b.x);
if (pVec.dot(ref) < 0)
pVec.negate();
return pVec;
} | [
"private",
"static",
"Vector2d",
"getPerpendicular",
"(",
"Tuple2d",
"a",
",",
"Tuple2d",
"b",
",",
"Vector2d",
"ref",
")",
"{",
"final",
"Vector2d",
"pVec",
"=",
"new",
"Vector2d",
"(",
"-",
"(",
"a",
".",
"y",
"-",
"b",
".",
"y",
")",
",",
"a",
"... | Gat a vector perpendicular to the line, a-b, that is pointing
the same direction as 'ref'.
@param a first coordinate
@param b second coordinate
@param ref reference vector
@return perpendicular vector | [
"Gat",
"a",
"vector",
"perpendicular",
"to",
"the",
"line",
"a",
"-",
"b",
"that",
"is",
"pointing",
"the",
"same",
"direction",
"as",
"ref",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L589-L594 |
114,038 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.allPlaced | public boolean allPlaced(IRingSet rs) {
for (int i = 0; i < rs.getAtomContainerCount(); i++) {
if (!((IRing) rs.getAtomContainer(i)).getFlag(CDKConstants.ISPLACED)) {
return false;
}
}
return true;
} | java | public boolean allPlaced(IRingSet rs) {
for (int i = 0; i < rs.getAtomContainerCount(); i++) {
if (!((IRing) rs.getAtomContainer(i)).getFlag(CDKConstants.ISPLACED)) {
return false;
}
}
return true;
} | [
"public",
"boolean",
"allPlaced",
"(",
"IRingSet",
"rs",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"rs",
".",
"getAtomContainerCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"!",
"(",
"(",
"IRing",
")",
"rs",
".",
"getA... | True if coordinates have been assigned to all atoms in all rings.
@param rs The ringset to be checked
@return True if coordinates have been assigned to all atoms in all rings. | [
"True",
"if",
"coordinates",
"have",
"been",
"assigned",
"to",
"all",
"atoms",
"in",
"all",
"rings",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L603-L610 |
114,039 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.checkAndMarkPlaced | public void checkAndMarkPlaced(IRingSet rs) {
IRing ring = null;
boolean allPlaced = true;
boolean ringsetPlaced = true;
for (int i = 0; i < rs.getAtomContainerCount(); i++) {
ring = (IRing) rs.getAtomContainer(i);
allPlaced = true;
for (int j = 0; j <... | java | public void checkAndMarkPlaced(IRingSet rs) {
IRing ring = null;
boolean allPlaced = true;
boolean ringsetPlaced = true;
for (int i = 0; i < rs.getAtomContainerCount(); i++) {
ring = (IRing) rs.getAtomContainer(i);
allPlaced = true;
for (int j = 0; j <... | [
"public",
"void",
"checkAndMarkPlaced",
"(",
"IRingSet",
"rs",
")",
"{",
"IRing",
"ring",
"=",
"null",
";",
"boolean",
"allPlaced",
"=",
"true",
";",
"boolean",
"ringsetPlaced",
"=",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"rs",
... | Walks throught the atoms of each ring in a ring set and marks
a ring as PLACED if all of its atoms have been placed.
@param rs The ringset to be checked | [
"Walks",
"throught",
"the",
"atoms",
"of",
"each",
"ring",
"in",
"a",
"ring",
"set",
"and",
"marks",
"a",
"ring",
"as",
"PLACED",
"if",
"all",
"of",
"its",
"atoms",
"have",
"been",
"placed",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L618-L635 |
114,040 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.getBridgeAtoms | private IAtom[] getBridgeAtoms(IAtomContainer sharedAtoms) {
IAtom[] bridgeAtoms = new IAtom[2];
IAtom atom;
int counter = 0;
for (int f = 0; f < sharedAtoms.getAtomCount(); f++) {
atom = sharedAtoms.getAtom(f);
if (sharedAtoms.getConnectedAtomsList(atom).size() =... | java | private IAtom[] getBridgeAtoms(IAtomContainer sharedAtoms) {
IAtom[] bridgeAtoms = new IAtom[2];
IAtom atom;
int counter = 0;
for (int f = 0; f < sharedAtoms.getAtomCount(); f++) {
atom = sharedAtoms.getAtom(f);
if (sharedAtoms.getConnectedAtomsList(atom).size() =... | [
"private",
"IAtom",
"[",
"]",
"getBridgeAtoms",
"(",
"IAtomContainer",
"sharedAtoms",
")",
"{",
"IAtom",
"[",
"]",
"bridgeAtoms",
"=",
"new",
"IAtom",
"[",
"2",
"]",
";",
"IAtom",
"atom",
";",
"int",
"counter",
"=",
"0",
";",
"for",
"(",
"int",
"f",
... | Returns the bridge atoms, that is the outermost atoms in
the chain of more than two atoms which are shared by two rings
@param sharedAtoms The atoms (n > 2) which are shared by two rings
@return The bridge atoms, i.e. the outermost atoms in the chain of more than two atoms which are shared by two rings | [
"Returns",
"the",
"bridge",
"atoms",
"that",
"is",
"the",
"outermost",
"atoms",
"in",
"the",
"chain",
"of",
"more",
"than",
"two",
"atoms",
"which",
"are",
"shared",
"by",
"two",
"rings"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L644-L656 |
114,041 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.partitionNonRingPartners | public void partitionNonRingPartners(IAtom atom, IRing ring, IAtomContainer ringAtoms, IAtomContainer nonRingAtoms) {
List atoms = molecule.getConnectedAtomsList(atom);
for (int i = 0; i < atoms.size(); i++) {
IAtom curAtom = (IAtom) atoms.get(i);
if (!ring.contains(curAtom)) {
... | java | public void partitionNonRingPartners(IAtom atom, IRing ring, IAtomContainer ringAtoms, IAtomContainer nonRingAtoms) {
List atoms = molecule.getConnectedAtomsList(atom);
for (int i = 0; i < atoms.size(); i++) {
IAtom curAtom = (IAtom) atoms.get(i);
if (!ring.contains(curAtom)) {
... | [
"public",
"void",
"partitionNonRingPartners",
"(",
"IAtom",
"atom",
",",
"IRing",
"ring",
",",
"IAtomContainer",
"ringAtoms",
",",
"IAtomContainer",
"nonRingAtoms",
")",
"{",
"List",
"atoms",
"=",
"molecule",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
... | Partition the bonding partners of a given atom into ring atoms and non-ring atoms
@param atom The atom whose bonding partners are to be partitioned
@param ring The ring against which the bonding partners are checked
@param ringAtoms An AtomContainer to store the ring bonding partners
@param nonRingAtoms An... | [
"Partition",
"the",
"bonding",
"partners",
"of",
"a",
"given",
"atom",
"into",
"ring",
"atoms",
"and",
"non",
"-",
"ring",
"atoms"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L666-L676 |
114,042 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java | RingPlacer.getRingCenterOfFirstRing | Vector2d getRingCenterOfFirstRing(IRing ring, Vector2d bondVector, double bondLength) {
int size = ring.getAtomCount();
double radius = bondLength / (2 * Math.sin((Math.PI) / size));
double newRingPerpendicular = Math.sqrt(Math.pow(radius, 2) - Math.pow(bondLength / 2, 2));
/* get the an... | java | Vector2d getRingCenterOfFirstRing(IRing ring, Vector2d bondVector, double bondLength) {
int size = ring.getAtomCount();
double radius = bondLength / (2 * Math.sin((Math.PI) / size));
double newRingPerpendicular = Math.sqrt(Math.pow(radius, 2) - Math.pow(bondLength / 2, 2));
/* get the an... | [
"Vector2d",
"getRingCenterOfFirstRing",
"(",
"IRing",
"ring",
",",
"Vector2d",
"bondVector",
",",
"double",
"bondLength",
")",
"{",
"int",
"size",
"=",
"ring",
".",
"getAtomCount",
"(",
")",
";",
"double",
"radius",
"=",
"bondLength",
"/",
"(",
"2",
"*",
"... | Calculated the center for the first ring so that it can
layed out. Only then, all other rings can be assigned
coordinates relative to it.
@param ring The ring for which the center is to be calculated
@return A Vector2d pointing to the new ringcenter | [
"Calculated",
"the",
"center",
"for",
"the",
"first",
"ring",
"so",
"that",
"it",
"can",
"layed",
"out",
".",
"Only",
"then",
"all",
"other",
"rings",
"can",
"be",
"assigned",
"coordinates",
"relative",
"to",
"it",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L700-L712 |
114,043 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java | StandardAtomGenerator.generateSymbol | AtomSymbol generateSymbol(IAtomContainer container, IAtom atom, HydrogenPosition position, RendererModel model) {
if (atom instanceof IPseudoAtom) {
IPseudoAtom pAtom = (IPseudoAtom) atom;
if (pAtom.getAttachPointNum() <= 0) {
if (pAtom.getLabel().equals("*")) {
... | java | AtomSymbol generateSymbol(IAtomContainer container, IAtom atom, HydrogenPosition position, RendererModel model) {
if (atom instanceof IPseudoAtom) {
IPseudoAtom pAtom = (IPseudoAtom) atom;
if (pAtom.getAttachPointNum() <= 0) {
if (pAtom.getLabel().equals("*")) {
... | [
"AtomSymbol",
"generateSymbol",
"(",
"IAtomContainer",
"container",
",",
"IAtom",
"atom",
",",
"HydrogenPosition",
"position",
",",
"RendererModel",
"model",
")",
"{",
"if",
"(",
"atom",
"instanceof",
"IPseudoAtom",
")",
"{",
"IPseudoAtom",
"pAtom",
"=",
"(",
"I... | Generate the displayed atom symbol for an atom in given structure with the specified hydrogen
position.
@param container structure to which the atom belongs
@param atom the atom to generate the symbol for
@param position the hydrogen position
@param model additional rendering options
@return atom symbol | [
"Generate",
"the",
"displayed",
"atom",
"symbol",
"for",
"an",
"atom",
"in",
"given",
"structure",
"with",
"the",
"specified",
"hydrogen",
"position",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L118-L154 |
114,044 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java | StandardAtomGenerator.generatePeriodicSymbol | AtomSymbol generatePeriodicSymbol(final int number, final int hydrogens, final int mass, final int charge,
final int unpaired, HydrogenPosition position) {
TextOutline element = number == 0 ? new TextOutline("*", font)
: new TextOu... | java | AtomSymbol generatePeriodicSymbol(final int number, final int hydrogens, final int mass, final int charge,
final int unpaired, HydrogenPosition position) {
TextOutline element = number == 0 ? new TextOutline("*", font)
: new TextOu... | [
"AtomSymbol",
"generatePeriodicSymbol",
"(",
"final",
"int",
"number",
",",
"final",
"int",
"hydrogens",
",",
"final",
"int",
"mass",
",",
"final",
"int",
"charge",
",",
"final",
"int",
"unpaired",
",",
"HydrogenPosition",
"position",
")",
"{",
"TextOutline",
... | Generate an atom symbol for a periodic element with the specified number of hydrogens, ionic
charge, mass,
@param number atomic number
@param hydrogens labelled hydrogen count
@param mass atomic mass
@param charge ionic formal charge
@param unpaired number of unpaired electrons
@param position placement o... | [
"Generate",
"an",
"atom",
"symbol",
"for",
"a",
"periodic",
"element",
"with",
"the",
"specified",
"number",
"of",
"hydrogens",
"ionic",
"charge",
"mass"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L374-L410 |
114,045 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java | StandardAtomGenerator.positionHydrogenLabel | TextOutline positionHydrogenLabel(HydrogenPosition position, TextOutline element, TextOutline hydrogen) {
final Rectangle2D elementBounds = element.getBounds();
final Rectangle2D hydrogenBounds = hydrogen.getBounds();
switch (position) {
case Above:
return hydrogen.tr... | java | TextOutline positionHydrogenLabel(HydrogenPosition position, TextOutline element, TextOutline hydrogen) {
final Rectangle2D elementBounds = element.getBounds();
final Rectangle2D hydrogenBounds = hydrogen.getBounds();
switch (position) {
case Above:
return hydrogen.tr... | [
"TextOutline",
"positionHydrogenLabel",
"(",
"HydrogenPosition",
"position",
",",
"TextOutline",
"element",
",",
"TextOutline",
"hydrogen",
")",
"{",
"final",
"Rectangle2D",
"elementBounds",
"=",
"element",
".",
"getBounds",
"(",
")",
";",
"final",
"Rectangle2D",
"h... | Position the hydrogen label relative to the element label.
@param position relative position where the hydrogen is placed
@param element the outline of the element label
@param hydrogen the outline of the hydrogen
@return positioned hydrogen label | [
"Position",
"the",
"hydrogen",
"label",
"relative",
"to",
"the",
"element",
"label",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L420-L434 |
114,046 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java | StandardAtomGenerator.positionSubscript | TextOutline positionSubscript(TextOutline label, TextOutline subscript) {
final Rectangle2D hydrogenBounds = label.getBounds();
final Rectangle2D hydrogenCountBounds = subscript.getBounds();
subscript = subscript.translate((hydrogenBounds.getMaxX() + padding) - hydrogenCountBounds.getMinX(),
... | java | TextOutline positionSubscript(TextOutline label, TextOutline subscript) {
final Rectangle2D hydrogenBounds = label.getBounds();
final Rectangle2D hydrogenCountBounds = subscript.getBounds();
subscript = subscript.translate((hydrogenBounds.getMaxX() + padding) - hydrogenCountBounds.getMinX(),
... | [
"TextOutline",
"positionSubscript",
"(",
"TextOutline",
"label",
",",
"TextOutline",
"subscript",
")",
"{",
"final",
"Rectangle2D",
"hydrogenBounds",
"=",
"label",
".",
"getBounds",
"(",
")",
";",
"final",
"Rectangle2D",
"hydrogenCountBounds",
"=",
"subscript",
".",... | Positions an outline in the subscript position relative to another 'primary' label.
@param label a label outline
@param subscript the label outline to position as subscript
@return positioned subscript outline | [
"Positions",
"an",
"outline",
"in",
"the",
"subscript",
"position",
"relative",
"to",
"another",
"primary",
"label",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L443-L449 |
114,047 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java | StandardAtomGenerator.positionChargeLabel | TextOutline positionChargeLabel(int hydrogens, HydrogenPosition position, TextOutline charge, TextOutline element,
TextOutline hydrogen) {
final Rectangle2D chargeBounds = charge.getBounds();
// the charge is placed to the top right of the element symbol
// ... | java | TextOutline positionChargeLabel(int hydrogens, HydrogenPosition position, TextOutline charge, TextOutline element,
TextOutline hydrogen) {
final Rectangle2D chargeBounds = charge.getBounds();
// the charge is placed to the top right of the element symbol
// ... | [
"TextOutline",
"positionChargeLabel",
"(",
"int",
"hydrogens",
",",
"HydrogenPosition",
"position",
",",
"TextOutline",
"charge",
",",
"TextOutline",
"element",
",",
"TextOutline",
"hydrogen",
")",
"{",
"final",
"Rectangle2D",
"chargeBounds",
"=",
"charge",
".",
"ge... | Position the charge label on the top right of either the element or hydrogen label. Where the
charge is placed depends on the number of hydrogens and their position relative to the
element symbol.
@param hydrogens number of hydrogen
@param position position of hydrogen
@param charge the charge label outline (to be... | [
"Position",
"the",
"charge",
"label",
"on",
"the",
"top",
"right",
"of",
"either",
"the",
"element",
"or",
"hydrogen",
"label",
".",
"Where",
"the",
"charge",
"is",
"placed",
"depends",
"on",
"the",
"number",
"of",
"hydrogens",
"and",
"their",
"position",
... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L479-L495 |
114,048 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java | StandardAtomGenerator.positionMassLabel | TextOutline positionMassLabel(TextOutline massLabel, TextOutline elementLabel) {
final Rectangle2D elementBounds = elementLabel.getBounds();
final Rectangle2D massBounds = massLabel.getBounds();
return massLabel.translate((elementBounds.getMinX() - padding) - massBounds.getMaxX(),
... | java | TextOutline positionMassLabel(TextOutline massLabel, TextOutline elementLabel) {
final Rectangle2D elementBounds = elementLabel.getBounds();
final Rectangle2D massBounds = massLabel.getBounds();
return massLabel.translate((elementBounds.getMinX() - padding) - massBounds.getMaxX(),
... | [
"TextOutline",
"positionMassLabel",
"(",
"TextOutline",
"massLabel",
",",
"TextOutline",
"elementLabel",
")",
"{",
"final",
"Rectangle2D",
"elementBounds",
"=",
"elementLabel",
".",
"getBounds",
"(",
")",
";",
"final",
"Rectangle2D",
"massBounds",
"=",
"massLabel",
... | Position the mass label relative to the element label. The mass adjunct is position to the
top left of the element label.
@param massLabel mass label outline
@param elementLabel element label outline
@return positioned mass label | [
"Position",
"the",
"mass",
"label",
"relative",
"to",
"the",
"element",
"label",
".",
"The",
"mass",
"adjunct",
"is",
"position",
"to",
"the",
"top",
"left",
"of",
"the",
"element",
"label",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L505-L510 |
114,049 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java | StandardAtomGenerator.hydrogenXDodge | private double hydrogenXDodge(int hydrogens, int mass, TextOutline elementLabel, TextOutline hydrogenLabel,
TextOutline hydrogenCount, TextOutline massLabel) {
if (mass < 0 && hydrogens > 1) {
return (elementLabel.getBounds().getMinX() - padding) - hydrogenCount.get... | java | private double hydrogenXDodge(int hydrogens, int mass, TextOutline elementLabel, TextOutline hydrogenLabel,
TextOutline hydrogenCount, TextOutline massLabel) {
if (mass < 0 && hydrogens > 1) {
return (elementLabel.getBounds().getMinX() - padding) - hydrogenCount.get... | [
"private",
"double",
"hydrogenXDodge",
"(",
"int",
"hydrogens",
",",
"int",
"mass",
",",
"TextOutline",
"elementLabel",
",",
"TextOutline",
"hydrogenLabel",
",",
"TextOutline",
"hydrogenCount",
",",
"TextOutline",
"massLabel",
")",
"{",
"if",
"(",
"mass",
"<",
"... | If the hydrogens are position in from of the element we may need to move the hydrogen and
hydrogen count labels. This code assesses the positions of the mass, hydrogen, and hydrogen
count labels and determines the x-axis adjustment needed for the hydrogen label to dodge a
collision.
@param hydrogens number of hydr... | [
"If",
"the",
"hydrogens",
"are",
"position",
"in",
"from",
"of",
"the",
"element",
"we",
"may",
"need",
"to",
"move",
"the",
"hydrogen",
"and",
"hydrogen",
"count",
"labels",
".",
"This",
"code",
"assesses",
"the",
"positions",
"of",
"the",
"mass",
"hydrog... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L526-L538 |
114,050 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java | StandardAtomGenerator.isMajorIsotope | private boolean isMajorIsotope(int number, int mass) {
try {
IIsotope isotope = Isotopes.getInstance().getMajorIsotope(number);
return isotope != null && isotope.getMassNumber().equals(mass);
} catch (IOException e) {
return false;
}
} | java | private boolean isMajorIsotope(int number, int mass) {
try {
IIsotope isotope = Isotopes.getInstance().getMajorIsotope(number);
return isotope != null && isotope.getMassNumber().equals(mass);
} catch (IOException e) {
return false;
}
} | [
"private",
"boolean",
"isMajorIsotope",
"(",
"int",
"number",
",",
"int",
"mass",
")",
"{",
"try",
"{",
"IIsotope",
"isotope",
"=",
"Isotopes",
".",
"getInstance",
"(",
")",
".",
"getMajorIsotope",
"(",
"number",
")",
";",
"return",
"isotope",
"!=",
"null"... | Utility to determine if the specified mass is the major isotope for the given atomic number.
@param number atomic number
@param mass atomic mass
@return the mass is the major mass for the atomic number | [
"Utility",
"to",
"determine",
"if",
"the",
"specified",
"mass",
"is",
"the",
"major",
"isotope",
"for",
"the",
"given",
"atomic",
"number",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L547-L554 |
114,051 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java | StandardAtomGenerator.chargeAdjunctText | static String chargeAdjunctText(final int charge, final int unpaired) {
StringBuilder sb = new StringBuilder();
if (unpaired == 1) {
if (charge != 0) {
sb.append('(').append(BULLET).append(')');
} else {
sb.append(BULLET);
}
} ... | java | static String chargeAdjunctText(final int charge, final int unpaired) {
StringBuilder sb = new StringBuilder();
if (unpaired == 1) {
if (charge != 0) {
sb.append('(').append(BULLET).append(')');
} else {
sb.append(BULLET);
}
} ... | [
"static",
"String",
"chargeAdjunctText",
"(",
"final",
"int",
"charge",
",",
"final",
"int",
"unpaired",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"unpaired",
"==",
"1",
")",
"{",
"if",
"(",
"charge",
"!=",
... | Create the charge adjunct text for the specified charge and number of unpaired electrons.
@param charge formal charge
@param unpaired number of unpaired electrons
@return adjunct text | [
"Create",
"the",
"charge",
"adjunct",
"text",
"for",
"the",
"specified",
"charge",
"and",
"number",
"of",
"unpaired",
"electrons",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L581-L605 |
114,052 | cdk/cdk | display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java | StandardAtomGenerator.accessPseudoLabel | static String accessPseudoLabel(IPseudoAtom atom, String defaultLabel) {
String label = atom.getLabel();
if (label != null && !label.isEmpty()) return label;
return defaultLabel;
} | java | static String accessPseudoLabel(IPseudoAtom atom, String defaultLabel) {
String label = atom.getLabel();
if (label != null && !label.isEmpty()) return label;
return defaultLabel;
} | [
"static",
"String",
"accessPseudoLabel",
"(",
"IPseudoAtom",
"atom",
",",
"String",
"defaultLabel",
")",
"{",
"String",
"label",
"=",
"atom",
".",
"getLabel",
"(",
")",
";",
"if",
"(",
"label",
"!=",
"null",
"&&",
"!",
"label",
".",
"isEmpty",
"(",
")",
... | Safely access the label of a pseudo atom. If the label is null or empty, the default label is
returned.
@param atom the pseudo
@return pseudo label | [
"Safely",
"access",
"the",
"label",
"of",
"a",
"pseudo",
"atom",
".",
"If",
"the",
"label",
"is",
"null",
"or",
"empty",
"the",
"default",
"label",
"is",
"returned",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L614-L618 |
114,053 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/InitialCycles.java | InitialCycles.add | private void add(Cycle cycle) {
if (cycle.length() <= limit) cycles.put(cycle.length(), cycle);
} | java | private void add(Cycle cycle) {
if (cycle.length() <= limit) cycles.put(cycle.length(), cycle);
} | [
"private",
"void",
"add",
"(",
"Cycle",
"cycle",
")",
"{",
"if",
"(",
"cycle",
".",
"length",
"(",
")",
"<=",
"limit",
")",
"cycles",
".",
"put",
"(",
"cycle",
".",
"length",
"(",
")",
",",
"cycle",
")",
";",
"}"
] | Add a newly discovered initial cycle.
@param cycle the cycle to add | [
"Add",
"a",
"newly",
"discovered",
"initial",
"cycle",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/InitialCycles.java#L362-L364 |
114,054 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java | NonplanarBonds.assign | public static IAtomContainer assign(final IAtomContainer container) {
GraphUtil.EdgeToBondMap edgeToBond = GraphUtil.EdgeToBondMap.withSpaceFor(container);
new NonplanarBonds(container, GraphUtil.toAdjList(container, edgeToBond), edgeToBond);
return container;
} | java | public static IAtomContainer assign(final IAtomContainer container) {
GraphUtil.EdgeToBondMap edgeToBond = GraphUtil.EdgeToBondMap.withSpaceFor(container);
new NonplanarBonds(container, GraphUtil.toAdjList(container, edgeToBond), edgeToBond);
return container;
} | [
"public",
"static",
"IAtomContainer",
"assign",
"(",
"final",
"IAtomContainer",
"container",
")",
"{",
"GraphUtil",
".",
"EdgeToBondMap",
"edgeToBond",
"=",
"GraphUtil",
".",
"EdgeToBondMap",
".",
"withSpaceFor",
"(",
"container",
")",
";",
"new",
"NonplanarBonds",
... | Assign non-planar, up and down labels to indicate tetrahedral configuration. Currently all
existing directional labels are removed before assigning new labels.
@param container the structure to assign labels to
@return a container with assigned labels (currently the same as the input)
@throws IllegalArgumentException ... | [
"Assign",
"non",
"-",
"planar",
"up",
"and",
"down",
"labels",
"to",
"indicate",
"tetrahedral",
"configuration",
".",
"Currently",
"all",
"existing",
"directional",
"labels",
"are",
"removed",
"before",
"assigning",
"new",
"labels",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java#L113-L117 |
114,055 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java | NonplanarBonds.snapBondToPosition | private void snapBondToPosition(IAtom beg, IBond bond, Point2d tP) {
IAtom end = bond.getOther(beg);
Point2d bP = beg.getPoint2d();
Point2d eP = end.getPoint2d();
Vector2d curr = new Vector2d(eP.x-bP.x, eP.y-bP.y);
Vector2d dest = new Vector2d(tP.x-bP.x, tP.y-bP.y);
doubl... | java | private void snapBondToPosition(IAtom beg, IBond bond, Point2d tP) {
IAtom end = bond.getOther(beg);
Point2d bP = beg.getPoint2d();
Point2d eP = end.getPoint2d();
Vector2d curr = new Vector2d(eP.x-bP.x, eP.y-bP.y);
Vector2d dest = new Vector2d(tP.x-bP.x, tP.y-bP.y);
doubl... | [
"private",
"void",
"snapBondToPosition",
"(",
"IAtom",
"beg",
",",
"IBond",
"bond",
",",
"Point2d",
"tP",
")",
"{",
"IAtom",
"end",
"=",
"bond",
".",
"getOther",
"(",
"beg",
")",
";",
"Point2d",
"bP",
"=",
"beg",
".",
"getPoint2d",
"(",
")",
";",
"Po... | tP=target point | [
"tP",
"=",
"target",
"point"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java#L225-L249 |
114,056 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java | NonplanarBonds.findBond | private IBond findBond(IAtom beg1, IAtom beg2, IAtom end) {
IBond bond = container.getBond(beg1, end);
if (bond != null)
return bond;
return container.getBond(beg2, end);
} | java | private IBond findBond(IAtom beg1, IAtom beg2, IAtom end) {
IBond bond = container.getBond(beg1, end);
if (bond != null)
return bond;
return container.getBond(beg2, end);
} | [
"private",
"IBond",
"findBond",
"(",
"IAtom",
"beg1",
",",
"IAtom",
"beg2",
",",
"IAtom",
"end",
")",
"{",
"IBond",
"bond",
"=",
"container",
".",
"getBond",
"(",
"beg1",
",",
"end",
")",
";",
"if",
"(",
"bond",
"!=",
"null",
")",
"return",
"bond",
... | Find a bond between two possible atoms. For example beg1 - end or
beg2 - end.
@param beg1 begin 1
@param beg2 begin 2
@param end end
@return the bond (or null if none) | [
"Find",
"a",
"bond",
"between",
"two",
"possible",
"atoms",
".",
"For",
"example",
"beg1",
"-",
"end",
"or",
"beg2",
"-",
"end",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java#L401-L406 |
114,057 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java | NonplanarBonds.setWedge | private void setWedge(IBond bond, IAtom end, IBond.Stereo style) {
if (!bond.getEnd().equals(end))
bond.setAtoms(new IAtom[]{bond.getEnd(), bond.getBegin()});
bond.setStereo(style);
} | java | private void setWedge(IBond bond, IAtom end, IBond.Stereo style) {
if (!bond.getEnd().equals(end))
bond.setAtoms(new IAtom[]{bond.getEnd(), bond.getBegin()});
bond.setStereo(style);
} | [
"private",
"void",
"setWedge",
"(",
"IBond",
"bond",
",",
"IAtom",
"end",
",",
"IBond",
".",
"Stereo",
"style",
")",
"{",
"if",
"(",
"!",
"bond",
".",
"getEnd",
"(",
")",
".",
"equals",
"(",
"end",
")",
")",
"bond",
".",
"setAtoms",
"(",
"new",
"... | Sets a wedge bond, because wedges are relative we may need to flip
the storage order on the bond.
@param bond the bond
@param end the expected end atom (fat end of wedge)
@param style the wedge style | [
"Sets",
"a",
"wedge",
"bond",
"because",
"wedges",
"are",
"relative",
"we",
"may",
"need",
"to",
"flip",
"the",
"storage",
"order",
"on",
"the",
"bond",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java#L416-L420 |
114,058 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java | NonplanarBonds.nAdjacentCentres | private int nAdjacentCentres(int i) {
int n = 0;
for (IAtom atom : tetrahedralElements[i].getLigands())
if (tetrahedralElements[atomToIndex.get(atom)] != null) n++;
return n;
} | java | private int nAdjacentCentres(int i) {
int n = 0;
for (IAtom atom : tetrahedralElements[i].getLigands())
if (tetrahedralElements[atomToIndex.get(atom)] != null) n++;
return n;
} | [
"private",
"int",
"nAdjacentCentres",
"(",
"int",
"i",
")",
"{",
"int",
"n",
"=",
"0",
";",
"for",
"(",
"IAtom",
"atom",
":",
"tetrahedralElements",
"[",
"i",
"]",
".",
"getLigands",
"(",
")",
")",
"if",
"(",
"tetrahedralElements",
"[",
"atomToIndex",
... | Obtain the number of centres adjacent to the atom at the index, i.
@param i atom index
@return number of adjacent centres | [
"Obtain",
"the",
"number",
"of",
"centres",
"adjacent",
"to",
"the",
"atom",
"at",
"the",
"index",
"i",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java#L738-L743 |
114,059 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java | NonplanarBonds.isSp3Carbon | private boolean isSp3Carbon(IAtom atom, int deg) {
Integer elem = atom.getAtomicNumber();
Integer hcnt = atom.getImplicitHydrogenCount();
if (elem == null || hcnt == null) return false;
if (elem == 6 && hcnt <= 1 && deg + hcnt == 4) {
// more expensive check, look one out and... | java | private boolean isSp3Carbon(IAtom atom, int deg) {
Integer elem = atom.getAtomicNumber();
Integer hcnt = atom.getImplicitHydrogenCount();
if (elem == null || hcnt == null) return false;
if (elem == 6 && hcnt <= 1 && deg + hcnt == 4) {
// more expensive check, look one out and... | [
"private",
"boolean",
"isSp3Carbon",
"(",
"IAtom",
"atom",
",",
"int",
"deg",
")",
"{",
"Integer",
"elem",
"=",
"atom",
".",
"getAtomicNumber",
"(",
")",
";",
"Integer",
"hcnt",
"=",
"atom",
".",
"getImplicitHydrogenCount",
"(",
")",
";",
"if",
"(",
"ele... | indicates where an atom is a Sp3 carbon and is possibly a stereo-centre | [
"indicates",
"where",
"an",
"atom",
"is",
"a",
"Sp3",
"carbon",
"and",
"is",
"possibly",
"a",
"stereo",
"-",
"centre"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java#L770-L799 |
114,060 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java | NonplanarBonds.isCisTransEndPoint | private boolean isCisTransEndPoint(int idx){
IAtom atom = container.getAtom(idx);
// error: uninit atom
if (atom.getAtomicNumber() == null ||
atom.getFormalCharge() == null ||
atom.getImplicitHydrogenCount() == null)
return false;
final int chg = a... | java | private boolean isCisTransEndPoint(int idx){
IAtom atom = container.getAtom(idx);
// error: uninit atom
if (atom.getAtomicNumber() == null ||
atom.getFormalCharge() == null ||
atom.getImplicitHydrogenCount() == null)
return false;
final int chg = a... | [
"private",
"boolean",
"isCisTransEndPoint",
"(",
"int",
"idx",
")",
"{",
"IAtom",
"atom",
"=",
"container",
".",
"getAtom",
"(",
"idx",
")",
";",
"// error: uninit atom",
"if",
"(",
"atom",
".",
"getAtomicNumber",
"(",
")",
"==",
"null",
"||",
"atom",
".",... | Checks if the atom can be involved in a double-bond.
@param idx atom idx
@return the atom at index (idx) is valid for a double bond
@see <a href="http://www.inchi-trust.org/download/104/InChI_TechMan.pdf">Double bond stereochemistry, InChI Technical Manual</a> | [
"Checks",
"if",
"the",
"atom",
"can",
"be",
"involved",
"in",
"a",
"double",
"-",
"bond",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java#L1000-L1023 |
114,061 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java | NonplanarBonds.getBondTypes | private int getBondTypes(int idx) {
int btypes = container.getAtom(idx).getImplicitHydrogenCount();
for (int end : graph[idx]) {
IBond bond = edgeToBond.get(idx, end);
if (bond.getOrder() == SINGLE)
btypes += 0x00_0001;
else if (bond.getOrder() == DOUB... | java | private int getBondTypes(int idx) {
int btypes = container.getAtom(idx).getImplicitHydrogenCount();
for (int end : graph[idx]) {
IBond bond = edgeToBond.get(idx, end);
if (bond.getOrder() == SINGLE)
btypes += 0x00_0001;
else if (bond.getOrder() == DOUB... | [
"private",
"int",
"getBondTypes",
"(",
"int",
"idx",
")",
"{",
"int",
"btypes",
"=",
"container",
".",
"getAtom",
"(",
"idx",
")",
".",
"getImplicitHydrogenCount",
"(",
")",
";",
"for",
"(",
"int",
"end",
":",
"graph",
"[",
"idx",
"]",
")",
"{",
"IBo... | Generate a bond type code for a given atom. The bond code
can be quickly tested to count the number of single, double,
or 'other' bonds.
@param idx the atom idx
@return bond code | [
"Generate",
"a",
"bond",
"type",
"code",
"for",
"a",
"given",
"atom",
".",
"The",
"bond",
"code",
"can",
"be",
"quickly",
"tested",
"to",
"count",
"the",
"number",
"of",
"single",
"double",
"or",
"other",
"bonds",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java#L1033-L1045 |
114,062 | cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java | NonplanarBonds.findUnspecifiedDoubleBonds | private List<IBond> findUnspecifiedDoubleBonds(int[][] adjList) {
List<IBond> unspecifiedDoubleBonds = new ArrayList<>();
for (IBond bond : container.bonds()) {
// non-double bond, ignore it
if (bond.getOrder() != DOUBLE)
continue;
final IAtom aBeg = ... | java | private List<IBond> findUnspecifiedDoubleBonds(int[][] adjList) {
List<IBond> unspecifiedDoubleBonds = new ArrayList<>();
for (IBond bond : container.bonds()) {
// non-double bond, ignore it
if (bond.getOrder() != DOUBLE)
continue;
final IAtom aBeg = ... | [
"private",
"List",
"<",
"IBond",
">",
"findUnspecifiedDoubleBonds",
"(",
"int",
"[",
"]",
"[",
"]",
"adjList",
")",
"{",
"List",
"<",
"IBond",
">",
"unspecifiedDoubleBonds",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"IBond",
"bond",
":",
... | Locates double bonds to mark as unspecified stereochemistry.
@return set of double bonds | [
"Locates",
"double",
"bonds",
"to",
"mark",
"as",
"unspecified",
"stereochemistry",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java#L1052-L1090 |
114,063 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java | BondTools.isValidDoubleBondConfiguration | public static boolean isValidDoubleBondConfiguration(IAtomContainer container, IBond bond) {
//org.openscience.cdk.interfaces.IAtom[] atoms = bond.getAtoms();
List<IAtom> connectedAtoms = container.getConnectedAtomsList(bond.getBegin());
IAtom from = null;
for (IAtom connectedAtom : conn... | java | public static boolean isValidDoubleBondConfiguration(IAtomContainer container, IBond bond) {
//org.openscience.cdk.interfaces.IAtom[] atoms = bond.getAtoms();
List<IAtom> connectedAtoms = container.getConnectedAtomsList(bond.getBegin());
IAtom from = null;
for (IAtom connectedAtom : conn... | [
"public",
"static",
"boolean",
"isValidDoubleBondConfiguration",
"(",
"IAtomContainer",
"container",
",",
"IBond",
"bond",
")",
"{",
"//org.openscience.cdk.interfaces.IAtom[] atoms = bond.getAtoms();",
"List",
"<",
"IAtom",
">",
"connectedAtoms",
"=",
"container",
".",
"get... | Tells if a certain bond is center of a valid double bond configuration.
@param container The atomcontainer.
@param bond The bond.
@return true=is a potential configuration, false=is not. | [
"Tells",
"if",
"a",
"certain",
"bond",
"is",
"center",
"of",
"a",
"valid",
"double",
"bond",
"configuration",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L60-L80 |
114,064 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java | BondTools.isLeft | public static boolean isLeft(IAtom whereIs, IAtom viewFrom, IAtom viewTo) {
double angle = giveAngleBothMethods(viewFrom, viewTo, whereIs, false);
if (angle < 0) {
return (false);
} else {
return (true);
}
} | java | public static boolean isLeft(IAtom whereIs, IAtom viewFrom, IAtom viewTo) {
double angle = giveAngleBothMethods(viewFrom, viewTo, whereIs, false);
if (angle < 0) {
return (false);
} else {
return (true);
}
} | [
"public",
"static",
"boolean",
"isLeft",
"(",
"IAtom",
"whereIs",
",",
"IAtom",
"viewFrom",
",",
"IAtom",
"viewTo",
")",
"{",
"double",
"angle",
"=",
"giveAngleBothMethods",
"(",
"viewFrom",
",",
"viewTo",
",",
"whereIs",
",",
"false",
")",
";",
"if",
"(",... | Says if an atom is on the left side of a another atom seen from a certain
atom or not.
@param whereIs The atom the position of which is returned
@param viewFrom The atom from which to look
@param viewTo The atom to which to look
@return true=is left, false = is not | [
"Says",
"if",
"an",
"atom",
"is",
"on",
"the",
"left",
"side",
"of",
"a",
"another",
"atom",
"seen",
"from",
"a",
"certain",
"atom",
"or",
"not",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L113-L120 |
114,065 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java | BondTools.closeEnoughToBond | public static boolean closeEnoughToBond(IAtom atom1, IAtom atom2, double distanceFudgeFactor) {
if (!atom1.equals(atom2)) {
double distanceBetweenAtoms = atom1.getPoint3d().distance(atom2.getPoint3d());
double bondingDistance = atom1.getCovalentRadius() + atom2.getCovalentRadius();
... | java | public static boolean closeEnoughToBond(IAtom atom1, IAtom atom2, double distanceFudgeFactor) {
if (!atom1.equals(atom2)) {
double distanceBetweenAtoms = atom1.getPoint3d().distance(atom2.getPoint3d());
double bondingDistance = atom1.getCovalentRadius() + atom2.getCovalentRadius();
... | [
"public",
"static",
"boolean",
"closeEnoughToBond",
"(",
"IAtom",
"atom1",
",",
"IAtom",
"atom2",
",",
"double",
"distanceFudgeFactor",
")",
"{",
"if",
"(",
"!",
"atom1",
".",
"equals",
"(",
"atom2",
")",
")",
"{",
"double",
"distanceBetweenAtoms",
"=",
"ato... | Returns true if the two atoms are within the distance fudge
factor of each other.
@param atom1 Description of Parameter
@param atom2 Description of Parameter
@param distanceFudgeFactor Description of Parameter
@return Description of the Returned Value
@cdk.keyword... | [
"Returns",
"true",
"if",
"the",
"two",
"atoms",
"are",
"within",
"the",
"distance",
"fudge",
"factor",
"of",
"each",
"other",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L133-L143 |
114,066 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java | BondTools.giveAngleBothMethods | public static double giveAngleBothMethods(IAtom from, IAtom to1, IAtom to2, boolean bool) {
return giveAngleBothMethods(from.getPoint2d(), to1.getPoint2d(), to2.getPoint2d(), bool);
} | java | public static double giveAngleBothMethods(IAtom from, IAtom to1, IAtom to2, boolean bool) {
return giveAngleBothMethods(from.getPoint2d(), to1.getPoint2d(), to2.getPoint2d(), bool);
} | [
"public",
"static",
"double",
"giveAngleBothMethods",
"(",
"IAtom",
"from",
",",
"IAtom",
"to1",
",",
"IAtom",
"to2",
",",
"boolean",
"bool",
")",
"{",
"return",
"giveAngleBothMethods",
"(",
"from",
".",
"getPoint2d",
"(",
")",
",",
"to1",
".",
"getPoint2d",... | Gives the angle between two lines starting at atom from and going to to1
and to2. If bool=false the angle starts from the middle line and goes from
0 to PI or 0 to -PI if the to2 is on the left or right side of the line. If
bool=true the angle goes from 0 to 2PI.
@param from the atom to view from.
@param to1 firs... | [
"Gives",
"the",
"angle",
"between",
"two",
"lines",
"starting",
"at",
"atom",
"from",
"and",
"going",
"to",
"to1",
"and",
"to2",
".",
"If",
"bool",
"=",
"false",
"the",
"angle",
"starts",
"from",
"the",
"middle",
"line",
"and",
"goes",
"from",
"0",
"to... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L157-L159 |
114,067 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java | BondTools.isEndOfDoubleBond | private static boolean isEndOfDoubleBond(IAtomContainer container, IAtom atom, IAtom parent,
boolean[] doubleBondConfiguration) {
if (container.indexOf(container.getBond(atom, parent)) == -1
|| doubleBondConfiguration.length <= container.indexOf(container.getBond(atom, parent))
... | java | private static boolean isEndOfDoubleBond(IAtomContainer container, IAtom atom, IAtom parent,
boolean[] doubleBondConfiguration) {
if (container.indexOf(container.getBond(atom, parent)) == -1
|| doubleBondConfiguration.length <= container.indexOf(container.getBond(atom, parent))
... | [
"private",
"static",
"boolean",
"isEndOfDoubleBond",
"(",
"IAtomContainer",
"container",
",",
"IAtom",
"atom",
",",
"IAtom",
"parent",
",",
"boolean",
"[",
"]",
"doubleBondConfiguration",
")",
"{",
"if",
"(",
"container",
".",
"indexOf",
"(",
"container",
".",
... | Says if an atom is the end of a double bond configuration
@param atom The atom which is the end of configuration
@param container The atomContainer the atom is in
@param parent The atom we came from
@param doubleBondConfiguration The array indicating where doub... | [
"Says",
"if",
"an",
"atom",
"is",
"the",
"end",
"of",
"a",
"double",
"bond",
"configuration"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L195-L244 |
114,068 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java | BondTools.isStartOfDoubleBond | private static boolean isStartOfDoubleBond(IAtomContainer container, IAtom a, IAtom parent,
boolean[] doubleBondConfiguration) {
int hcount;
if (a.getImplicitHydrogenCount() == CDKConstants.UNSET)
hcount = 0;
else
hcount = a.getImplicitHydrogenCount();
... | java | private static boolean isStartOfDoubleBond(IAtomContainer container, IAtom a, IAtom parent,
boolean[] doubleBondConfiguration) {
int hcount;
if (a.getImplicitHydrogenCount() == CDKConstants.UNSET)
hcount = 0;
else
hcount = a.getImplicitHydrogenCount();
... | [
"private",
"static",
"boolean",
"isStartOfDoubleBond",
"(",
"IAtomContainer",
"container",
",",
"IAtom",
"a",
",",
"IAtom",
"parent",
",",
"boolean",
"[",
"]",
"doubleBondConfiguration",
")",
"{",
"int",
"hcount",
";",
"if",
"(",
"a",
".",
"getImplicitHydrogenCo... | Says if an atom is the start of a double bond configuration
@param a The atom which is the start of configuration
@param container The atomContainer the atom is in
@param parent The atom we came from
@param doubleBondConfiguration The array indicating where ... | [
"Says",
"if",
"an",
"atom",
"is",
"the",
"start",
"of",
"a",
"double",
"bond",
"configuration"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L257-L299 |
114,069 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java | BondTools.isTetrahedral | public static int isTetrahedral(IAtomContainer container, IAtom atom, boolean strict) {
List<IAtom> atoms = container.getConnectedAtomsList(atom);
if (atoms.size() != 4) {
return (0);
}
List<IBond> bonds = container.getConnectedBondsList(atom);
int up = 0;
int... | java | public static int isTetrahedral(IAtomContainer container, IAtom atom, boolean strict) {
List<IAtom> atoms = container.getConnectedAtomsList(atom);
if (atoms.size() != 4) {
return (0);
}
List<IBond> bonds = container.getConnectedBondsList(atom);
int up = 0;
int... | [
"public",
"static",
"int",
"isTetrahedral",
"(",
"IAtomContainer",
"container",
",",
"IAtom",
"atom",
",",
"boolean",
"strict",
")",
"{",
"List",
"<",
"IAtom",
">",
"atoms",
"=",
"container",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"if",
"(",
... | Says if an atom as a center of a tetrahedral chirality.
This method uses wedge bonds. 3D coordinates are not taken into account. If there
are no wedge bonds around a potential stereo center, it will not be found.
@param atom The atom which is the center
@param container The atomContainer the atom is in
@re... | [
"Says",
"if",
"an",
"atom",
"as",
"a",
"center",
"of",
"a",
"tetrahedral",
"chirality",
".",
"This",
"method",
"uses",
"wedge",
"bonds",
".",
"3D",
"coordinates",
"are",
"not",
"taken",
"into",
"account",
".",
"If",
"there",
"are",
"no",
"wedge",
"bonds"... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L311-L349 |
114,070 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java | BondTools.stereosAreOpposite | public static boolean stereosAreOpposite(IAtomContainer container, IAtom atom) {
List<IAtom> atoms = container.getConnectedAtomsList(atom);
TreeMap<Double, Integer> hm = new TreeMap<Double, Integer>();
for (int i = 1; i < atoms.size(); i++) {
hm.put(giveAngle(atom, atoms.get(0), atom... | java | public static boolean stereosAreOpposite(IAtomContainer container, IAtom atom) {
List<IAtom> atoms = container.getConnectedAtomsList(atom);
TreeMap<Double, Integer> hm = new TreeMap<Double, Integer>();
for (int i = 1; i < atoms.size(); i++) {
hm.put(giveAngle(atom, atoms.get(0), atom... | [
"public",
"static",
"boolean",
"stereosAreOpposite",
"(",
"IAtomContainer",
"container",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"atoms",
"=",
"container",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"TreeMap",
"<",
"Double",
",",
... | Says if of four atoms connected two one atom the up and down bonds are
opposite or not, i. e.if it's tetrehedral or square planar. The method
does not check if there are four atoms and if two or up and two are down
@param atom The atom which is the center
@param container The atomContainer the atom is in
@... | [
"Says",
"if",
"of",
"four",
"atoms",
"connected",
"two",
"one",
"atom",
"the",
"up",
"and",
"down",
"bonds",
"are",
"opposite",
"or",
"not",
"i",
".",
"e",
".",
"if",
"it",
"s",
"tetrehedral",
"or",
"square",
"planar",
".",
"The",
"method",
"does",
"... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L511-L521 |
114,071 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java | BondTools.giveAngle | public static double giveAngle(IAtom from, IAtom to1, IAtom to2) {
return (giveAngleBothMethods(from, to1, to2, true));
} | java | public static double giveAngle(IAtom from, IAtom to1, IAtom to2) {
return (giveAngleBothMethods(from, to1, to2, true));
} | [
"public",
"static",
"double",
"giveAngle",
"(",
"IAtom",
"from",
",",
"IAtom",
"to1",
",",
"IAtom",
"to2",
")",
"{",
"return",
"(",
"giveAngleBothMethods",
"(",
"from",
",",
"to1",
",",
"to2",
",",
"true",
")",
")",
";",
"}"
] | Calls giveAngleBothMethods with bool = true.
@param from the atom to view from
@param to1 first direction to look in
@param to2 second direction to look in
@return The angle in rad from 0 to 2*PI | [
"Calls",
"giveAngleBothMethods",
"with",
"bool",
"=",
"true",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L531-L533 |
114,072 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java | BondTools.giveAngleFromMiddle | public static double giveAngleFromMiddle(IAtom from, IAtom to1, IAtom to2) {
return (giveAngleBothMethods(from, to1, to2, false));
} | java | public static double giveAngleFromMiddle(IAtom from, IAtom to1, IAtom to2) {
return (giveAngleBothMethods(from, to1, to2, false));
} | [
"public",
"static",
"double",
"giveAngleFromMiddle",
"(",
"IAtom",
"from",
",",
"IAtom",
"to1",
",",
"IAtom",
"to2",
")",
"{",
"return",
"(",
"giveAngleBothMethods",
"(",
"from",
",",
"to1",
",",
"to2",
",",
"false",
")",
")",
";",
"}"
] | Calls giveAngleBothMethods with bool = false.
@param from the atom to view from
@param to1 first direction to look in
@param to2 second direction to look in
@return The angle in rad from -PI to PI | [
"Calls",
"giveAngleBothMethods",
"with",
"bool",
"=",
"false",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L543-L545 |
114,073 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/smsd/algorithm/vflib/builder/VFQueryBuilder.java | VFQueryBuilder.getNode | public INode getNode(IAtom atom) {
for (Map.Entry<INode, IAtom> v : nodeBondMap.entrySet()) {
if (v.getValue().equals(atom)) {
return v.getKey();
}
}
return null;
} | java | public INode getNode(IAtom atom) {
for (Map.Entry<INode, IAtom> v : nodeBondMap.entrySet()) {
if (v.getValue().equals(atom)) {
return v.getKey();
}
}
return null;
} | [
"public",
"INode",
"getNode",
"(",
"IAtom",
"atom",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"INode",
",",
"IAtom",
">",
"v",
":",
"nodeBondMap",
".",
"entrySet",
"(",
")",
")",
"{",
"if",
"(",
"v",
".",
"getValue",
"(",
")",
".",
"equals"... | Return a node for a given atom else return null
@param atom
@return Node in the graph for a given atom | [
"Return",
"a",
"node",
"for",
"a",
"given",
"atom",
"else",
"return",
"null"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/vflib/builder/VFQueryBuilder.java#L111-L120 |
114,074 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/smsd/algorithm/vflib/builder/VFQueryBuilder.java | VFQueryBuilder.addNode | public INode addNode(VFAtomMatcher matcher, IAtom atom) {
NodeBuilder node = new NodeBuilder(matcher);
nodesList.add(node);
nodeBondMap.put(node, atom);
return node;
} | java | public INode addNode(VFAtomMatcher matcher, IAtom atom) {
NodeBuilder node = new NodeBuilder(matcher);
nodesList.add(node);
nodeBondMap.put(node, atom);
return node;
} | [
"public",
"INode",
"addNode",
"(",
"VFAtomMatcher",
"matcher",
",",
"IAtom",
"atom",
")",
"{",
"NodeBuilder",
"node",
"=",
"new",
"NodeBuilder",
"(",
"matcher",
")",
";",
"nodesList",
".",
"add",
"(",
"node",
")",
";",
"nodeBondMap",
".",
"put",
"(",
"no... | Add and return a node for a query atom
@param matcher
@param atom
@return added Node | [
"Add",
"and",
"return",
"a",
"node",
"for",
"a",
"query",
"atom"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/vflib/builder/VFQueryBuilder.java#L152-L157 |
114,075 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/smsd/algorithm/vflib/builder/VFQueryBuilder.java | VFQueryBuilder.connect | public IEdge connect(INode source, INode target, VFBondMatcher matcher) {
NodeBuilder sourceImpl = (NodeBuilder) source;
NodeBuilder targetImpl = (NodeBuilder) target;
EdgeBuilder edge = new EdgeBuilder(sourceImpl, targetImpl, matcher);
sourceImpl.addNeighbor(targetImpl);
target... | java | public IEdge connect(INode source, INode target, VFBondMatcher matcher) {
NodeBuilder sourceImpl = (NodeBuilder) source;
NodeBuilder targetImpl = (NodeBuilder) target;
EdgeBuilder edge = new EdgeBuilder(sourceImpl, targetImpl, matcher);
sourceImpl.addNeighbor(targetImpl);
target... | [
"public",
"IEdge",
"connect",
"(",
"INode",
"source",
",",
"INode",
"target",
",",
"VFBondMatcher",
"matcher",
")",
"{",
"NodeBuilder",
"sourceImpl",
"=",
"(",
"NodeBuilder",
")",
"source",
";",
"NodeBuilder",
"targetImpl",
"=",
"(",
"NodeBuilder",
")",
"targe... | Construct and return an edge for a given query and target node
@param source
@param target
@param matcher
@return connected edges | [
"Construct",
"and",
"return",
"an",
"edge",
"for",
"a",
"given",
"query",
"and",
"target",
"node"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/vflib/builder/VFQueryBuilder.java#L184-L197 |
114,076 | cdk/cdk | storage/io/src/main/java/org/openscience/cdk/io/cml/CMLReactionModule.java | CMLReactionModule.getMoleculeFromID | private IAtomContainer getMoleculeFromID(IAtomContainerSet molSet, String id) {
for (IAtomContainer mol : molSet.atomContainers()) {
if (mol.getID().equals(id)) return mol;
}
return null;
} | java | private IAtomContainer getMoleculeFromID(IAtomContainerSet molSet, String id) {
for (IAtomContainer mol : molSet.atomContainers()) {
if (mol.getID().equals(id)) return mol;
}
return null;
} | [
"private",
"IAtomContainer",
"getMoleculeFromID",
"(",
"IAtomContainerSet",
"molSet",
",",
"String",
"id",
")",
"{",
"for",
"(",
"IAtomContainer",
"mol",
":",
"molSet",
".",
"atomContainers",
"(",
")",
")",
"{",
"if",
"(",
"mol",
".",
"getID",
"(",
")",
".... | Get the IAtomContainer contained in a IAtomContainerSet object with a ID.
@param molSet The IAtomContainerSet
@param id The ID the look
@return The IAtomContainer with the ID | [
"Get",
"the",
"IAtomContainer",
"contained",
"in",
"a",
"IAtomContainerSet",
"object",
"with",
"a",
"ID",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/cml/CMLReactionModule.java#L188-L193 |
114,077 | cdk/cdk | base/standard/src/main/java/org/openscience/cdk/graph/Permutor.java | Permutor.getRandomNextPermutation | public int[] getRandomNextPermutation() {
int d = maxRank - currentRank;
int r = this.random.nextInt(d);
this.currentRank += Math.max(1, r);
return this.getCurrentPermutation();
} | java | public int[] getRandomNextPermutation() {
int d = maxRank - currentRank;
int r = this.random.nextInt(d);
this.currentRank += Math.max(1, r);
return this.getCurrentPermutation();
} | [
"public",
"int",
"[",
"]",
"getRandomNextPermutation",
"(",
")",
"{",
"int",
"d",
"=",
"maxRank",
"-",
"currentRank",
";",
"int",
"r",
"=",
"this",
".",
"random",
".",
"nextInt",
"(",
"d",
")",
";",
"this",
".",
"currentRank",
"+=",
"Math",
".",
"max... | Randomly skip ahead in the list of permutations.
@return a permutation in the range (current, N!) | [
"Randomly",
"skip",
"ahead",
"in",
"the",
"list",
"of",
"permutations",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/graph/Permutor.java#L124-L129 |
114,078 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ConformerContainer.java | ConformerContainer.toArray | @Override
public Object[] toArray() {
IAtomContainer[] ret = new IAtomContainer[coordinates.size()];
int index = 0;
for (Point3d[] coords : coordinates) {
try {
IAtomContainer conf = (IAtomContainer) atomContainer.clone();
for (int i = 0; i < coord... | java | @Override
public Object[] toArray() {
IAtomContainer[] ret = new IAtomContainer[coordinates.size()];
int index = 0;
for (Point3d[] coords : coordinates) {
try {
IAtomContainer conf = (IAtomContainer) atomContainer.clone();
for (int i = 0; i < coord... | [
"@",
"Override",
"public",
"Object",
"[",
"]",
"toArray",
"(",
")",
"{",
"IAtomContainer",
"[",
"]",
"ret",
"=",
"new",
"IAtomContainer",
"[",
"coordinates",
".",
"size",
"(",
")",
"]",
";",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"Point3d",
"[",
... | Returns the conformers in the form of an array of IAtomContainers.
Beware that if you have a large number of conformers you may run out
memory during construction of the array since IAtomContainer's are not
light weight objects!
@return The conformers as an array of individual IAtomContainers. | [
"Returns",
"the",
"conformers",
"in",
"the",
"form",
"of",
"an",
"array",
"of",
"IAtomContainers",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ConformerContainer.java#L196-L213 |
114,079 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ConformerContainer.java | ConformerContainer.add | @Override
public boolean add(IAtomContainer atomContainer) {
if (this.atomContainer == null) {
this.atomContainer = atomContainer;
title = (String) atomContainer.getTitle();
}
if (title == null) {
throw new IllegalArgumentException("At least one of the inp... | java | @Override
public boolean add(IAtomContainer atomContainer) {
if (this.atomContainer == null) {
this.atomContainer = atomContainer;
title = (String) atomContainer.getTitle();
}
if (title == null) {
throw new IllegalArgumentException("At least one of the inp... | [
"@",
"Override",
"public",
"boolean",
"add",
"(",
"IAtomContainer",
"atomContainer",
")",
"{",
"if",
"(",
"this",
".",
"atomContainer",
"==",
"null",
")",
"{",
"this",
".",
"atomContainer",
"=",
"atomContainer",
";",
"title",
"=",
"(",
"String",
")",
"atom... | Add a conformer to the end of the list.
This method allows you to add a IAtomContainer object as another conformer.
Before adding it ensures that the title of specific object matches the
stored title for these conformers. It will also check that the number of
atoms in the specified molecule match the number of atoms i... | [
"Add",
"a",
"conformer",
"to",
"the",
"end",
"of",
"the",
"list",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ConformerContainer.java#L234-L252 |
114,080 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ConformerContainer.java | ConformerContainer.remove | @Override
public boolean remove(Object o) {
IAtomContainer atomContainer = (IAtomContainer) o;
// we should never have a null conformer
if (atomContainer == null) return false;
int index = indexOf(atomContainer);
if (index >= 0) {
remove(index);
retu... | java | @Override
public boolean remove(Object o) {
IAtomContainer atomContainer = (IAtomContainer) o;
// we should never have a null conformer
if (atomContainer == null) return false;
int index = indexOf(atomContainer);
if (index >= 0) {
remove(index);
retu... | [
"@",
"Override",
"public",
"boolean",
"remove",
"(",
"Object",
"o",
")",
"{",
"IAtomContainer",
"atomContainer",
"=",
"(",
"IAtomContainer",
")",
"o",
";",
"// we should never have a null conformer",
"if",
"(",
"atomContainer",
"==",
"null",
")",
"return",
"false"... | Remove the specified conformer.
@param o The conformer to remove (should be castable to IAtomContainer)
@return true if the specified conformer was present and removed, false if not found | [
"Remove",
"the",
"specified",
"conformer",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ConformerContainer.java#L260-L273 |
114,081 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ConformerContainer.java | ConformerContainer.get | @Override
public IAtomContainer get(int i) {
Point3d[] tmp = coordinates.get(i);
for (int j = 0; j < atomContainer.getAtomCount(); j++) {
IAtom atom = atomContainer.getAtom(j);
atom.setPoint3d(tmp[j]);
}
return atomContainer;
} | java | @Override
public IAtomContainer get(int i) {
Point3d[] tmp = coordinates.get(i);
for (int j = 0; j < atomContainer.getAtomCount(); j++) {
IAtom atom = atomContainer.getAtom(j);
atom.setPoint3d(tmp[j]);
}
return atomContainer;
} | [
"@",
"Override",
"public",
"IAtomContainer",
"get",
"(",
"int",
"i",
")",
"{",
"Point3d",
"[",
"]",
"tmp",
"=",
"coordinates",
".",
"get",
"(",
"i",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"atomContainer",
".",
"getAtomCount",
"(... | Get the conformer at a specified position.
@param i The position of the requested conformer
@return The conformer | [
"Get",
"the",
"conformer",
"at",
"a",
"specified",
"position",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ConformerContainer.java#L314-L322 |
114,082 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ConformerContainer.java | ConformerContainer.remove | @Override
public IAtomContainer remove(int i) {
IAtomContainer oldAtomContainer = get(i);
coordinates.remove(i);
return oldAtomContainer;
} | java | @Override
public IAtomContainer remove(int i) {
IAtomContainer oldAtomContainer = get(i);
coordinates.remove(i);
return oldAtomContainer;
} | [
"@",
"Override",
"public",
"IAtomContainer",
"remove",
"(",
"int",
"i",
")",
"{",
"IAtomContainer",
"oldAtomContainer",
"=",
"get",
"(",
"i",
")",
";",
"coordinates",
".",
"remove",
"(",
"i",
")",
";",
"return",
"oldAtomContainer",
";",
"}"
] | Removes the conformer at the specified position.
@param i The position in the list to remove
@return The conformer that was at the specified position | [
"Removes",
"the",
"conformer",
"at",
"the",
"specified",
"position",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ConformerContainer.java#L359-L364 |
114,083 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ConformerContainer.java | ConformerContainer.indexOf | @Override
public int indexOf(Object o) {
IAtomContainer atomContainer = (IAtomContainer) o;
if (!atomContainer.getTitle().equals(title)) return -1;
if (atomContainer.getAtomCount() != this.atomContainer.getAtomCount()) return -1;
boolean coordsMatch;
int index = 0;
... | java | @Override
public int indexOf(Object o) {
IAtomContainer atomContainer = (IAtomContainer) o;
if (!atomContainer.getTitle().equals(title)) return -1;
if (atomContainer.getAtomCount() != this.atomContainer.getAtomCount()) return -1;
boolean coordsMatch;
int index = 0;
... | [
"@",
"Override",
"public",
"int",
"indexOf",
"(",
"Object",
"o",
")",
"{",
"IAtomContainer",
"atomContainer",
"=",
"(",
"IAtomContainer",
")",
"o",
";",
"if",
"(",
"!",
"atomContainer",
".",
"getTitle",
"(",
")",
".",
"equals",
"(",
"title",
")",
")",
... | Returns the lowest index at which the specific IAtomContainer appears in the list or -1 if is not found.
A given IAtomContainer will occur in the list if the title matches the stored title for
the conformers in this container and if the coordinates for each atom in the specified molecule
are equal to the coordinates o... | [
"Returns",
"the",
"lowest",
"index",
"at",
"which",
"the",
"specific",
"IAtomContainer",
"appears",
"in",
"the",
"list",
"or",
"-",
"1",
"if",
"is",
"not",
"found",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ConformerContainer.java#L376-L398 |
114,084 | cdk/cdk | base/data/src/main/java/org/openscience/cdk/ConformerContainer.java | ConformerContainer.lastIndexOf | @Override
public int lastIndexOf(Object o) {
IAtomContainer atomContainer = (IAtomContainer) o;
if (!atomContainer.getTitle().equals(title)) return -1;
if (atomContainer.getAtomCount() != coordinates.get(0).length) return -1;
boolean coordsMatch;
for (int j = coordinates.si... | java | @Override
public int lastIndexOf(Object o) {
IAtomContainer atomContainer = (IAtomContainer) o;
if (!atomContainer.getTitle().equals(title)) return -1;
if (atomContainer.getAtomCount() != coordinates.get(0).length) return -1;
boolean coordsMatch;
for (int j = coordinates.si... | [
"@",
"Override",
"public",
"int",
"lastIndexOf",
"(",
"Object",
"o",
")",
"{",
"IAtomContainer",
"atomContainer",
"=",
"(",
"IAtomContainer",
")",
"o",
";",
"if",
"(",
"!",
"atomContainer",
".",
"getTitle",
"(",
")",
".",
"equals",
"(",
"title",
")",
")"... | Returns the highest index at which the specific IAtomContainer appears in the list or -1 if is not found.
A given IAtomContainer will occur in the list if the title matches the stored title for
the conformers in this container and if the coordinates for each atom in the specified molecule
are equal to the coordinates ... | [
"Returns",
"the",
"highest",
"index",
"at",
"which",
"the",
"specific",
"IAtomContainer",
"appears",
"in",
"the",
"list",
"or",
"-",
"1",
"if",
"is",
"not",
"found",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/ConformerContainer.java#L410-L431 |
114,085 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/PathTools.java | PathTools.getInt2DColumnSum | public static int[] getInt2DColumnSum(int[][] apsp) {
int[] colSum = new int[apsp.length];
int sum;
for (int i = 0; i < apsp.length; i++) {
sum = 0;
for (int j = 0; j < apsp.length; j++) {
sum += apsp[i][j];
}
colSum[i] = sum;
... | java | public static int[] getInt2DColumnSum(int[][] apsp) {
int[] colSum = new int[apsp.length];
int sum;
for (int i = 0; i < apsp.length; i++) {
sum = 0;
for (int j = 0; j < apsp.length; j++) {
sum += apsp[i][j];
}
colSum[i] = sum;
... | [
"public",
"static",
"int",
"[",
"]",
"getInt2DColumnSum",
"(",
"int",
"[",
"]",
"[",
"]",
"apsp",
")",
"{",
"int",
"[",
"]",
"colSum",
"=",
"new",
"int",
"[",
"apsp",
".",
"length",
"]",
";",
"int",
"sum",
";",
"for",
"(",
"int",
"i",
"=",
"0",... | Sums up the columns in a 2D int matrix.
@param apsp The 2D int matrix
@return A 1D matrix containing the column sum of the 2D matrix | [
"Sums",
"up",
"the",
"columns",
"in",
"a",
"2D",
"int",
"matrix",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/PathTools.java#L56-L67 |
114,086 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/PathTools.java | PathTools.findClosestByBond | public static IAtom[] findClosestByBond(IAtomContainer atomContainer, IAtom atom, int max) {
IAtomContainer mol = atomContainer.getBuilder().newInstance(IAtomContainer.class);
List<IAtom> v = new ArrayList<IAtom>();
v.add(atom);
breadthFirstSearch(atomContainer, v, mol, max);
IAt... | java | public static IAtom[] findClosestByBond(IAtomContainer atomContainer, IAtom atom, int max) {
IAtomContainer mol = atomContainer.getBuilder().newInstance(IAtomContainer.class);
List<IAtom> v = new ArrayList<IAtom>();
v.add(atom);
breadthFirstSearch(atomContainer, v, mol, max);
IAt... | [
"public",
"static",
"IAtom",
"[",
"]",
"findClosestByBond",
"(",
"IAtomContainer",
"atomContainer",
",",
"IAtom",
"atom",
",",
"int",
"max",
")",
"{",
"IAtomContainer",
"mol",
"=",
"atomContainer",
".",
"getBuilder",
"(",
")",
".",
"newInstance",
"(",
"IAtomCo... | Returns the atoms which are closest to an atom in an AtomContainer by bonds.
If number of atoms in or below sphere x<max and number of atoms in or below sphere x+1>max then
atoms in or below sphere x+1 are returned.
@param atomContainer The AtomContainer to examine
@param atom the atom to start from
@pa... | [
"Returns",
"the",
"atoms",
"which",
"are",
"closest",
"to",
"an",
"atom",
"in",
"an",
"AtomContainer",
"by",
"bonds",
".",
"If",
"number",
"of",
"atoms",
"in",
"or",
"below",
"sphere",
"x<",
";",
"max",
"and",
"number",
"of",
"atoms",
"in",
"or",
"be... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/PathTools.java#L218-L232 |
114,087 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/PathTools.java | PathTools.breadthFirstTargetSearch | public static int breadthFirstTargetSearch(IAtomContainer atomContainer, List<IAtom> sphere, IAtom target,
int pathLength, int cutOff) {
if (pathLength == 0) resetFlags(atomContainer);
pathLength++;
if (pathLength > cutOff) {
return -1;
}
IAtom nextAtom;
... | java | public static int breadthFirstTargetSearch(IAtomContainer atomContainer, List<IAtom> sphere, IAtom target,
int pathLength, int cutOff) {
if (pathLength == 0) resetFlags(atomContainer);
pathLength++;
if (pathLength > cutOff) {
return -1;
}
IAtom nextAtom;
... | [
"public",
"static",
"int",
"breadthFirstTargetSearch",
"(",
"IAtomContainer",
"atomContainer",
",",
"List",
"<",
"IAtom",
">",
"sphere",
",",
"IAtom",
"target",
",",
"int",
"pathLength",
",",
"int",
"cutOff",
")",
"{",
"if",
"(",
"pathLength",
"==",
"0",
")"... | Performs a breadthFirstTargetSearch in an AtomContainer starting with a
particular sphere, which usually consists of one start atom. While
searching the graph, the method marks each visited atom. It then puts all
the atoms connected to the atoms in the given sphere into a new vector
which forms the sphere to search for... | [
"Performs",
"a",
"breadthFirstTargetSearch",
"in",
"an",
"AtomContainer",
"starting",
"with",
"a",
"particular",
"sphere",
"which",
"usually",
"consists",
"of",
"one",
"start",
"atom",
".",
"While",
"searching",
"the",
"graph",
"the",
"method",
"marks",
"each",
... | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/PathTools.java#L310-L340 |
114,088 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/PathTools.java | PathTools.getMolecularGraphRadius | public static int getMolecularGraphRadius(IAtomContainer atomContainer) {
int natom = atomContainer.getAtomCount();
int[][] admat = AdjacencyMatrix.getMatrix(atomContainer);
int[][] distanceMatrix = computeFloydAPSP(admat);
int[] eta = new int[natom];
for (int i = 0; i < natom;... | java | public static int getMolecularGraphRadius(IAtomContainer atomContainer) {
int natom = atomContainer.getAtomCount();
int[][] admat = AdjacencyMatrix.getMatrix(atomContainer);
int[][] distanceMatrix = computeFloydAPSP(admat);
int[] eta = new int[natom];
for (int i = 0; i < natom;... | [
"public",
"static",
"int",
"getMolecularGraphRadius",
"(",
"IAtomContainer",
"atomContainer",
")",
"{",
"int",
"natom",
"=",
"atomContainer",
".",
"getAtomCount",
"(",
")",
";",
"int",
"[",
"]",
"[",
"]",
"admat",
"=",
"AdjacencyMatrix",
".",
"getMatrix",
"(",... | Returns the radius of the molecular graph.
@param atomContainer The molecule to consider
@return The topological radius | [
"Returns",
"the",
"radius",
"of",
"the",
"molecular",
"graph",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/PathTools.java#L358-L377 |
114,089 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/PathTools.java | PathTools.getVertexCountAtDistance | public static int getVertexCountAtDistance(IAtomContainer atomContainer, int distance) {
int natom = atomContainer.getAtomCount();
int[][] admat = AdjacencyMatrix.getMatrix(atomContainer);
int[][] distanceMatrix = computeFloydAPSP(admat);
int matches = 0;
for (int i = 0; i < n... | java | public static int getVertexCountAtDistance(IAtomContainer atomContainer, int distance) {
int natom = atomContainer.getAtomCount();
int[][] admat = AdjacencyMatrix.getMatrix(atomContainer);
int[][] distanceMatrix = computeFloydAPSP(admat);
int matches = 0;
for (int i = 0; i < n... | [
"public",
"static",
"int",
"getVertexCountAtDistance",
"(",
"IAtomContainer",
"atomContainer",
",",
"int",
"distance",
")",
"{",
"int",
"natom",
"=",
"atomContainer",
".",
"getAtomCount",
"(",
")",
";",
"int",
"[",
"]",
"[",
"]",
"admat",
"=",
"AdjacencyMatrix... | Returns the number of vertices that are a distance 'd' apart.
In this method, d is the topological distance (ie edge count).
@param atomContainer The molecule to consider
@param distance The distance to consider
@return The number of vertices | [
"Returns",
"the",
"number",
"of",
"vertices",
"that",
"are",
"a",
"distance",
"d",
"apart",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/PathTools.java#L415-L429 |
114,090 | cdk/cdk | base/core/src/main/java/org/openscience/cdk/graph/PathTools.java | PathTools.getAllPaths | public static List<List<IAtom>> getAllPaths(IAtomContainer atomContainer, IAtom start, IAtom end) {
List<List<IAtom>> allPaths = new ArrayList<List<IAtom>>();
if (start.equals(end)) return allPaths;
findPathBetween(allPaths, atomContainer, start, end, new ArrayList<IAtom>());
return allP... | java | public static List<List<IAtom>> getAllPaths(IAtomContainer atomContainer, IAtom start, IAtom end) {
List<List<IAtom>> allPaths = new ArrayList<List<IAtom>>();
if (start.equals(end)) return allPaths;
findPathBetween(allPaths, atomContainer, start, end, new ArrayList<IAtom>());
return allP... | [
"public",
"static",
"List",
"<",
"List",
"<",
"IAtom",
">",
">",
"getAllPaths",
"(",
"IAtomContainer",
"atomContainer",
",",
"IAtom",
"start",
",",
"IAtom",
"end",
")",
"{",
"List",
"<",
"List",
"<",
"IAtom",
">>",
"allPaths",
"=",
"new",
"ArrayList",
"<... | Get a list of all the paths between two atoms.
If the two atoms are the same an empty list is returned. Note that this problem
is NP-hard and so can take a long time for large graphs.
@param atomContainer The molecule to consider
@param start The starting Atom of the path
@param end The ending Atom ... | [
"Get",
"a",
"list",
"of",
"all",
"the",
"paths",
"between",
"two",
"atoms",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/PathTools.java#L517-L522 |
114,091 | cdk/cdk | display/render/src/main/java/org/openscience/cdk/renderer/color/CDKAtomColors.java | CDKAtomColors.getAtomColor | @Override
public Color getAtomColor(IAtom atom, Color defaultColor) {
Color color = defaultColor;
if (atom.getAtomicNumber() == null) return defaultColor;
int atomnumber = atom.getAtomicNumber();
switch (atomnumber) {
case 1:
color = HYDROGEN;
... | java | @Override
public Color getAtomColor(IAtom atom, Color defaultColor) {
Color color = defaultColor;
if (atom.getAtomicNumber() == null) return defaultColor;
int atomnumber = atom.getAtomicNumber();
switch (atomnumber) {
case 1:
color = HYDROGEN;
... | [
"@",
"Override",
"public",
"Color",
"getAtomColor",
"(",
"IAtom",
"atom",
",",
"Color",
"defaultColor",
")",
"{",
"Color",
"color",
"=",
"defaultColor",
";",
"if",
"(",
"atom",
".",
"getAtomicNumber",
"(",
")",
"==",
"null",
")",
"return",
"defaultColor",
... | Returns the CDK scheme color for the given atom's element, or
defaults to the given color if no color is defined.
@param atom IAtom to get a color for
@param defaultColor Color returned if this scheme does not define
a color for the passed IAtom
@return the atom's color according to this coloring s... | [
"Returns",
"the",
"CDK",
"scheme",
"color",
"for",
"the",
"given",
"atom",
"s",
"element",
"or",
"defaults",
"to",
"the",
"given",
"color",
"if",
"no",
"color",
"is",
"defined",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/render/src/main/java/org/openscience/cdk/renderer/color/CDKAtomColors.java#L65-L94 |
114,092 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java | FiguerasSSSRFinder.prepareRing | private IRing prepareRing(List vec, IAtomContainer mol) {
// add the atoms in vec to the new ring
int atomCount = vec.size();
IRing ring = mol.getBuilder().newInstance(IRing.class, atomCount);
IAtom[] atoms = new IAtom[atomCount];
vec.toArray(atoms);
ring.setAtoms(atoms);... | java | private IRing prepareRing(List vec, IAtomContainer mol) {
// add the atoms in vec to the new ring
int atomCount = vec.size();
IRing ring = mol.getBuilder().newInstance(IRing.class, atomCount);
IAtom[] atoms = new IAtom[atomCount];
vec.toArray(atoms);
ring.setAtoms(atoms);... | [
"private",
"IRing",
"prepareRing",
"(",
"List",
"vec",
",",
"IAtomContainer",
"mol",
")",
"{",
"// add the atoms in vec to the new ring",
"int",
"atomCount",
"=",
"vec",
".",
"size",
"(",
")",
";",
"IRing",
"ring",
"=",
"mol",
".",
"getBuilder",
"(",
")",
".... | Returns the ring that is formed by the atoms in the given vector.
@param vec The vector that contains the atoms of the ring
@param mol The molecule this ring is a substructure of
@return The ring formed by the given atoms | [
"Returns",
"the",
"ring",
"that",
"is",
"formed",
"by",
"the",
"atoms",
"in",
"the",
"given",
"vector",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java#L258-L287 |
114,093 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java | FiguerasSSSRFinder.trim | private void trim(IAtom atom, IAtomContainer molecule) {
List<IBond> bonds = molecule.getConnectedBondsList(atom);
for (int i = 0; i < bonds.size(); i++) {
molecule.removeElectronContainer((IBond) bonds.get(i));
}
// you are erased! Har, har, har..... >8-)
} | java | private void trim(IAtom atom, IAtomContainer molecule) {
List<IBond> bonds = molecule.getConnectedBondsList(atom);
for (int i = 0; i < bonds.size(); i++) {
molecule.removeElectronContainer((IBond) bonds.get(i));
}
// you are erased! Har, har, har..... >8-)
} | [
"private",
"void",
"trim",
"(",
"IAtom",
"atom",
",",
"IAtomContainer",
"molecule",
")",
"{",
"List",
"<",
"IBond",
">",
"bonds",
"=",
"molecule",
".",
"getConnectedBondsList",
"(",
"atom",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"... | removes all bonds connected to the given atom leaving it with degree zero.
@param atom The atom to be disconnecred
@param molecule The molecule containing the atom | [
"removes",
"all",
"bonds",
"connected",
"to",
"the",
"given",
"atom",
"leaving",
"it",
"with",
"degree",
"zero",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java#L295-L301 |
114,094 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java | FiguerasSSSRFinder.initPath | private void initPath(IAtomContainer molecule) {
for (int i = 0; i < molecule.getAtomCount(); i++) {
IAtom atom = molecule.getAtom(i);
atom.setProperty(PATH, new ArrayList<IAtom>());
}
} | java | private void initPath(IAtomContainer molecule) {
for (int i = 0; i < molecule.getAtomCount(); i++) {
IAtom atom = molecule.getAtom(i);
atom.setProperty(PATH, new ArrayList<IAtom>());
}
} | [
"private",
"void",
"initPath",
"(",
"IAtomContainer",
"molecule",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"molecule",
".",
"getAtomCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"IAtom",
"atom",
"=",
"molecule",
".",
"getAtom",
"(",
... | initializes a path vector in every Atom of the given molecule
@param molecule The given molecule | [
"initializes",
"a",
"path",
"vector",
"in",
"every",
"Atom",
"of",
"the",
"given",
"molecule"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java#L308-L313 |
114,095 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java | FiguerasSSSRFinder.getUnion | private List<IAtom> getUnion(List<IAtom> list1, List<IAtom> list2) {
// FIXME: the JavaDoc does not describe what happens: that vec1 gets to be the union!
// jm: pretty sure retainAll would do the trick here but don't want to change the
// functionality as item only present in list1 are not ... | java | private List<IAtom> getUnion(List<IAtom> list1, List<IAtom> list2) {
// FIXME: the JavaDoc does not describe what happens: that vec1 gets to be the union!
// jm: pretty sure retainAll would do the trick here but don't want to change the
// functionality as item only present in list1 are not ... | [
"private",
"List",
"<",
"IAtom",
">",
"getUnion",
"(",
"List",
"<",
"IAtom",
">",
"list1",
",",
"List",
"<",
"IAtom",
">",
"list2",
")",
"{",
"// FIXME: the JavaDoc does not describe what happens: that vec1 gets to be the union!",
"// jm: pretty sure retainAll would do the ... | Returns a Vector that contains the union of Vectors vec1 and vec2
@param list1 The first vector
@param list2 The second vector
@return the union of the two list | [
"Returns",
"a",
"Vector",
"that",
"contains",
"the",
"union",
"of",
"Vectors",
"vec1",
"and",
"vec2"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java#L337-L346 |
114,096 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java | FiguerasSSSRFinder.breakBond | private void breakBond(IAtom atom, IAtomContainer molecule) {
Iterator<IBond> bonds = molecule.bonds().iterator();
while (bonds.hasNext()) {
IBond bond = (IBond) bonds.next();
if (bond.contains(atom)) {
molecule.removeElectronContainer(bond);
break... | java | private void breakBond(IAtom atom, IAtomContainer molecule) {
Iterator<IBond> bonds = molecule.bonds().iterator();
while (bonds.hasNext()) {
IBond bond = (IBond) bonds.next();
if (bond.contains(atom)) {
molecule.removeElectronContainer(bond);
break... | [
"private",
"void",
"breakBond",
"(",
"IAtom",
"atom",
",",
"IAtomContainer",
"molecule",
")",
"{",
"Iterator",
"<",
"IBond",
">",
"bonds",
"=",
"molecule",
".",
"bonds",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"bonds",
".",
"hasNext",
"... | Eliminates one bond of this atom from the molecule
@param atom The atom one bond is eliminated of
@param molecule The molecule that contains the atom | [
"Eliminates",
"one",
"bond",
"of",
"this",
"atom",
"from",
"the",
"molecule"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java#L354-L363 |
114,097 | cdk/cdk | legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java | FiguerasSSSRFinder.checkEdges | private IBond checkEdges(IRing ring, IAtomContainer molecule) {
IRing r1, r2;
IRingSet ringSet = ring.getBuilder().newInstance(IRingSet.class);
IBond bond;
int minMaxSize = Integer.MAX_VALUE;
int minMax = 0;
logger.debug("Molecule: " + molecule);
Iterator<IBond> b... | java | private IBond checkEdges(IRing ring, IAtomContainer molecule) {
IRing r1, r2;
IRingSet ringSet = ring.getBuilder().newInstance(IRingSet.class);
IBond bond;
int minMaxSize = Integer.MAX_VALUE;
int minMax = 0;
logger.debug("Molecule: " + molecule);
Iterator<IBond> b... | [
"private",
"IBond",
"checkEdges",
"(",
"IRing",
"ring",
",",
"IAtomContainer",
"molecule",
")",
"{",
"IRing",
"r1",
",",
"r2",
";",
"IRingSet",
"ringSet",
"=",
"ring",
".",
"getBuilder",
"(",
")",
".",
"newInstance",
"(",
"IRingSet",
".",
"class",
")",
"... | Selects an optimum edge for elimination in structures without N2 nodes.
<p>This might be severely broken! Would have helped if there was an
explanation of how this algorithm worked.
@param ring
@param molecule | [
"Selects",
"an",
"optimum",
"edge",
"for",
"elimination",
"in",
"structures",
"without",
"N2",
"nodes",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java#L374-L402 |
114,098 | cdk/cdk | tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94BasedParameterSetReader.java | MMFF94BasedParameterSetReader.setBond | private void setBond() throws Exception {
List data = new Vector();
st.nextToken();
String scode = st.nextToken();
String sid1 = st.nextToken();
String sid2 = st.nextToken();
String slen = st.nextToken();
String sk2 = st.nextToken();
String sk3 = st.nextTo... | java | private void setBond() throws Exception {
List data = new Vector();
st.nextToken();
String scode = st.nextToken();
String sid1 = st.nextToken();
String sid2 = st.nextToken();
String slen = st.nextToken();
String sk2 = st.nextToken();
String sk3 = st.nextTo... | [
"private",
"void",
"setBond",
"(",
")",
"throws",
"Exception",
"{",
"List",
"data",
"=",
"new",
"Vector",
"(",
")",
";",
"st",
".",
"nextToken",
"(",
")",
";",
"String",
"scode",
"=",
"st",
".",
"nextToken",
"(",
")",
";",
"String",
"sid1",
"=",
"s... | Sets the bond attribute stored into the parameter set
@throws Exception Description of the Exception | [
"Sets",
"the",
"bond",
"attribute",
"stored",
"into",
"the",
"parameter",
"set"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94BasedParameterSetReader.java#L224-L254 |
114,099 | cdk/cdk | tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94BasedParameterSetReader.java | MMFF94BasedParameterSetReader.setAngle | private void setAngle() throws Exception {
List data = new Vector();
st.nextToken();
String scode = st.nextToken(); // String scode
String sid1 = st.nextToken();
String sid2 = st.nextToken();
String sid3 = st.nextToken();
String value1 = st.nextToken();
St... | java | private void setAngle() throws Exception {
List data = new Vector();
st.nextToken();
String scode = st.nextToken(); // String scode
String sid1 = st.nextToken();
String sid2 = st.nextToken();
String sid3 = st.nextToken();
String value1 = st.nextToken();
St... | [
"private",
"void",
"setAngle",
"(",
")",
"throws",
"Exception",
"{",
"List",
"data",
"=",
"new",
"Vector",
"(",
")",
";",
"st",
".",
"nextToken",
"(",
")",
";",
"String",
"scode",
"=",
"st",
".",
"nextToken",
"(",
")",
";",
"// String scode",
"String",... | Sets the angle attribute stored into the parameter set
@throws Exception Description of the Exception | [
"Sets",
"the",
"angle",
"attribute",
"stored",
"into",
"the",
"parameter",
"set"
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/modeling/builder3d/MMFF94BasedParameterSetReader.java#L261-L298 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.