1package denoptim.fragmenter;
3import static org.junit.jupiter.api.Assertions.assertTrue;
5import javax.vecmath.Point3d;
7import org.junit.jupiter.api.Test;
8import org.openscience.cdk.Atom;
9import org.openscience.cdk.interfaces.IAtomContainer;
10import org.openscience.cdk.interfaces.IChemObjectBuilder;
11import org.openscience.cdk.silent.SilentChemObjectBuilder;
13import denoptim.graph.APClass;
14import denoptim.graph.Fragment;
15import denoptim.graph.Vertex.BBType;
26 private IChemObjectBuilder
builder = SilentChemObjectBuilder.getInstance();
33 IAtomContainer mol1 =
builder.newAtomContainer();
34 mol1.addAtom(
new Atom(
"C",
new Point3d(0,0,0)));
35 mol1.addAtom(
new Atom(
"H",
new Point3d(1,1,1)));
36 mol1.addAtom(
new Atom(
"O",
new Point3d(3,1,1)));
46 IAtomContainer mol2 =
builder.newAtomContainer();
47 mol2.addAtom(
new Atom(
"O",
new Point3d(3,1,1)));
48 mol2.addAtom(
new Atom(
"H",
new Point3d(1,1,1)));
49 mol2.addAtom(
new Atom(
"C",
new Point3d(0,0,0)));
57 IAtomContainer mol3 =
builder.newAtomContainer();
58 mol3.addAtom(
new Atom(
"O",
new Point3d(1,3,1)));
59 mol3.addAtom(
new Atom(
"H",
new Point3d(1,1,1)));
60 mol3.addAtom(
new Atom(
"C",
new Point3d(0,0,0)));
68 IAtomContainer mol4 =
builder.newAtomContainer();
69 mol4.addAtom(
new Atom(
"O",
new Point3d(3,1,1)));
70 mol4.addAtom(
new Atom(
"H",
new Point3d(1,1,1)));
71 mol4.addAtom(
new Atom(
"C",
new Point3d(1,0,0)));
79 IAtomContainer mol5 =
builder.newAtomContainer();
80 mol5.addAtom(
new Atom(
"O",
new Point3d(3,1,1)));
81 mol5.addAtom(
new Atom(
"H",
new Point3d(1,1,1)));
82 mol5.addAtom(
new Atom(
"C",
new Point3d(0,0,0)));
Class performing the alignment of Fragments.
double getMinimumRMSD()
Returns the lowest RMSD that could be found among all isomorphic mappings.
Unit test for fragmenter's tools.
IChemObjectBuilder builder
Private builder of atom containers.
void testGetMinimumRMSD()
static APClass make(String ruleAndSubclass)
Creates an APClass if it does not exist already, or returns the reference to the existing instance.
Class representing a continuously connected portion of chemical object holding attachment points.
void addAP(int atomPositionNumber)
Adds an attachment point with a dummy APClass.
Fragment clone()
Returns a deep copy of this fragments.
The type of building block.