Package org.jmol.atomdata

Examples of org.jmol.atomdata.RadiusData


    return name;
  }

  private void setAtomShapeSize(int shape, float scale) throws ScriptException {
    // halo star spacefill
    RadiusData rd = null;
    int tok = tokAt(1);
    boolean isOnly = false;
    switch (tok) {
    case Token.only:
      restrictSelected(false, false);
      break;
    case Token.on:
      break;
    case Token.off:
      scale = 0;
      break;
    case Token.decimal:
      isOnly = (floatParameter(1) < 0);
      // fall through
    case Token.integer:
    default:
      rd = encodeRadiusParameter(1, isOnly);
      if (Float.isNaN(rd.value))
        error(ERROR_invalidArgument);
    }
    if (rd == null)
      rd = new RadiusData(scale, RadiusData.TYPE_FACTOR, JmolConstants.VDW_AUTO);
    if (isOnly)
      restrictSelected(false, false);
    setShapeSize(shape, rd);
  }
View Full Code Here


      if (vdwType < 0) {
        iToken = index;
        vdwType = JmolConstants.getVdwType("auto");
      }
    }
    return new RadiusData(value, type, vdwType);
  }
View Full Code Here

      if (tokAt(1) == Token.scale) {
        setFloatProperty("vectorScale", floatParameter(2, -100, 100));
        return;
      }
    }
    setShapeSize(JmolConstants.SHAPE_VECTORS, new RadiusData(value, type, 0));
  }
View Full Code Here

        setShapeProperty(iShape, "dots", statement[ipt].value);
        return;
      }
      break;
    }
    RadiusData rd = (Float.isNaN(value) ? encodeRadiusParameter(ipt, false)
        : new RadiusData(value, type, 0));
    if (Float.isNaN(rd.value))
      error(ERROR_invalidArgument);
    setShapeSize(iShape, rd);
  }
View Full Code Here

      case Token.file:
        continue;
      case Token.ionic:
      case Token.vanderwaals:
        sbCommand.append(" ").append(theToken.value);
        RadiusData rd = encodeRadiusParameter(i, false);
        sbCommand.append(" ").append(rd);
        if (Float.isNaN(rd.value))
          rd.value = 100;
        propertyValue = rd;
        propertyName = "radius";
View Full Code Here

      if (fValue > Shape.RADIUS_MAX)
        fValue = Shape.RADIUS_MAX;
      // fall through
    case Token.halo:
    case Token.star:
      RadiusData rd = null;
      int mar = 0;
      if (values == null) {
        if (fValue > Atom.RADIUS_MAX)
          fValue = Atom.RADIUS_MAX;
        if (fValue < 0)
          fValue = 0;
        mar = (int) (fValue * 2000);
      } else {
        rd = new RadiusData();
        rd.values = values;
        rd.value = Integer.MAX_VALUE;
      }
      shapeManager
          .setShapeSize(JmolConstants.shapeTokenIndex(tok), mar, rd, bs);
View Full Code Here

    int modelIndex = modelCount - 1;
    BitSet bs = new BitSet();
    if (models[modelIndex].isTrajectory || models[modelIndex].getGroupCount() > 1)
      return bs; // can't add atoms to a trajectory or a system with multiple groups!
    growAtomArrays(atomCount + pts.length);
    RadiusData rd = viewer.getDefaultRadiusData();
    short mad = getDefaultMadFromOrder(1);
    for (int i = 0, n = models[modelIndex].atomCount + 1; i < vConnections.size(); i++, n++) {
      Atom atom1 = (Atom) vConnections.get(i);
      // hmm. atom1.group will not be expanded, though...
      // something like within(group,...) will not select these atoms!
View Full Code Here

   */
  protected void getAtoms(float marginAtoms, boolean doGetAllAtoms,
                          boolean addNearbyAtoms) {

    if (params.atomRadiusData == null)
      params.atomRadiusData = new RadiusData(1, RadiusData.TYPE_FACTOR,
          JmolConstants.VDW_AUTO);
    atomData.radiusData = params.atomRadiusData;
    if (doAddHydrogens)
      atomData.radiusData.vdwType = JmolConstants.VDW_NOJMOL;
    atomData.modelIndex = modelIndex; // -1 here means fill ALL atoms; any other
View Full Code Here

      adapter.finish(atomSetCollection);
    }

    // only now can we access all of the atom's properties

    RadiusData rd = viewer.getDefaultRadiusData();
    for (int i = baseAtomIndex; i < atomCount; i++)
      atoms[i].setMadAtom(viewer, rd);
    for (int i = models[baseModelIndex].firstAtomIndex; i < atomCount; i++)
      models[atoms[i].modelIndex].bsAtoms.set(i);
    setDefaultRendering(viewer.getSmallMoleculeMaxAtoms());
View Full Code Here

      ec = new EnvelopeCalculation(viewer, atomCount, mads, viewer.getTestFlag2());
  }

  protected void setSize(RadiusData rd, BitSet bsSelected) {
    if (rd == null)
      rd = new RadiusData(0, RadiusData.TYPE_ABSOLUTE, 0);
    if (this.bsSelected != null)
      bsSelected = this.bsSelected;

    // if mad == 0 then turn it off
    // 1 van der Waals (dots) or +1.2, calconly)
View Full Code Here

TOP

Related Classes of org.jmol.atomdata.RadiusData

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.