Package org.biojava.bio.structure

Examples of org.biojava.bio.structure.Group


      return atom.getName();
    }

    public String getGroup3() {

      Group parent = atom.getParent();
      if (parent != null) {

        return parent.getPDBName();
      }
      return null;
    }
View Full Code Here


      }
      return null;
    }

    public int getSequenceNumber() {
      Group g = atom.getParent();
      if (g != null) {

        try {
          return Integer.parseInt(g.getPDBCode());
        } catch (NumberFormatException e) {
          // e.printStackTrace();
        }
      }
View Full Code Here

      } else
        return (char) 0;
    }

    public char getInsertionCode() {
      Group g = atom.getParent();
      if (g != null) {
        String pdbresnum = g.getPDBCode();
        try {
          Integer.parseInt(pdbresnum);
        } catch (NumberFormatException ex) {

          String insertionCode = pdbresnum.substring(pdbresnum
View Full Code Here

      }
      return (char) 0;
    }

    public boolean getIsHetero() {
      Group parent = atom.getParent();
      if (parent != null) {
        if (parent.getType().equals(HetatomImpl.type)) {
          // System.out.println(atom + " is hetero");
          return true;
        }
      }
View Full Code Here

   * @return
   */
  private int getSeqPosFromPdb(String pdbresnum, Chain currentChain) {
    List<Group> groups = currentChain.getAtomGroups();
    try {
      Group g = currentChain.getGroupByPDB(pdbresnum);
      return groups.indexOf(g);

    } catch (StructureException e) {
      return -1;
    }
View Full Code Here

    Atom a = new AtomImpl();
    a.setName("CA");
    a.setFullName(" CA ");
    a.setCoords(new double[] { 47.866, 28.415, 2.952 });

    Group g = new AminoAcidImpl();
    g.setPDBCode("9");
    try {
      g.setPDBName("GLY");
    } catch (PDBParseException e) {
      e.printStackTrace();
    }
    g.addAtom(a);

    Chain c = new ChainImpl();
    c.addGroup(g);

    Structure s = new StructureImpl();
View Full Code Here

  private String getSelectStr(int chainNumber, int start, int end) {
    Chain chain = structure.getChain(chainNumber) ;
        if ( chain == null) return "" ;
        String chainid = chain.getName() ;
       
        Group gs = getGroupNext( chain,(start-1), true);
        //Group gs = chain.getGroup(start-1); 
        Group ge = getGroupNext( chain,(end-1), false);
       
        String startpdb = gs.getPDBCode() ;
        String endpdb = ge.getPDBCode() ;
        String cmd =  "select "+startpdb+"-"+endpdb;
       
        if ( ! chainid.equals(" "))
            cmd += ":" +chainid + "/1";
        else
View Full Code Here

   */
  private Group getGroupNext(Chain chain, int startpos, boolean increment) {
          if ( chain == null) return null ;
         
          while ( (startpos >= 0 ) && (startpos < chain.getAtomLength())){
              Group g = chain.getAtomGroup(startpos)
        //System.out.println("checking " + startpos + " " + g );
              if (g.has3D()){
                  return g ;
              }
              if ( increment) {
                  startpos += 1;
              } else {
View Full Code Here

TOP

Related Classes of org.biojava.bio.structure.Group

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.