public class MMCIFFileReader extends java.lang.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(java.lang.String ext)
add a known File extension.
|
void |
clearExtensions()
clear all file extensions
|
java.lang.String |
getPath()
get the directory path to the files
|
Structure |
getStructure(java.io.File filename)
Opens filename, parses it and returns a Structure object.
|
Structure |
getStructure(java.lang.String filename)
Opens filename, parses it and returns
a Structure object .
|
Structure |
getStructureById(java.lang.String pdbId)
Get a structure by PDB code.
|
boolean |
isAutoFetch()
Fetch files automatically from FTP server.
|
static void |
main(java.lang.String[] args) |
void |
setAutoFetch(boolean autoFetch)
Tell the parser to fetch missing PDB files from the FTP server automatically.
|
void |
setPath(java.lang.String path)
Set path to file / connection string to db.
|
public static void main(java.lang.String[] args)
public void addExtension(java.lang.String ext)
StructureIOFile
addExtension
in interface StructureIOFile
ext
- a String ...public void clearExtensions()
StructureIOFile
clearExtensions
in interface StructureIOFile
public Structure getStructure(java.lang.String filename) throws java.io.IOException
getStructure
in interface StructureIOFile
filename
- a Stringjava.io.IOException
- ...public Structure getStructure(java.io.File filename) throws java.io.IOException
getStructure
in interface StructureIOFile
filename
- a File objectjava.io.IOException
- ...public void setPath(java.lang.String path)
StructureIOFile
setPath
in interface StructureIOFile
path
- a String specifying the path valuepublic java.lang.String getPath()
StructureIOFile
getPath
in interface StructureIOFile
public Structure getStructureById(java.lang.String pdbId) throws java.io.IOException
getStructureById
in interface StructureIO
pdbId
- a 4 letter PDB code.java.io.IOException
- ...public boolean isAutoFetch()
StructureIOFile
isAutoFetch
in interface StructureIOFile
public void setAutoFetch(boolean autoFetch)
StructureIOFile
setAutoFetch
in interface StructureIOFile
autoFetch
- flag.