/** * <scalar>******************************************</scalar> <scalar>Gaussian 03: * AM64L-G03RevE.01 11-Sep-2007</scalar> <scalar>30-Mar-2009</scalar> * <scalar>******************************************</scalar> */ private CMLModule readVersion() { CMLModule module = new CMLModule(); module.setDictRef("gaussian:version"); String version = ""; while (true) { readLine(); if (line.trim().startsWith("*****************")) { // LOG.debug("read VERSION to: "+line); break; } version += line; } CMLScalar scalar = new CMLScalar(version); module.appendChild(scalar); return module; }
/** * <scalar>----------------------------------------------------------------------</scalar> * <scalar>#p uB971/6-311+G(d,p) opt=(Tight, NewEstmFC, MaxCyc = 200) freq #GFInp</scalar> * <scalar>ut Population=Regular #Integral(Grid=UltraFine) Guess=Mix NoSymmetry</scalar> * <scalar>----------------------------------------------------------------------</scalar> */ private CMLModule readParams() { CMLModule module = new CMLModule(); module.setDictRef("gaussian:params"); String params = ""; while (true) { readLine(); if (line.trim().startsWith("------------------")) { // LOG.debug("read PARAMS to: "+line); break; } params += line; } CMLScalar scalar = new CMLScalar(params); module.appendChild(scalar); return module; }
/** * <scalar>1/6=200,7=10,10=7,14=-1,18=20,26=3,38=1/1,3;</scalar> * <scalar>2/9=110,15=1,17=6,18=5,40=1/2;</scalar> * <scalar>3/5=4,6=6,7=111,11=2,16=1,24=10,25=1,30=1,74=-20,75=5/1,2,3;</scalar> * <scalar>4/7=2,9=2,13=1/1;</scalar> <scalar>5/5=2,38=5/2;</scalar> <scalar>6/28=1/1;</scalar> * <scalar>7/29=1,30=1/1,2,3,16;</scalar> <scalar>1/6=200,10=7,14=-1,18=20/3(3);</scalar> * <scalar>2/9=110,15=1/2;</scalar> <scalar>6/19=2,28=1/1;</scalar> <scalar>99//99;</scalar> * <scalar>2/9=110,15=1/2;</scalar> * <scalar>3/5=4,6=6,7=111,11=2,16=1,25=1,30=1,74=-20,75=5/1,2,3;</scalar> * <scalar>4/5=5,7=2,9=2,16=3/1;</scalar> <scalar>5/5=2,38=5/2;</scalar> * <scalar>7/30=1/1,2,3,16;</scalar> <scalar>1/6=200,14=-1,18=20/3(-5);</scalar> * <scalar>2/9=110,15=1/2;</scalar> <scalar>6/19=2,28=1/1;</scalar> <scalar>99/9=1/99;</scalar> * * @return */ private CMLElement readLinkCommands() { CMLModule cmlModule = new CMLModule(); cmlModule.setDictRef("gaussian:links"); while (true) { readLine(); Matcher matcher = LINK_PATTERN.matcher(line); if (!matcher.matches()) { line_num--; break; } String overlayS = matcher.group(1); String pS = matcher.group(2); String[] params = (pS == null) ? null : pS.split(CMLConstants.S_COMMA); String jumpS = matcher.group(7); String sub = matcher.group(4); String[] subOver = sub.split(CMLConstants.S_COMMA); for (String s : subOver) { s = (s.length() == 2) ? s : "0" + s; String ss = overlayS + s; CMLModule overlayModule = new CMLModule(); cmlModule.appendChild(overlayModule); overlayModule.setTitle(overlayS); overlayModule.setDictRef("gaussian:link" + ss); if (params != null) { for (String param : params) { String[] ll = param.split(CMLConstants.S_EQUALS); CMLParameter parameter = new CMLParameter(); parameter.setDictRef("gaussian:p" + ll[0]); parameter.setCMLValue(ll[1]); overlayModule.appendChild(parameter); } } if (jumpS != null) { CMLParameter parameter = new CMLParameter(); parameter.setDictRef("gaussian:jump"); parameter.setCMLValue(jumpS); overlayModule.appendChild(parameter); } } } return cmlModule; }