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();
}
}
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
lineSplit |
| 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.io.File |
downloadPDB(java.lang.String pdbId) |
FileParsingParameters |
getFileParsingParameters()
Get the parameters that should be used for file parsing
|
SimpleMMcifConsumer |
getMMcifConsumer() |
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.
|
boolean |
isPdbDirectorySplit()
Flag that defines if the PDB directory is containing all PDB files or is split into sub dirs (like the FTP site).
|
static void |
main(java.lang.String[] args) |
Structure |
parseFromInputStream(java.io.InputStream inStream) |
void |
setAutoFetch(boolean autoFetch)
Tell the parser to fetch missing PDB files from the FTP server automatically.
|
void |
setFileParsingParameters(FileParsingParameters params)
Set the parameters that should be used for file parsing
|
void |
setMMCifConsumer(SimpleMMcifConsumer consumer) |
void |
setPath(java.lang.String path)
Set path to file / connection string to db.
|
void |
setPdbDirectorySplit(boolean pdbDirectorySplit)
Flag that defines if the PDB directory is containing all PDB files or is split into sub dirs (like the FTP site).
|
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 Structure parseFromInputStream(java.io.InputStream inStream) throws java.io.IOException
java.io.IOExceptionpublic 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 StructureIOgetStructureById in interface StructureIOFilepdbId - a 4 letter PDB code.java.io.IOException - ...public java.io.File downloadPDB(java.lang.String pdbId)
public boolean isAutoFetch()
StructureIOFileisAutoFetch in interface StructureIOFilepublic void setAutoFetch(boolean autoFetch)
StructureIOFilesetAutoFetch in interface StructureIOFileautoFetch - flag.public boolean isPdbDirectorySplit()
isPdbDirectorySplit in interface StructureIOFilepublic void setPdbDirectorySplit(boolean pdbDirectorySplit)
setPdbDirectorySplit in interface StructureIOFilepdbDirectorySplit - boolean. If set to false all files are in one directory.public FileParsingParameters getFileParsingParameters()
StructureIOFilegetFileParsingParameters in interface StructureIOFilepublic void setFileParsingParameters(FileParsingParameters params)
StructureIOFilesetFileParsingParameters in interface StructureIOFileparams - FileParsingParameterspublic SimpleMMcifConsumer getMMcifConsumer()
public void setMMCifConsumer(SimpleMMcifConsumer consumer)