org.biojava.bio.structure.io
public class MMCIFFileReader extends Object implements StructureIOFile
public static void main(String[] args){ String filename = "/path/to/something.cif.gz" ; StructureIOFile reader = new MMCIFFileReader(); try{ Structure struc = reader.getStructure(filename); System.out.println(struc); } catch (Exception e) { e.printStackTrace(); } }
Constructor and Description |
---|
MMCIFFileReader() |
Modifier and Type | Method and Description |
---|---|
void |
addExtension(String ext)
add a known File extension.
|
void |
clearExtensions()
clear all file extensions
|
String |
getPath()
get the directory path to the files
|
Structure |
getStructure(File filename)
Opens filename, parses it and returns a Structure object.
|
Structure |
getStructure(String filename)
Opens filename, parses it and returns
a Structure object .
|
Structure |
getStructureById(String pdbId)
Get a structure by PDB code.
|
boolean |
isAutoFetch()
Fetch files automatically from FTP server.
|
static void |
main(String[] args) |
void |
setAutoFetch(boolean autoFetch)
Tell the parser to fetch missing PDB files from the FTP server automatically.
|
void |
setPath(String path)
Set path to file / connection string to db.
|
public static void main(String[] args)
public void addExtension(String ext)
StructureIOFile
addExtension
in interface StructureIOFile
ext
- a String ...public void clearExtensions()
StructureIOFile
clearExtensions
in interface StructureIOFile
public Structure getStructure(String filename) throws IOException
getStructure
in interface StructureIOFile
filename
- a StringIOException
- ...public Structure getStructure(File filename) throws IOException
getStructure
in interface StructureIOFile
filename
- a File objectIOException
- ...public void setPath(String path)
StructureIOFile
setPath
in interface StructureIOFile
path
- a String specifying the path valuepublic String getPath()
StructureIOFile
getPath
in interface StructureIOFile
public Structure getStructureById(String pdbId) throws IOException
getStructureById
in interface StructureIO
pdbId
- a 4 letter PDB code.IOException
- ...public boolean isAutoFetch()
StructureIOFile
isAutoFetch
in interface StructureIOFile
public void setAutoFetch(boolean autoFetch)
StructureIOFile
setAutoFetch
in interface StructureIOFile
autoFetch
- flag.