Exemplo n.º 1
0
        public void TestRebond_IAtomContainer()
        {
            var rebonder = new RebondTool(2.0, 0.5, 0.5);
            var methane  = builder.NewAtomContainer();

            methane.Atoms.Add(builder.NewAtom("C", new Vector3(0.0, 0.0, 0.0)));
            methane.Atoms.Add(builder.NewAtom("H", new Vector3(0.6, 0.6, 0.6)));
            methane.Atoms.Add(builder.NewAtom("H", new Vector3(-0.6, -0.6, 0.6)));
            methane.Atoms.Add(builder.NewAtom("H", new Vector3(0.6, -0.6, -0.6)));
            methane.Atoms.Add(builder.NewAtom("H", new Vector3(-0.6, 0.6, -0.6)));

            // configure atoms
            var factory = AtomTypeFactory.GetInstance("NCDK.Config.Data.jmol_atomtypes.txt");

            //IAtom[] atoms = methane.GetAtoms();
            for (int i = 0; i < methane.Atoms.Count; i++)
            {
                factory.Configure(methane.Atoms[i]);
            }
            // rebond
            rebonder.Rebond(methane);

            Assert.AreEqual(5, methane.Atoms.Count);
            Assert.AreEqual(4, methane.Bonds.Count);
        }
Exemplo n.º 2
0
        public void TestRebondTool_Double_double_double()
        {
            var rebonder = new RebondTool(2.0, 0.5, 0.5);

            Assert.IsNotNull(rebonder);
        }