示例#1
0
 public virtual void lookForHbonds(NucleicPolymer other, BitArray bsA, BitArray bsB)
 {
     //System.out.println("NucleicPolymer.lookForHbonds()");
     for (int i = monomerCount; --i >= 0;)
     {
         NucleicMonomer myNucleotide = (NucleicMonomer)monomers[i];
         if (!myNucleotide.Purine)
         {
             continue;
         }
         Atom           myN1           = myNucleotide.N1;
         Atom           bestN3         = null;
         float          minDist2       = 5 * 5;
         NucleicMonomer bestNucleotide = null;
         for (int j = other.monomerCount; --j >= 0;)
         {
             NucleicMonomer otherNucleotide = (NucleicMonomer)other.monomers[j];
             if (!otherNucleotide.Pyrimidine)
             {
                 continue;
             }
             Atom  otherN3 = otherNucleotide.N3;
             float dist2   = myN1.point3f.distanceSquared(otherN3.point3f);
             if (dist2 < minDist2)
             {
                 bestNucleotide = otherNucleotide;
                 bestN3         = otherN3;
                 minDist2       = dist2;
             }
         }
         if (bestN3 != null)
         {
             createHydrogenBond(myN1, bestN3, bsA, bsB);
             if (myNucleotide.Guanine)
             {
                 createHydrogenBond(myNucleotide.N2, bestNucleotide.O2, bsA, bsB);
                 createHydrogenBond(myNucleotide.O6, bestNucleotide.N4, bsA, bsB);
             }
             else
             {
                 createHydrogenBond(myNucleotide.N6, bestNucleotide.O4, bsA, bsB);
             }
         }
     }
 }
示例#2
0
        public virtual void lookForHbonds(NucleicPolymer other, BitArray bsA, BitArray bsB)
		{
			//System.out.println("NucleicPolymer.lookForHbonds()");
			for (int i = monomerCount; --i >= 0; )
			{
				NucleicMonomer myNucleotide = (NucleicMonomer) monomers[i];
				if (!myNucleotide.Purine)
					continue;
				Atom myN1 = myNucleotide.N1;
				Atom bestN3 = null;
				float minDist2 = 5 * 5;
				NucleicMonomer bestNucleotide = null;
				for (int j = other.monomerCount; --j >= 0; )
				{
					NucleicMonomer otherNucleotide = (NucleicMonomer) other.monomers[j];
					if (!otherNucleotide.Pyrimidine)
						continue;
					Atom otherN3 = otherNucleotide.N3;
					float dist2 = myN1.point3f.distanceSquared(otherN3.point3f);
					if (dist2 < minDist2)
					{
						bestNucleotide = otherNucleotide;
						bestN3 = otherN3;
						minDist2 = dist2;
					}
				}
				if (bestN3 != null)
				{
					createHydrogenBond(myN1, bestN3, bsA, bsB);
					if (myNucleotide.Guanine)
					{
						createHydrogenBond(myNucleotide.N2, bestNucleotide.O2, bsA, bsB);
						createHydrogenBond(myNucleotide.O6, bestNucleotide.N4, bsA, bsB);
					}
					else
					{
						createHydrogenBond(myNucleotide.N6, bestNucleotide.O4, bsA, bsB);
					}
				}
			}
		}