congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
PDBFileReader.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.biojava.nbio.structure.io.PDBFileReader
constructor

Best Java code snippets using org.biojava.nbio.structure.io.PDBFileReader.<init> (Showing top 18 results out of 315)

origin: biojava/biojava

String fileFormat = (String)fileType.getSelectedItem();
if ( fileFormat.equals(UserConfiguration.PDB_FORMAT)){
  reader = new PDBFileReader();
} else if ( fileFormat.equals(UserConfiguration.MMCIF_FORMAT)){
  reader = new MMCIFFileReader();
origin: biojava/biojava

private Structure getStructure(AtomCache cache, String name1, String file)
  PDBFileReader reader = new PDBFileReader();
  if ( file != null ){
    try {
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

private Structure loadCustomStructure(String userPath2, String userChain2) throws StructureException{
  StructureIOFile reader = new PDBFileReader();
  Structure s = null;
  try {
    s = reader.getStructure(userPath2);
  } catch (IOException  e){
    //e.printStackTrace();
    throw new StructureException(e);
  }
  return StructureTools.getReducedStructure(s, userChain2);
}
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

protected Structure loadStructureFromPdbByPdbId(String pdbId) throws IOException, StructureException {
  logger.debug("Loading structure {} from PDB file {}.", pdbId, path);
  Structure s;
  flagLoading(pdbId);
  try {
    PDBFileReader reader = new PDBFileReader(path);
    reader.setFetchBehavior(fetchBehavior);
    reader.setObsoleteBehavior(obsoleteBehavior);
    reader.setFileParsingParameters(params);
    s = reader.getStructureById(pdbId.toLowerCase());
  } finally {
    flagLoadingFinished(pdbId);
  }
  return s;
}
origin: biojava/biojava

PDBFileReader reader = new PDBFileReader(dir);
origin: biojava/biojava

PDBFileReader pdbr = new PDBFileReader();
pdbr.setPath("/Users/andreas/WORK/PDB/");
origin: biojava/biojava

public static void main(String[] args){
    PDBFileReader pdbr = new PDBFileReader();
origin: biojava/biojava

PDBFileReader reader = new PDBFileReader();
origin: pcingola/SnpEff

pdbreader = new PDBFileReader();
origin: biojava/biojava

public static void main(String[] args){
  try {
    PDBFileReader pdbr = new PDBFileReader();
    pdbr.setPath("/tmp/");
    String pdbCode = "5pti";
    Structure struc = pdbr.getStructureById(pdbCode);
    BiojavaJmol jmolPanel = new BiojavaJmol();
    jmolPanel.setStructure(struc);
    // send some RASMOL style commands to Jmol
    jmolPanel.evalString("select * ; color chain;");
    jmolPanel.evalString("select *; spacefill off; wireframe off; backbone 0.4;  ");
    jmolPanel.evalString("save STATE state_1");
  } catch (Exception e){
    e.printStackTrace();
  }
}
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

public static void main(String[] args){
  PDBFileReader pdbr = new PDBFileReader();
  pdbr.setPath("/tmp/");
origin: biojava/biojava

private void checkFile(String repre) throws IOException, StructureException {
  StructureName name = new StructureName(repre);
  PDBFileReader reader = new PDBFileReader();
  reader.setFetchBehavior(FetchBehavior.FETCH_REMEDIATED);
  reader.setPath(cache.getPath());
  reader.setFileParsingParameters(cache.getFileParsingParams());
  reader.prefetchStructure(name.getPdbId());
}
origin: biojava/biojava

PDBFileReader reader = new PDBFileReader(cache.getPath());
reader.setFetchBehavior(cache.getFetchBehavior());
reader.setObsoleteBehavior(cache.getObsoleteBehavior());
origin: biojava/biojava

SuperPosition sp = new SuperPositionQCP(true);
if (type1 == null || type2 == null) return null;
PDBFileReader pdbFileReader = new PDBFileReader();
Structure s1, s2;
try {
org.biojava.nbio.structure.ioPDBFileReader<init>

Javadoc

Constructs a new PDBFileReader, initializing the extensions member variable. The path is initialized in the same way as UserConfiguration, i.e. to system property/environment variable UserConfiguration#PDB_DIR. Both autoFetch and splitDir are initialized to false

Popular methods of PDBFileReader

  • getStructure
  • getStructureById
  • setPath
  • addExtension
  • getFileParsingParameters
  • prefetchStructure
  • setFetchBehavior
  • setFileParsingParameters
  • setObsoleteBehavior

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Kernel (java.awt.image)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now