44import java .io .InputStream ;
55
66import org .biojava .nbio .structure .Structure ;
7+ import org .biojava .nbio .structure .align .util .UserConfiguration ;
78import org .biojava .nbio .structure .io .mmtf .MmtfActions ;
89
910/**
@@ -18,14 +19,32 @@ public class MMTFFileReader extends LocalPDBDirectory {
1819 public static final String [] MMTF_OBSOLETE_DIR = new String []{"data" ,"structures" ,"obsolete" ,"mmtf" };
1920
2021 public static void main (String [] args ) throws Exception {
21-
2222 MMTFFileReader reader = new MMTFFileReader ();
2323 FileParsingParameters params = new FileParsingParameters ();
2424 reader .setFileParsingParameters (params );
2525 Structure struc = reader .getStructureById ("1m4x" );
2626 System .out .println (struc );
2727 }
2828
29+ /**
30+ * Constructs a new {@link MMTFFileReader}, initializing the extensions member variable.
31+ * The path is initialized in the same way as {@link UserConfiguration},
32+ * i.e. to system property/environment variable {@link UserConfiguration#PDB_DIR}.
33+ * Both autoFetch and splitDir are initialized to false
34+ */
35+ public MMTFFileReader () {
36+ this (null );
37+ }
38+
39+ /**
40+ * Constructs a new {@link MMTFFileReader}, initializing the extensions member variable.
41+ * The path is initialized to the given path, both autoFetch and splitDir are initialized to false.
42+ */
43+ public MMTFFileReader (String path ) {
44+ super (path );
45+ addExtension (".mmtf" );
46+ addExtension (".mmtf.gz" );
47+ }
2948
3049 @ Override
3150 public Structure getStructure (InputStream inStream ) throws IOException {
0 commit comments