Esempio n. 1
0
        public void TestNewPDBAtom_String_Point3d()
        {
            IChemObjectBuilder builder = RootObject.Builder;
            IPDBAtom           atom    = builder.NewPDBAtom("C", new Vector3(1, 2, 3));

            Assert.IsNotNull(atom);
        }
Esempio n. 2
0
        public void TestNewPDBAtom_IElement()
        {
            IChemObjectBuilder builder = RootObject.Builder;
            IPDBAtom           atom    = builder.NewPDBAtom(ChemicalElement.R);

            Assert.IsNotNull(atom);
        }
Esempio n. 3
0
        public void TestNewPDBAtom_String()
        {
            IChemObjectBuilder builder = RootObject.Builder;
            IPDBAtom           atom    = builder.NewPDBAtom("O");

            Assert.IsNotNull(atom);
        }
Esempio n. 4
0
        public void TestPDBAtomCustomization()
        {
            StringWriter writer   = new StringWriter();
            var          molecule = builder.NewAtomContainer();
            IPDBAtom     atom     = builder.NewPDBAtom("C");

            atom.Name    = "CA";
            atom.ResName = "PHE";
            molecule.Atoms.Add(atom);

            CMLWriter cmlWriter = new CMLWriter(writer);

            cmlWriter.RegisterCustomizer(new PDBAtomCustomizer());
            cmlWriter.Write(molecule);
            cmlWriter.Close();
            string cmlContent = writer.ToString();

            Debug.WriteLine("****************************** TestPDBAtomCustomization()");
            Debug.WriteLine(cmlContent);
            Debug.WriteLine("******************************");
            Assert.IsTrue(cmlContent.IndexOf("<scalar dictRef=\"pdb:resName") != -1);
        }