Пример #1
0
        public virtual void TestAddAtom_IPDBAtom()
        {
            IPDBPolymer pdbPolymer = (IPDBPolymer)NewChemObject();

            IPDBAtom oPDBAtom1 = pdbPolymer.Builder.NewPDBAtom("C");
            IPDBAtom oPDBAtom2 = pdbPolymer.Builder.NewPDBAtom("C");

            pdbPolymer.Add(oPDBAtom1);
            pdbPolymer.Add(oPDBAtom2);

            Assert.AreEqual(2, pdbPolymer.Atoms.Count);
        }
Пример #2
0
        public override void TestGetMonomerCount()
        {
            IPDBPolymer pdbPolymer = (IPDBPolymer)NewChemObject();

            Assert.AreEqual(0, pdbPolymer.GetMonomerMap().Count());

            IStrand oStrand1 = pdbPolymer.Builder.NewStrand();

            oStrand1.StrandName = "A";
            IStrand oStrand2 = pdbPolymer.Builder.NewStrand();

            oStrand2.StrandName = "B";
            IMonomer oMono1 = pdbPolymer.Builder.NewMonomer();

            oMono1.MonomerName = "TRP279";
            IMonomer oMono2 = pdbPolymer.Builder.NewMonomer();

            oMono2.MonomerName = "HOH";
            IPDBAtom oPDBAtom1 = pdbPolymer.Builder.NewPDBAtom("C");
            IPDBAtom oPDBAtom2 = pdbPolymer.Builder.NewPDBAtom("C");
            IPDBAtom oPDBAtom3 = pdbPolymer.Builder.NewPDBAtom("C");

            pdbPolymer.Add(oPDBAtom1);
            pdbPolymer.AddAtom(oPDBAtom2, oMono1, oStrand1);
            pdbPolymer.AddAtom(oPDBAtom3, oMono2, oStrand2);
            Assert.IsNotNull(pdbPolymer.Atoms[0]);
            Assert.IsNotNull(pdbPolymer.Atoms[1]);
            Assert.IsNotNull(pdbPolymer.Atoms[2]);
            Assert.AreEqual(oPDBAtom1, pdbPolymer.Atoms[0]);
            Assert.AreEqual(oPDBAtom2, pdbPolymer.Atoms[1]);
            Assert.AreEqual(oPDBAtom3, pdbPolymer.Atoms[2]);

            Assert.AreEqual(2, pdbPolymer.GetMonomerMap().Count());
        }
Пример #3
0
        public virtual void TestAddStructure_IPDBStructure()
        {
            IPDBPolymer   pdbPolymer = (IPDBPolymer)NewChemObject();
            IPDBStructure structure  = pdbPolymer.Builder.NewPDBStructure();

            pdbPolymer.Add(structure);
            Assert.AreEqual(1, pdbPolymer.GetStructures().Count());
        }