Class SimpleMMcifParser
java.lang.Object
org.biojava.nbio.structure.io.mmcif.SimpleMMcifParser
- All Implemented Interfaces:
MMcifParser
A simple mmCif file parser
Usage:
String file = "path/to/mmcif/file"; StructureIOFile pdbreader = new MMCIFFileReader(); Structure s = pdbreader.getStructure(file); System.out.println(s); // you can convert it to a PDB file... System.out.println(s.toPDB());For more documentation see http://biojava.org/wiki/BioJava:CookBook#Protein_Structure.
- Since:
- 1.7
- Author:
- Andreas Prlic, Jose Duarte
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMMcifConsumer
(MMcifConsumer consumer) Add a MMcifConsumer that listens to even being triggered by the parser and processes the data into a backend provided by the Consumer.void
Remove all consumers from the parser.static void
void
parse
(BufferedReader buf) Start the actual parsing.void
parse
(InputStream inStream) Start the actual parsing.void
removeMMcifConsumer
(MMcifConsumer consumer) remove a single consumer from the parservoid
void
void
void
triggerNewAtomSites
(AtomSites atomSites) void
void
void
triggerNewEntity
(Entity entity) void
triggerNewEntityPolySeq
(EntityPolySeq epolseq) void
triggerNewEntitySrcGen
(EntitySrcGen entitySrcGen) void
triggerNewEntitySrcNat
(EntitySrcNat entitySrcNat) void
triggerNewEntitySrcSyn
(EntitySrcSyn entitySrcSyn) void
void
triggerNewPdbxStructOper
(PdbxStructOperList structOper) void
void
triggerNewStructAsym
(StructAsym sasym) void
void
triggerNewStructNcsOper
(StructNcsOper sNcsOper)
-
Field Details
-
MMCIF_TOP_HEADER
The header appearing at the beginning of a mmCIF file. A "block code" can be added to it of no more than 32 chars. See http://www.iucr.org/__data/assets/pdf_file/0019/22618/cifguide.pdf- See Also:
-
COMMENT_CHAR
- See Also:
-
LOOP_START
- See Also:
-
FIELD_LINE
- See Also:
-
STRING_LIMIT
Quoting character ; (multi-line quoting)- See Also:
-
-
Constructor Details
-
SimpleMMcifParser
public SimpleMMcifParser()
-
-
Method Details
-
addMMcifConsumer
Description copied from interface:MMcifParser
Add a MMcifConsumer that listens to even being triggered by the parser and processes the data into a backend provided by the Consumer.- Specified by:
addMMcifConsumer
in interfaceMMcifParser
- Parameters:
consumer
- a consumer object.
-
clearConsumers
public void clearConsumers()Description copied from interface:MMcifParser
Remove all consumers from the parser.- Specified by:
clearConsumers
in interfaceMMcifParser
-
removeMMcifConsumer
Description copied from interface:MMcifParser
remove a single consumer from the parser- Specified by:
removeMMcifConsumer
in interfaceMMcifParser
-
main
-
parse
Description copied from interface:MMcifParser
Start the actual parsing. The parser will trigger events that are defined by the MMcifConsumer class.- Specified by:
parse
in interfaceMMcifParser
- Parameters:
inStream
- InputStream to parse from.- Throws:
IOException
-
parse
Description copied from interface:MMcifParser
Start the actual parsing. The parser will trigger events that are defined by the MMcifConsumer class.- Specified by:
parse
in interfaceMMcifParser
- Parameters:
buf
- a BufferedReader.- Throws:
IOException
-
triggerNewPdbxStructOper
-
triggerNewStructNcsOper
-
triggerNewAtomSites
-
triggerGeneric
-
triggerNewEntity
-
triggerNewEntityPolySeq
-
triggerNewEntitySrcGen
-
triggerNewEntitySrcNat
-
triggerNewEntitySrcSyn
-
triggerNewChemComp
-
triggerNewStructAsym
-
triggerNewPdbxEntityNonPoly
-
triggerNewStructKeywords
-
triggerNewRefine
-
triggerDocumentStart
public void triggerDocumentStart() -
triggerDocumentEnd
public void triggerDocumentEnd() -
triggerNewChemCompDescriptor
-