Package org.jmol.adapter.smarter

Examples of org.jmol.adapter.smarter.Atom


      float x = parseFloat(line, 8, 25);
      float y = parseFloat(line, 25, 40);
      float z = parseFloat(line, 40, 56);
      if (Float.isNaN(x) || Float.isNaN(y) || Float.isNaN(z))
        break;
      Atom atom = atomSetCollection.addNewAtom();
      atom.atomName = atomName + (++atomCountInFirstModel);
      atom.set(x, y, z);
      atom.scale(ANGSTROMS_PER_BOHR);
      atomNames.add(atomName);
    }
  }
View Full Code Here


      float x = parseFloat(line, 17, 37);
      float y = parseFloat(line, 37, 57);
      float z = parseFloat(line, 57, 77);
      if (Float.isNaN(x) || Float.isNaN(y) || Float.isNaN(z))
        break;
      Atom atom = atomSetCollection.addNewAtom();
      atom.elementSymbol = getElementSymbol(parseInt(line.substring(11, 14)));
      atom.atomName = atom.elementSymbol + (++n);
      atom.set(x, y, z);
      atom.scale(ANGSTROMS_PER_BOHR);
      atomNames.add(atomName);
    }
  }
View Full Code Here

      float x = parseFloat(line, 16, 31);
      float y = parseFloat(line, 31, 46);
      float z = parseFloat(line, 46, 61);
      if (Float.isNaN(x) || Float.isNaN(y) || Float.isNaN(z))
        break;
      Atom atom = atomSetCollection.addNewAtom();
      atom.set(x, y, z);
      atom.elementSymbol = getElementSymbol(parseInt(line.substring(11, 14)));
      atom.atomName = atom.elementSymbol + (++n);
      atomNames.add(atomName);
    }
       
    /*
    During optimization, this will immediately appear after the
    ab initio molecule
   
    COORDINATES OF FRAGMENT MULTIPOLE CENTERS (ANGS)
    MULTIPOLE NAME        X              Y              Z
    ------------------------------------------------------------
    FRAGNAME=H2ORHF
    ZO1              -4.1459482636   0.4271933699   0.0417242924
    ZH2              -3.4514529072   1.0596960013  -0.0504444399
    ZH3              -4.5252917848   0.5632659571   0.8952236761
   
    or for H2ODFT
   
    COORDINATES OF FRAGMENT MULTIPOLE CENTERS (ANGS)
    MULTIPOLE NAME        X              Y              Z
    ------------------------------------------------------------
    FRAGNAME=H2ODFT
    O1                3.5571448937  -2.1158335714  -0.0044768463
    H2                3.9520351868  -2.4002052098  -0.8132245708
    H3                3.7885802785  -1.2074436330   0.1057222304
   
    */
   
    // Now is the time to read Effective Fragments (EFP)
    if (line.indexOf("COORDINATES OF FRAGMENT MULTIPOLE CENTERS (ANGS)") >= 0) {
         readLine(); // MULTIPONE NAME         X ...
        readLine(); // ------------------------ ...
        readLine(); // FRAGNAME=
       
        //at least for FRAGNAME=H2ORHF, the atoms come out as ZO1, ZH2, ZH3
        while (readLine() != null
        && (atomName = parseToken(line, 1, 2)) != null) {
              if (parseToken(line,1,2).equals("Z")) //Z means nuclear position
                    atomName = parseToken(line, 2, 3);
              else if (parseToken(line,1,9).equals("FRAGNAME"))//Z is a deprecated requirement
                  continue;
              else
                    atomName = parseToken(line, 1, 2);
              float x = parseFloat(line, 16, 31);
              float y = parseFloat(line, 31, 46);
              float z = parseFloat(line, 46, 61);
              if (Float.isNaN(x) || Float.isNaN(y) || Float.isNaN(z))
                    break;
              Atom atom = atomSetCollection.addNewAtom();
              atom.atomName = atomName + (++n);
              atom.set(x, y, z);
              atomNames.add(atomName);
        }
         
    }
  }
View Full Code Here

      Logger.warn("cannot read line with FHI-aims line: " + line);
      return;
    }
    if (this.isFractional != isFractional)
      setFractionalCoordinates(this.isFractional = isFractional);
    Atom atom = atomSetCollection.addNewAtom();
    setAtomCoord(atom, parseFloat(tokens[1]), parseFloat(tokens[2]),
        parseFloat(tokens[3]));       
    atom.elementSymbol = tokens[4];
  }
View Full Code Here

              + line);
      return;
    }
    if (this.isFractional)
      setFractionalCoordinates(this.isFractional = false);
    Atom atom = atomSetCollection.addNewAtom();
    setAtomCoord(atom, parseFloat(tokens[1]), parseFloat(tokens[2]),
        parseFloat(tokens[3]));
    atom.partialCharge = parseFloat(tokens[5]);
    // we generally do not do this: atom.formalCharge = Math.round(atom.partialCharge);
  }
View Full Code Here

TOP

Related Classes of org.jmol.adapter.smarter.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.