示例#1
0
 //Flag true only CA will be readed
 public MolData(string fileName,PDBMODE flag,INPUTMODE mode,CHAIN_MODE chainFlag=CHAIN_MODE.SINGLE)
 {
     using (StreamReader rr = new StreamReader(fileName))            {
         switch (mode)
         {
             case INPUTMODE.PROTEIN:
                 mol = new Molecule( flag,chainFlag);
                 break;
             case INPUTMODE.RNA:
                 mol = new MoleculeRNA(flag);
                 break;
         }
         
         bool res = mol.ReadMolecule(rr);
         if (!res)
             return;
         if (mol.Chains.Count == 0)
         {
             ErrorBase.AddErrors("Error in reading file: " + fileName + "\nCannot find residues, file will not be considered!");
             rr.Close();
             return;
         }
        molLength = mol.Chains[0].chainSequence.Length;         
     }
     //CenterMol();
 }
示例#2
0
        internal Residue(Molecule molecule, Atom atom,PDBMODE flag)
        {
          //  this.molecule = molecule;
            //this.residueName = atom.ResidueName;
            this.residueName = (char)atom.tabParam[0];
            //this.chainIdentifier = atom.ChainIdentifier;
            this.tabParam[0] = atom.tabParam[1];
            //this.residueSequenceNumber = atom.ResidueSequenceNumber;         
            //this.residueSequenceNumber = atom.tabParam[2];         
            this.tabParam[1] = atom.tabParam[2];         

            atoms = new List<Atom>();
            this.atoms.Add(atom);
            //AddAtom(atom);
            //this.residueIdentifier = Residue.GetResidueIdentifier(this.residueName);
        }
示例#3
0
        public bool ReadMolData(MemoryStream stream, PDBMODE flag,string modelName)
        {
            StreamReader rr = new StreamReader(stream);
            mol = new Molecule(flag);
            bool res = mol.ReadMolecule(rr);
            if (!res)
            {
                return false;
            }

            if (mol.Chains.Count == 0)
            {
                ErrorBase.AddErrors("Error in reading file: " + modelName + "\nCannot find residues, file will not be considered!");
                return false;
            }
            molLength = mol.Chains[0].chainSequence.Length;

            return true;
            //CenterMol();
        }
示例#4
0
 public void CleanMolData()
 {
     mol = null;
 }
示例#5
0
 public void CleanMolData()
 {
     mol = null;
 }