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)
StructureIOFileaddExtension in interface StructureIOFileext - a String ...public void clearExtensions()
StructureIOFileclearExtensions in interface StructureIOFilepublic Structure getStructure(java.lang.String filename) throws java.io.IOException
getStructure in interface StructureIOFilefilename - a Stringjava.io.IOException - ...public Structure getStructure(java.io.File filename) throws java.io.IOException
getStructure in interface StructureIOFilefilename - a File objectjava.io.IOException - ...public void setPath(java.lang.String path)
StructureIOFilesetPath in interface StructureIOFilepath - a String specifying the path valuepublic java.lang.String getPath()
StructureIOFilegetPath in interface StructureIOFilepublic Structure getStructureById(java.lang.String pdbId) throws java.io.IOException
getStructureById in interface StructureIOpdbId - a 4 letter PDB code.java.io.IOException - ...public boolean isAutoFetch()
StructureIOFileisAutoFetch in interface StructureIOFilepublic void setAutoFetch(boolean autoFetch)
StructureIOFilesetAutoFetch in interface StructureIOFileautoFetch - flag.