XYZChemModel(InputStream is) throws Exception {
  this();
  StreamTokenizer st=new StreamTokenizer(new BufferedReader(new InputStreamReader(is,"UTF-8")));
  st.eolIsSignificant(true);
  st.commentChar('#');
  try {
    scan:     while (true) {
switch (st.nextToken()) {
case StreamTokenizer.TT_EOF:
        break scan;
default :
      break;
case StreamTokenizer.TT_WORD:
    String name=st.sval;
  double x=0, y=0, z=0;
if (st.nextToken() == StreamTokenizer.TT_NUMBER) {
  x=st.nval;
  if (st.nextToken() == StreamTokenizer.TT_NUMBER) {
    y=st.nval;
    if (st.nextToken() == StreamTokenizer.TT_NUMBER) {
      z=st.nval;
    }
  }
}
addVert(name,(float)x,(float)y,(float)z);
while (st.ttype != StreamTokenizer.TT_EOL && st.ttype != StreamTokenizer.TT_EOF) {
st.nextToken();
}
}
}
is.close();
}
 catch (IOException e) {
}
if (st.ttype != StreamTokenizer.TT_EOF) {
throw new Exception(st.toString());
}
}

XYZChemModel ( InputStream is ) throws Exception { this ( ) ; StreamTokenizer st = new StreamTokenizer ( new BufferedReader ( new InputStreamReader ( is , "UTF-8" ) ) ) ; st . eolIsSignificant ( true ) ; st . commentChar ( '#' ) ; try { scan : while ( true ) { switch ( st . nextToken ( ) ) { case StreamTokenizer . TT_EOF : break scan ; default : break ; case StreamTokenizer . TT_WORD : String name = st . sval ; double x = 0 , y = 0 , z = 0 ; if ( st . nextToken ( ) == StreamTokenizer . TT_NUMBER ) { x = st . nval ; if ( st . nextToken ( ) == StreamTokenizer . TT_NUMBER ) { y = st . nval ; if ( st . nextToken ( ) == StreamTokenizer . TT_NUMBER ) { z = st . nval ; } } } addVert ( name , ( float ) x , ( float ) y , ( float ) z ) ; while ( st . ttype != StreamTokenizer . TT_EOL && st . ttype != StreamTokenizer . TT_EOF ) { st . nextToken ( ) ; } } } is . close ( ) ; } catch ( IOException e ) { } if ( st . ttype != StreamTokenizer . TT_EOF ) { throw new Exception ( st . toString ( ) ) ; } }
create a chemical model by parsing an input stream
