Package org.biojava.bio.structure

Examples of org.biojava.bio.structure.Chain


  }

  private void initPanel() {
    this.setLayout(new BorderLayout());
    List<Chain> chains = structure.getChains();
    Chain chain = structure.getChain(selectedChainIndex);
    //sequence.setText(chain.getAtomSequence());
   
    fillChainList(chains);
    chainList = new JList(chainModel);
    chainList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    chainList.setLayoutOrientation(JList.VERTICAL);
    chainList.setSelectedIndex(0);
    chainList.setVisibleRowCount(4);
    chainList.addListSelectionListener(this);
   
    listModel = new SequenceListModel(chain.getAtomSequence());
    sequenceList = new JList(listModel);
    sequenceList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    sequenceList.setLayoutOrientation(JList.HORIZONTAL_WRAP);
    sequenceList.setVisibleRowCount(1);
    sequenceList.addListSelectionListener(this);
View Full Code Here


   
    else if(list == chainList){
      String chainName = (String)list.getSelectedValue();
      try {
        sequenceList.clearSelection();
        Chain chain = structure.findChain(chainName);
        selectedChainIndex = list.getSelectedIndex();
        SequenceListModel listModel = new SequenceListModel(chain.getAtomSequence());
        sequenceList.setModel(listModel);

      } catch (StructureException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
View Full Code Here

      return -1;
    }

    public char getChainID() {

      Chain c = iter.getCurrentChain();

      if (c != null) {

        String name = c.getName();
        if ((name != null) && (name.length() > 0)) {
          return name.charAt(0);
        }
      }
View Full Code Here

   * @param pdbresnum
   * @param chainId
   */
  private void highlitePdbPosition(String pdbresnum, String chainId) {
    // notify that a particulat position has been selected
    Chain currentChain = null;
    try {
      currentChain = structure.getChainByPDB(chainId);
    } catch (StructureException e) {
    }
    // Chain currentChain = structure.getChain(currentChainNumber);
View Full Code Here

    } catch (PDBParseException e) {
      e.printStackTrace();
    }
    g.addAtom(a);

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

    Structure s = new StructureImpl();
    s.addChain(c);

    setStructure(s);
View Full Code Here

     * @param start
     * @param end
     * @return selected String
     */
  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);
       
View Full Code Here

TOP

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

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.