Package org.jmol.modelset

Examples of org.jmol.modelset.Atom


  private void setStrut(int i, int j, int n, List vCA, BitSet bs1, BitSet bs2,
                        List vStruts,
                        BitSet bsStruts, BitSet bsNotAvailable,
                        BitSet bsNearbyResidues, int delta) {
    Atom a1 = (Atom) vCA.get(i);
    Atom a2 = (Atom) vCA.get(j);
    if (!bs1.get(a1.index) || !bs2.get(a2.index))
      return;
    vStruts.add(new Atom[] { a1, a2 });
    bsStruts.set(i);
    bsStruts.set(j);
View Full Code Here


    if (mads == null)
      return;
    Atom[] atoms = vectors.atoms;
    short[] colixes = vectors.colixes;
    for (int i = modelSet.getAtomCount(); --i >= 0;) {
      Atom atom = atoms[i];
      if (!atom.isVisible(myVisibilityFlag))
        continue;
      Vector3f vibrationVector = viewer.getVibrationVector(i);
      if (vibrationVector == null)
        continue;
      vectorScale = viewer.getVectorScale();
View Full Code Here

      for (int i = vertices.length; --i >= 0;)
        screens[i] = new Point3i();
    }
    planes = p.planes;
    for (int i = vertices.length; --i >= 0;) {
      Atom atom = (vertices[i] instanceof Atom ? (Atom) vertices[i] : null);
      if (atom == null)
        viewer.transformPoint(vertices[i], screens[i]);
      else
        screens[i].set(atom.screenX, atom.screenY, atom.screenZ);
    }
View Full Code Here

 
  boolean isConnectedAfter(Monomer possiblyPreviousMonomer) {
    if (possiblyPreviousMonomer == null)
      return true;
    Atom myPhosphorusAtom = getAtomFromOffsetIndex(NP);
    if (myPhosphorusAtom == null)
      return false;
    if (! (possiblyPreviousMonomer instanceof NucleicMonomer))
      return false;
    NucleicMonomer other = (NucleicMonomer)possiblyPreviousMonomer;
View Full Code Here

  ////////////////////////////////////////////////////////////////

 
  public void findNearestAtomIndex(int x, int y, Atom[] closest,
                            short madBegin, short madEnd) {
    Atom competitor = closest[0];
    Atom lead = getLeadAtom();
    Atom o5prime = getAtomFromOffsetIndex(O5Pr);
    Atom c3prime = getAtomFromOffsetIndex(C3Pr);
    short mar = (short)(madBegin / 2);
    if (mar < 1900)
      mar = 1900;
    int radius = scaleToScreen(lead.screenZ, mar);
    if (radius < 4)
View Full Code Here

        || isCursorOnTopOf(c3prime, x, y, radius, competitor))
      closest[0] = lead;
  }
 
  public void setModelClickability() {
    Atom atom;
    if (isAtomHidden(leadAtomIndex))
      return;
    for (int i = 6; --i >= 0;) {
      atom = getAtomFromOffsetIndex(ring6OffsetIndexes[i]);
      atom.setClickable(JmolConstants.CARTOON_VISIBILITY_FLAG);
    }
    if (isPurine)
      for (int i = 4; --i >= 1;) {
        atom = getAtomFromOffsetIndex(ring5OffsetIndexes[i]);
        atom.setClickable(JmolConstants.CARTOON_VISIBILITY_FLAG);
      }
  }
View Full Code Here

      // Sarver's base center; does not include C4'
      if (baseCenter == null) {
        int n = 0;
        baseCenter = new Point3f();
        for (int i = 0; i < heavyAtomIndexes.length; i++) {
          Atom a = getAtomFromOffsetIndex(heavyAtomIndexes[i]);
          if (a == null)
            continue;
          baseCenter.add(a);
          n++;
        }
View Full Code Here

    // quaternionFrame 'c' from 
    // Sarver M, Zirbel CL, Stombaugh J, Mokdad A, Leontis NB.
    // FR3D: finding local and composite recurrent structural motifs in RNA 3D structures.
    // J. Math. Biol. (2006) 215-252
    // quaternionFrame 'n' same, but with N1/N9 as base atom (only different for DRAW)
    Atom ptA = null, ptB = null, ptNorP;
    boolean yBased = false;
    boolean reverseY = false;
    switch (qType) {
    case 'a': // alternative C4' - P - C4'
      //   (C4_i-1 - P_i - C4_i), with Y P_i - C4_i     
      ptNorP = getP();
      if (monomerIndex == 0 || ptNorP == null)
        return null;
      yBased = true;
      ptA = ((NucleicMonomer) bioPolymer.monomers[monomerIndex - 1]).getC4P();
      ptB = getC4P();
      break;
    case 'x':
      // P[i]-C4'[i]-P[i+1]
      ptNorP = getP();
      if (monomerIndex == bioPolymer.monomerCount - 1 || ptNorP == null)
        return null;
      ptA = ((NucleicMonomer) bioPolymer.monomers[monomerIndex + 1]).getP();
      ptB = getC4P();
      break;
    case 'b': // phosphorus backbone
      return super.getQuaternion(qType);
    case 'c': // Sarver-defined, with Y in the C1'-N1/9 direction, x toward C2 (W-C edge)
    case 'n': // same, just different quaternion center
      // N0 = (purine N9, pyrimidine N1):
      ptNorP = getN0();
      if (ptNorP == null)
        return null;
      yBased = true;
      reverseY = true;
      // vB = -(N0-C1P)
      // vA = vB x (vB x (N0-C2))
      ptA = getAtomFromOffsetIndex(C2);
      ptB = getAtomFromOffsetIndex(C1P);
      break;
    case 'p': // phosphorus tetrahedron
      // O1P - P - O2P
      ptNorP = getP();
      if (ptNorP == null)
        return null;
      Atom p1 = getAtomFromOffsetIndex(O1P);
      Atom p2 = getAtomFromOffsetIndex(O2P);
      Bond[] bonds = ptNorP.getBonds();
      if (bonds == null)
        return null;
      Group g = ptNorP.getGroup();
      for (int i = 0; i < bonds.length; i++) {
        Atom atom = bonds[i].getOtherAtom(ptNorP);
        if (p1 != null && atom.index == p1.index)
          continue;
        if (p2 != null && atom.index == p2.index)
          continue;
        if (atom.getGroup() == g)
          ptB = atom;
        else
          ptA = atom;
      }
      break;
View Full Code Here

public boolean isCrossLinked(Group g) {
    if (!(g instanceof NucleicMonomer) || isPurine == g.isPurine())
      return false;
    NucleicMonomer otherNucleotide = (isPurine ? (NucleicMonomer) g : this);
    NucleicMonomer myNucleotide = (isPurine ? this : (NucleicMonomer) g);
    Atom myN1 = myNucleotide.getN1();
    Atom otherN3 = otherNucleotide.getN3();
    return (myN1.isBonded(otherN3));
  }
View Full Code Here

    return (myN1.isBonded(otherN3));
  }
 
  public boolean getCrossLinkLeadAtomIndexes(List vReturn) {
    Atom N = (isPurine ? getN1() : getN3());
    //System.out.println(N.getInfo());
    Bond[] bonds = N.getBonds();
    if (bonds == null)
      return false;
    boolean haveCrossLinks = false;
    for (int i = 0; i < bonds.length; i++) {
      //System.out.println(bonds[i].getOtherAtom(N).getInfo());
      if (bonds[i].isHydrogen()) {
        Atom N2 = bonds[i].getOtherAtom(N);
        Group g = N2.getGroup();
        if (!(g instanceof NucleicMonomer))
          continue;
        NucleicMonomer m = (NucleicMonomer) g;
        if ((isPurine ? m.getN3() : m.getN1()) == N2) {
          if (vReturn == null)
View Full Code Here

TOP

Related Classes of org.jmol.modelset.Atom

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.