Beispiel #1
0
        public override void TestGetMonomer_String_String()
        {
            IPDBPolymer pdbPolymer = (IPDBPolymer)NewChemObject();

            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.AddAtom(oPDBAtom1, oMono1, oStrand1);
            pdbPolymer.AddAtom(oPDBAtom2, oMono1, oStrand1);
            pdbPolymer.AddAtom(oPDBAtom3, oMono2, oStrand2);

            Assert.AreEqual(oMono1, pdbPolymer.GetMonomer("TRP279", "A"));
            Assert.AreEqual(oMono2, pdbPolymer.GetMonomer("HOH", "B"));
        }
Beispiel #2
0
        public virtual void TestAddAtom_IPDBAtom_IMonomer_IStrand()
        {
            IPDBPolymer pdbPolymer = (IPDBPolymer)NewChemObject();
            IStrand     oStrand1   = pdbPolymer.Builder.NewStrand();

            oStrand1.StrandName = "A";
            IPDBMonomer oMono1 = pdbPolymer.Builder.NewPDBMonomer();

            oMono1.MonomerName = "TRP279";
            IPDBAtom oPDBAtom1 = pdbPolymer.Builder.NewPDBAtom("C");
            IPDBAtom oPDBAtom2 = pdbPolymer.Builder.NewPDBAtom("C");
            IPDBAtom oPDBAtom3 = pdbPolymer.Builder.NewPDBAtom("C");

            pdbPolymer.AddAtom(oPDBAtom1, oStrand1);
            pdbPolymer.AddAtom(oPDBAtom2, oStrand1);
            pdbPolymer.AddAtom(oPDBAtom3, oMono1, oStrand1);

            Assert.AreEqual(2, pdbPolymer.GetMonomer("", "A").Atoms.Count);
            Assert.AreEqual(1, pdbPolymer.GetMonomer("TRP279", "A").Atoms.Count);
            Assert.AreEqual(3, pdbPolymer.Atoms.Count);
        }