Codota Logo
PDBFileReader.getStructure
Code IndexAdd Codota to your IDE (free)

How to use
getStructure
method
in
org.biojava.nbio.structure.io.PDBFileReader

Best Java code snippets using org.biojava.nbio.structure.io.PDBFileReader.getStructure (Showing top 7 results out of 315)

  • Common ways to obtain PDBFileReader
private void myMethod () {
PDBFileReader p =
  • Codota Iconnew PDBFileReader()
  • Smart code suggestions by Codota
}
origin: biojava/biojava

    System.out.println(url);
    Structure s = reader.getStructure(url);
  Structure s= reader.getStructure(f);
  return fixStructureName(s, file);
} catch (Exception e){
origin: biojava/biojava

      @Override
      public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        if ( cmd.equals("Open")){
          final JFileChooser fc = new JFileChooser();

//                    In response to a button click:
          int returnVal = fc.showOpenDialog(null);
          if ( returnVal == JFileChooser.APPROVE_OPTION) {
            File file = fc.getSelectedFile();

            PDBFileReader reader = new PDBFileReader();
            try {
              Structure s = reader.getStructure(file);
              BiojavaJmol jmol = new BiojavaJmol();
              jmol.setStructure(s);
              jmol.evalString("select * ; color chain;");
              jmol.evalString("select *; spacefill off; wireframe off; backbone 0.4;  ");

            } catch (Exception ex){
              ex.printStackTrace();
            }


          }
        }
      }
    });
origin: biojava/biojava

  @Override
  public void actionPerformed(ActionEvent e) {
    String cmd = e.getActionCommand();
    if ( cmd.equals("Open PDB file")){
      final JFileChooser fc = new JFileChooser();

      //					In response to a button click:
      int returnVal = fc.showOpenDialog(null);
      if ( returnVal == JFileChooser.APPROVE_OPTION) {
        File file = fc.getSelectedFile();

        PDBFileReader reader = new PDBFileReader();
        try {
          Structure s = reader.getStructure(file);
          StructureAlignmentJmol jmol = new StructureAlignmentJmol(null,null,null);
          jmol.setStructure(s);

          jmol.evalString("set antialiasDisplay on; select all;spacefill off; wireframe off; backbone off; cartoon;color cartoon chain; select ligand;wireframe 0.16;spacefill 0.5; select all; color cartoon structure;");
          jmol.evalString("save STATE state_1");
        } catch (Exception ex){
          ex.printStackTrace();
        }


      }
    }
  }
}
origin: stackoverflow.com

try{
   PDBFileReader read=new PDBFileReader();
   Structure pdb=read.getStructure(filename);
   System.out.println("PDB code :"+pdb.getPDBCode());
   List chains=Collections.synchronizedList(new ArrayList());
   chains=pdb.getChains();
   for(Iterator iter=chains.iterator();iter.hasNext();){
   Chain c=(Chain)(iter.next());
   System.out.println("Chain :"+c.getName()+"\n"+"Seq aa :"+c.getAtomSequence());
   for(int j=0;j<c.getAtomLength();j++){
     for (int k=0; k < c.getAtomGroup(j).size(); k++ ){
     Atom a=c.getAtomGroup(j).getAtom(k);
     System.out.println("Name : "+a.getName()+" X : "+a.getX()+" Y : "+a.getY()+" Z : "+a.getZ());
     }
   }
origin: biojava/biojava

/** Do a DB search with the input file against representative PDB domains
 *
 * @param cache
 * @param searchFile
 * @param outputFile
 * @throws ConfigurationException
 */
private void runDbSearch(AtomCache cache, String searchFile,
    String outputFile,int useNrCPUs, StartupParameters params) throws ConfigurationException {
  System.out.println("will use " + useNrCPUs + " CPUs.");
  PDBFileReader reader = new PDBFileReader();
  Structure structure1 = null ;
  try {
    structure1 = reader.getStructure(searchFile);
  } catch (IOException e) {
    throw new ConfigurationException("could not parse as PDB file: " + searchFile);
  }
  File searchF = new File(searchFile);
  String name1 = "CUSTOM";
  StructureAlignment algorithm =  getAlgorithm();
  MultiThreadedDBSearch dbSearch = new MultiThreadedDBSearch(name1,
      structure1,
      outputFile,
      algorithm,
      useNrCPUs,
      params.isDomainSplit());
  dbSearch.setCustomFile1(searchF.getAbsolutePath());
  dbSearch.run();
}
origin: biojava/biojava

reader.setObsoleteBehavior(cache.getObsoleteBehavior());
reader.setFileParsingParameters(cache.getFileParsingParams());
return reader.getStructure(url);
origin: biojava/biojava

Structure s1, s2;
try {
  s1 = pdbFileReader.getStructure(new ByteArrayInputStream(STANDARD_BASES[type1].getBytes()));
  s2 = pdbFileReader.getStructure(new ByteArrayInputStream(STANDARD_BASES[type2].getBytes()));
} catch (IOException e) {
  e.printStackTrace();
org.biojava.nbio.structure.ioPDBFileReadergetStructure

Popular methods of PDBFileReader

  • <init>
    Constructs a new PDBFileReader, initializing the extensions member variable. The path is initialized
  • getStructureById
  • setPath
  • addExtension
  • getFileParsingParameters
  • prefetchStructure
  • setFetchBehavior
  • setFileParsingParameters
  • setObsoleteBehavior

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JFileChooser (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now