Commits

gigadot committed 3e5a205

Semantic Data Converters.

Comments (0)

Files changed (20)

+glob:.svn
+glob:target
+glob:__Test__*
+glob:*.tokens
+glob:*Lexer.java
+glob:*Parser.java
+glob:classes
+glob:.settings
+glob:.classpath
+glob:.project
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>gigadot.semsci-converters</groupId>
+	<artifactId>semsci-converters-pom</artifactId>
+	<packaging>pom</packaging>
+	<name>SemSci Converters</name>
+	<version>0.1-SNAPSHOT</version>
+	<description>Semantic Data Converters</description>
+	<modules>
+		<module>semsci-converters-chem</module>
+	</modules>
+	<repositories>
+		<repository>
+			<id>ucc-repo</id>
+			<url>http://maven.ch.cam.ac.uk/m2repo</url>
+		</repository>
+	</repositories>
+</project>

semsci-converters-chem/pom.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>gigadot.semsci-converters</groupId>
+		<artifactId>semsci-converters-pom</artifactId>
+		<version>0.1-SNAPSHOT</version>
+	</parent>
+	<groupId>gigadot.semsci-converters</groupId>
+	<artifactId>semsci-converters-chem</artifactId>
+	<version>0.1-SNAPSHOT</version>
+	<name>SemSci Converters - Chemistry</name>
+	<url>http://maven.apache.org</url>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.0.2</version>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>xom</groupId>
+			<artifactId>xom</artifactId>
+			<version>1.2.5</version>
+			<type>jar</type>
+		</dependency>
+		<dependency>
+			<groupId>gigadot.semsci</groupId>
+			<artifactId>semsci-chemistry</artifactId>
+			<version>0.1-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>cml</groupId>
+			<artifactId>cmlxom</artifactId>
+			<version>2.5.1-SNAPSHOT</version>
+			<type>jar</type>
+			<exclusions>
+				<exclusion>
+					<artifactId>log4j</artifactId>
+					<groupId>log4j</groupId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>1.4</version>
+		</dependency>
+		<dependency>
+			<groupId>cml</groupId>
+			<artifactId>jumbo</artifactId>
+			<version>5.5.1-SNAPSHOT</version>
+			<type>jar</type>
+		</dependency>
+		<dependency>
+			<groupId>cml</groupId>
+			<artifactId>jumbo-converters</artifactId>
+			<version>0.2-SNAPSHOT</version>
+			<exclusions>
+				<exclusion>
+					<artifactId>log4j</artifactId>
+					<groupId>log4j</groupId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.hamcrest</groupId>
+			<artifactId>hamcrest-all</artifactId>
+			<version>1.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>owlapi</groupId>
+			<artifactId>owlapi</artifactId>
+			<version>2.2.0</version>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.16</version>
+			<type>jar</type>
+		</dependency>
+		<dependency>
+			<groupId>com.hp.hpl.jena</groupId>
+			<artifactId>jena</artifactId>
+			<version>2.6.3</version>
+			<exclusions>
+				<exclusion>
+					<artifactId>log4j</artifactId>
+					<groupId>log4j</groupId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+	</dependencies>
+	<repositories>
+		<repository>
+			<id>ch.cam.ac.uk</id>
+			<url>https://maven.ch.cam.ac.uk/m2repo</url>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+		</repository>
+		<repository>
+			<id>como-maven2</id>
+			<url>http://como.cheng.cam.ac.uk/maven2</url>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+		</repository>
+		<repository>
+			<id>com.hp.hpl.jena</id>
+			<url>http://openjena.org/repo</url>
+		</repository>
+	</repositories>
+</project>
+
+
+
+
+
+

semsci-converters-chem/src/main/java/gigadot/semsci/converters/chem/CompChemCML2RDF.java

+package gigadot.semsci.converters.chem;
+
+import gigadot.semsci.converters.chem.exception.UnexpectedCompChemSchema;
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.ModelFactory;
+import com.hp.hpl.jena.rdf.model.RDFList;
+import com.hp.hpl.jena.rdf.model.RDFNode;
+import com.hp.hpl.jena.rdf.model.Resource;
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import nu.xom.Document;
+import nu.xom.Element;
+import nu.xom.Nodes;
+import nu.xom.ParsingException;
+import nu.xom.ValidityException;
+import org.apache.log4j.Logger;
+import org.xmlcml.cml.base.CMLBuilder;
+import org.xmlcml.cml.base.CMLElement;
+import org.xmlcml.cml.base.CMLNamespace;
+import org.xmlcml.cml.converters.AbstractConverter;
+import org.xmlcml.cml.converters.Type;
+import org.xmlcml.cml.element.CMLCml;
+import org.xmlcml.cml.element.CMLModule;
+import org.xmlcml.cml.element.CMLMolecule;
+import org.xmlcml.cml.element.CMLParameter;
+import org.xmlcml.cml.element.CMLParameterList;
+import org.xmlcml.cml.element.CMLProperty;
+import org.xmlcml.cml.element.CMLPropertyList;
+import org.xmlcml.cml.interfacex.HasDictRef;
+import gigadot.semsci.chem.dictionary.DictionaryCollection;
+import gigadot.semsci.converters.chem.tools.SemMoleculeTool;
+import gigadot.semsci.converters.chem.tools.SemParameterTool;
+import gigadot.semsci.converters.chem.tools.SemPropertyTool;
+import gigadot.semsci.converters.chem.uri.DefaultURIUUIDGenerator;
+import gigadot.semsci.converters.chem.uri.HasURIGenerator;
+import gigadot.semsci.converters.chem.uri.URIGenerator;
+import gigadot.semsci.chem.schema.CompChemSematics;
+
+/**
+ *
+ * @author wp214
+ */
+public class CompChemCML2RDF extends AbstractConverter implements HasURIGenerator {
+
+    private Logger logger = Logger.getLogger(getClass());
+    private DictionaryCollection dictionaryCollection = null;
+    private URIGenerator uriGen = new DefaultURIUUIDGenerator();
+
+    public Model createCompChemModel(CMLCml cml) throws UnexpectedCompChemSchema {
+        Model compchemModel = null;
+        // expecting cml container to contain only one joblist module
+        Nodes joblist_nodes = cml.query("/cml:cml/cml:module[@role='joblist']", CMLNamespace.CML_XPATH);
+        if (joblist_nodes.size() == 1) {
+            compchemModel = ModelFactory.createDefaultModel();
+            setupNsprefixes(compchemModel);
+
+            // N3:    <./target/CH4.cml> a cml:dataResource.
+            String path_uri = getURIGenerator().createCMLURL(cml).toString();
+            Resource path_res = compchemModel.createResource(path_uri, CompChemSematics.cmlrdfDataResource);
+
+            // N3:   jim:computation
+            // N3:       a qm:Computation;
+            Resource unq_com_res = compchemModel.createResource(
+                    createUUIDURIString(cml), CompChemSematics.qmComputation);
+            // N3:       cml:representedBy <./target/CH4.cml>;
+            unq_com_res.addProperty(CompChemSematics.cmlrdfRepresentedBy, path_res);
+            // N3:       qm:jobs ( jim:job1 ).
+
+            CMLModule joblist_mod = (CMLModule) joblist_nodes.get(0);
+            // expecting a series of job module
+            Nodes job_nodes = joblist_mod.query("./cml:module[@role='job']", CMLNamespace.CML_XPATH);
+            List<RDFNode> jobs_rdf_list = new ArrayList<RDFNode>(job_nodes.size());
+            for (int i = 0; i < job_nodes.size(); i++) {
+                CMLModule job_mod = (CMLModule) job_nodes.get(i);
+
+                CMLModule init_mod = extractTaskFromJob(job_mod, "init");
+                Resource unq_jinit_res = createInitTaskResource(compchemModel, init_mod);
+
+                CMLModule opt_mod = extractTaskFromJob(job_mod, "optimization");
+                Resource unq_jopt_res = null;
+                if (opt_mod != null) {
+                    unq_jopt_res = createOptimizationTaskResource(compchemModel, opt_mod);
+                }
+
+                CMLModule final_mod = extractTaskFromJob(job_mod, "final");
+                Resource unq_jfinal_res = createFinalTaskResource(compchemModel, final_mod);
+
+                Resource unq_job_res = createJobResource(compchemModel, job_mod, unq_jinit_res, unq_jopt_res, unq_jfinal_res);
+
+                jobs_rdf_list.add(unq_job_res);
+            }
+            Iterator<RDFNode> jobs_rdf_iter = jobs_rdf_list.iterator();
+            RDFList job_list = compchemModel.createList(jobs_rdf_iter);
+            unq_com_res.addProperty(CompChemSematics.qmJobs, job_list);
+        } else {
+            // This cannot check whether there are other type of cml elements or not.
+            // This method ensures that compchemModel is never be null.
+            throw new UnexpectedCompChemSchema("CompChem CML can only contain 1 joblist module.");
+        }
+        return compchemModel;
+    }
+
+    private Resource createInitTaskResource(Model compchemModel, CMLModule init_mod) {
+        // N3:   jim:j1init
+        // N3:       a qm:Initialization;
+        Resource unq_jinit_res = compchemModel.createResource(createUUIDURIString(init_mod), CompChemSematics.qmInitialization);
+        // N3:       qm:hasGeometry [
+        // N3:           a chem:MolecularEntity;
+        // N3:           cml:representedBy <./target/CH4init.cml> ] ;
+        CMLMolecule molecule = (CMLMolecule) init_mod.getFirstCMLChild(CMLMolecule.TAG);
+        SemMoleculeTool semTool = SemMoleculeTool.getOrCreateTool(molecule, getURIGenerator());
+        Resource bnode_geo_res = semTool.getResource(compchemModel);
+        unq_jinit_res.addProperty(CompChemSematics.qmHasGeometry, bnode_geo_res);
+
+        CMLParameterList init_params = (CMLParameterList) init_mod.getFirstCMLChild(CMLParameterList.TAG);
+        List params = init_params.getParameterDescendants();
+        addPropertyOrParameterResourcesToTask(params, unq_jinit_res);
+        return unq_jinit_res;
+    }
+
+    private Resource createOptimizationTaskResource(Model compchemModel, CMLModule opt_mod) {
+        // N3:   jim:j1opt
+        // N3:       a qm:Optimization;
+        Resource unq_jopt_res = compchemModel.createResource(createUUIDURIString(opt_mod), CompChemSematics.qmOptimization);
+        // N3:       qm:hasSteps ( jim:step1 jim:step2 ) .
+        Nodes step_nodes = opt_mod.query("./cml:module[@role='step']", CMLNamespace.CML_XPATH);
+        List<RDFNode> step_rdf_list = new ArrayList<RDFNode>(step_nodes.size());
+        for (int j = 0; j < step_nodes.size(); j++) {
+            CMLModule step_mod = (CMLModule) step_nodes.get(j);
+            CMLPropertyList prop_list = (CMLPropertyList) step_mod.getFirstCMLChild(CMLPropertyList.TAG);
+            // N3:    jim:step2
+            // N3:       a qm:OptimizationStep;
+            Resource unq_opt_step_res = compchemModel.createResource(createUUIDURIString(step_mod), CompChemSematics.qmOptimizationStep);
+            // N3:       qm:scfEnergy [
+            // N3:           a cml:Property ;
+            // N3:           cml:hasValue "-40.5111790287"^^xsd:double;
+            // N3:           cml:hasUnits cml:molarEnergy ] .
+            List props = prop_list.getPropertyDescendants();
+            addPropertyOrParameterResourcesToTask(props, unq_opt_step_res);
+            step_rdf_list.add(unq_opt_step_res);
+        }
+        Iterator<RDFNode> step_rdf_iter = step_rdf_list.iterator();
+        RDFList step_list = compchemModel.createList(step_rdf_iter);
+        unq_jopt_res.addProperty(CompChemSematics.qmHasSteps, step_list);
+        return unq_jopt_res;
+    }
+
+    private Resource createFinalTaskResource(Model compchemModel, CMLModule final_mod) {
+        // N3:   jim:j1final
+        // N3:       a qm:FinalResult;
+        Resource unq_jfinal_res = compchemModel.createResource(createUUIDURIString(final_mod), CompChemSematics.qmFinalResult);
+        // N3:       qm:hasGeometry jim:mol2;
+        CMLMolecule molecule = (CMLMolecule) final_mod.getFirstCMLChild(CMLMolecule.TAG);
+        SemMoleculeTool semTool = SemMoleculeTool.getOrCreateTool(molecule, getURIGenerator());
+        Resource bnode_geo_res = semTool.getResource(compchemModel);
+        unq_jfinal_res.addProperty(CompChemSematics.qmHasGeometry, bnode_geo_res);
+
+        CMLPropertyList final_proplist = (CMLPropertyList) molecule.getFirstCMLChild(CMLPropertyList.TAG);
+        List props = final_proplist.getPropertyDescendants();
+        addPropertyOrParameterResourcesToTask(props, unq_jfinal_res);
+        return unq_jfinal_res;
+    }
+
+    private Resource createJobResource(Model compchemModel, CMLModule job_mod, Resource unq_jinit_res, Resource unq_jopt_res, Resource unq_jfinal_res) {
+        // N3:   jim:job1
+        // N3:       a qm:ComputationalJob;
+        Resource unq_job_res = compchemModel.createResource(createUUIDURIString(job_mod), CompChemSematics.qmComputationJob);
+        // N3:       qm:hasInitialisation jim:j1init;
+        unq_job_res.addProperty(CompChemSematics.qmHasInitialisation, unq_jinit_res);
+        // N3:       qm:hasOptimization jim:j1opt;
+        if (unq_jopt_res != null) {
+            unq_job_res.addProperty(CompChemSematics.qmHasOptimization, unq_jopt_res);
+        }
+        unq_job_res.addProperty(CompChemSematics.qmHasFinalResult, unq_jfinal_res);
+        return unq_job_res;
+    }
+
+    private void addPropertyOrParameterResourcesToTask(List<CMLElement> props, Resource unq_jtask_res) {
+        for (int j = 0; j < props.size(); j++) {
+            // N3:   # What should we do about "unknown:unknown" units?
+            // N3:       qm:dipole [
+            // N3:           a cml:Vector3 ;
+            // N3:           cml:hasValue ("1.51313187E-6" "-2.06531504E-7" "-1.331166E-7") ] .
+            HasDictRef pp = (HasDictRef) props.get(j);
+            String qmPredicate = formatDictRefToQMPredicate(pp.getDictRef());
+            Resource bnode_pp_res = null;
+            if (pp instanceof CMLProperty) {
+                CMLProperty property = (CMLProperty) pp;
+                SemPropertyTool semTool = SemPropertyTool.getOrCreateTool(property);
+                bnode_pp_res = semTool.getResource(unq_jtask_res.getModel());
+            } else if (pp instanceof CMLParameter) {
+                CMLParameter parameter = (CMLParameter) pp;
+                SemParameterTool semTool = SemParameterTool.getOrCreateTool(parameter);
+                bnode_pp_res = semTool.getResource(unq_jtask_res.getModel());
+            }
+            if (bnode_pp_res != null) {
+                unq_jtask_res.addProperty(CompChemSematics.qmProperty(qmPredicate), bnode_pp_res);
+            }
+        }
+    }
+
+    private CMLModule extractTaskFromJob(CMLModule job_mod, String role) throws UnexpectedCompChemSchema {
+        Nodes task_nodes = job_mod.query("./cml:module[@role='" + role + "']", CMLNamespace.CML_XPATH);
+        if (task_nodes.size() == 1) {
+            return (CMLModule) task_nodes.get(0);
+        } else if (task_nodes.size() == 0) {
+            return null;
+        } else {
+            throw new UnexpectedCompChemSchema("CompChem CML can only contain 1 " + role + " module.");
+        }
+    }
+
+    private String formatDictRefToQMPredicate(String dictRef) {
+        String[] parts = dictRef.split("[:]");
+        if (parts.length == 2) {
+            return parts[1].replaceAll("\\.", "_");
+        } else {
+            throw new RuntimeException("Cannot format dictref : " + dictRef);
+        }
+    }
+
+    /**
+     * Setup prefixes for model. This is only for output to RDF, N3, etc.
+     * @param compchemModel
+     */
+    private void setupNsprefixes(Model compchemModel) {
+        compchemModel.setNsPrefix("cml", CompChemSematics.CML_SCHEMA_NS);
+        compchemModel.setNsPrefix("cmlrdf", CompChemSematics.CMLRDF_SCHEMA_NS);
+        compchemModel.setNsPrefix("qm", CompChemSematics.CMLQMRDF_SCHEMA_NS);
+        compchemModel.setNsPrefix("chem", CompChemSematics.CMLAXIOM_NS);
+        compchemModel.setNsPrefix("xsd", CompChemSematics.XSD_NS);
+        compchemModel.setNsPrefix("rdf", CompChemSematics.RDF_NS);
+    }
+
+    /**
+     * This has to be uri generator or something.
+     * @param local
+     * @return
+     */
+    public final String createUUIDURIString(CMLElement element) {
+        String computationInstance = getURIGenerator().createUUIDURI(element).toString();
+        return computationInstance.toString();
+    }
+
+    private void loadDictionaries() {
+        dictionaryCollection = new DictionaryCollection();
+        dictionaryCollection.loadDictionary(DictionaryCollection.CompChemLocation);
+        dictionaryCollection.loadDictionary(DictionaryCollection.PropertyLocation);
+        dictionaryCollection.loadDictionary(DictionaryCollection.PropertyG03Location);
+    }
+
+    @Override
+    public int getConverterVersion() {
+        return 1;
+    }
+
+    public Type getOutputType() {
+        return Type.RDFXML;
+    }
+
+    public Type getInputType() {
+        return Type.CML;
+    }
+
+    @Override
+    public Element convertToXML(Element xml) {
+        Model compchemModel = null;
+        try {
+            loadDictionaries();
+            CMLBuilder bu = new CMLBuilder();
+            Document doc = null;
+            try {
+                doc = bu.build(xml.toXML(), "");
+            } catch (ValidityException ex) {
+                throw new RuntimeException(ex);
+            } catch (ParsingException ex) {
+                throw new RuntimeException(ex);
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+            compchemModel = createCompChemModel((CMLCml) doc.getRootElement());
+        } catch (UnexpectedCompChemSchema usex) {
+            logger.error(usex);
+            throw usex;
+        }
+        return convertModelToXMLElement(compchemModel);
+    }
+
+    private Element convertModelToXMLElement(Model compchemModel) throws RuntimeException {
+        StringWriter stw = new StringWriter();
+        compchemModel.write(stw);
+        StringReader str_reader = new StringReader(stw.toString());
+        Document doc = null;
+        CMLBuilder parser = new CMLBuilder();
+        try {
+            doc = parser.build(str_reader);
+            return doc.getRootElement();
+        } catch (ValidityException ex) {
+            throw new RuntimeException("Fatal error - rdf is invalid : this should never happen if model is output in xml.", ex);
+        } catch (ParsingException ex) {
+            throw new RuntimeException("Fatal error in parsing rdf model to xom document : this should never happen if model is output in xml.", ex);
+        } catch (IOException ex) {
+            throw new RuntimeException("Fatal error in IO when parsing rdf model to xom document : this should never happen if model is output in xml.", ex);
+        }
+    }
+
+    @Override
+    public void setURIGenerator(URIGenerator uriGen) {
+        this.uriGen = uriGen;
+    }
+
+    @Override
+    public URIGenerator getURIGenerator() {
+        return uriGen;
+    }
+}

semsci-converters-chem/src/main/java/gigadot/semsci/converters/chem/exception/UnexpectedCompChemSchema.java

+package gigadot.semsci.converters.chem.exception;
+
+/**
+ *
+ * @author Weerapong
+ */
+public class UnexpectedCompChemSchema extends RuntimeException {
+
+    public UnexpectedCompChemSchema(Throwable cause) {
+        super(cause);
+    }
+
+    public UnexpectedCompChemSchema(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public UnexpectedCompChemSchema(String message) {
+        super(message);
+    }
+
+    public UnexpectedCompChemSchema() {
+        super();
+    }
+
+}

semsci-converters-chem/src/main/java/gigadot/semsci/converters/chem/tools/AbstractSemanticTool.java

+package gigadot.semsci.converters.chem.tools;
+
+import com.hp.hpl.jena.rdf.model.Literal;
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.Resource;
+import org.apache.log4j.Logger;
+import org.xmlcml.cml.base.AbstractTool;
+import org.xmlcml.cml.base.CMLConstants;
+import org.xmlcml.cml.base.CMLElement;
+import org.xmlcml.cml.element.CMLArray;
+import org.xmlcml.cml.element.CMLMatrix;
+import org.xmlcml.cml.element.CMLScalar;
+import org.xmlcml.cml.element.CMLVector3;
+import gigadot.semsci.converters.chem.uri.DefaultURIUUIDGenerator;
+import gigadot.semsci.converters.chem.uri.HasURIGenerator;
+import gigadot.semsci.converters.chem.uri.URIGenerator;
+import gigadot.semsci.chem.schema.CompChemSematics;
+
+/**
+ * 
+ * @author Weerapong Phadungsukanan
+ * 
+ */
+public abstract class AbstractSemanticTool extends AbstractTool implements HasURIGenerator {
+
+    protected Logger logger = Logger.getLogger(getClass());
+    protected URIGenerator uriGen = new DefaultURIUUIDGenerator();
+
+    public abstract Resource getResource(Model model);
+
+    @Override
+    public void setURIGenerator(URIGenerator uriGen) {
+        this.uriGen = uriGen;
+    }
+
+    @Override
+    public URIGenerator getURIGenerator() {
+        return uriGen;
+    }
+
+    protected static Resource getCMLTypeString(CMLElement elem) {
+        Resource res = null;
+        if (elem instanceof CMLScalar) {
+            res = CompChemSematics.cmlScalar;
+        } else if (elem instanceof CMLArray) {
+            res = CompChemSematics.cmlArray;
+        } else if (elem instanceof CMLMatrix) {
+            res = CompChemSematics.cmlMatrix;
+        } else if (elem instanceof CMLVector3) {
+            res = CompChemSematics.cmlVector3;
+        }
+        return res;
+    }
+
+    protected static Literal getXSDLiteral(CMLElement elem, Model model) {
+        String XSDDataType = null;
+        Literal val_res = null;
+        if (elem instanceof CMLScalar) {
+            CMLScalar scalar = (CMLScalar) elem;
+            XSDDataType = scalar.getDataType();
+            val_res = model.createTypedLiteral(scalar.getValue(), XSDDataType);
+        } else {
+            XSDDataType = CMLConstants.XSD_STRING;
+            val_res = model.createTypedLiteral(elem.getValue(), XSDDataType);
+        }
+        return val_res;
+    }
+}

semsci-converters-chem/src/main/java/gigadot/semsci/converters/chem/tools/SemMoleculeTool.java

+package gigadot.semsci.converters.chem.tools;
+
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.Resource;
+import org.xmlcml.cml.element.CMLMolecule;
+import gigadot.semsci.converters.chem.uri.URIGenerator;
+import gigadot.semsci.chem.schema.CompChemSematics;
+
+/**
+ * 
+ * @author Weerapong Phadungsukanan
+ * 
+ */
+public class SemMoleculeTool extends AbstractSemanticTool {
+
+    private CMLMolecule molecule = null;
+    private Resource bnode_geo_res = null;
+
+    protected SemMoleculeTool(CMLMolecule molecule) {
+        this.molecule = molecule;
+    }
+
+    public static SemMoleculeTool getOrCreateTool(CMLMolecule molecule, URIGenerator uriGen) {
+        SemMoleculeTool tool = null;
+        if (molecule != null) {
+            tool = (SemMoleculeTool) molecule.getTool();
+            if (tool == null) {
+                tool = new SemMoleculeTool(molecule);
+                tool.setURIGenerator(uriGen);
+                molecule.setTool(tool);
+            }
+        }
+        return tool;
+    }
+
+    @Override
+    public Resource getResource(Model model) {
+        if (bnode_geo_res == null) {
+            String partfinal_uri = getURIGenerator().createCMLURL(molecule).toString();
+            Resource path_res = model.createResource(partfinal_uri, CompChemSematics.cmlrdfDataResource);
+            bnode_geo_res = model.createResource(CompChemSematics.axiomMolecularEntity);
+            bnode_geo_res.addProperty(CompChemSematics.cmlrdfRepresentedBy, path_res);
+        }
+        return bnode_geo_res;
+    }
+}

semsci-converters-chem/src/main/java/gigadot/semsci/converters/chem/tools/SemParameterTool.java

+package gigadot.semsci.converters.chem.tools;
+
+import com.hp.hpl.jena.rdf.model.Literal;
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.vocabulary.RDF;
+import gigadot.semsci.converters.chem.exception.UnexpectedCompChemSchema;
+import gigadot.semsci.chem.schema.CompChemSematics;
+import java.util.List;
+import org.xmlcml.cml.base.CMLElement;
+import org.xmlcml.cml.element.CMLParameter;
+
+/**
+ * 
+ * @author Weerapong Phadungsukanan
+ * 
+ */
+public class SemParameterTool extends AbstractSemanticTool {
+
+    private CMLParameter parameter;
+    private Resource bnode_param_res = null;
+
+    protected SemParameterTool(CMLParameter property) {
+        this.parameter = property;
+    }
+
+    public static SemParameterTool getOrCreateTool(CMLParameter parameter) {
+        SemParameterTool tool = null;
+        if (parameter != null) {
+            tool = (SemParameterTool) parameter.getTool();
+            if (tool == null) {
+                tool = new SemParameterTool(parameter);
+                parameter.setTool(tool);
+            }
+        }
+        return tool;
+    }
+
+    @Override
+    public Resource getResource(Model model) {
+        if (bnode_param_res == null) {
+            List<CMLElement> list = parameter.getChildCMLElements();
+            if (list.size() == 1) {
+                // get cml type
+                CMLElement elem = list.get(0);
+                Literal val_res = getXSDLiteral(elem, model);
+
+                bnode_param_res = model.createResource(CompChemSematics.cmlrdfParameter);
+
+                bnode_param_res.addProperty(CompChemSematics.cmlrdfHasValue, val_res);
+
+                String units = elem.getAttributeValue("units");
+                if (units != null) {
+                    bnode_param_res.addProperty(CompChemSematics.cmlrdfHasUnits, units);
+                }
+
+                Resource cmlType = getCMLTypeString(elem);
+                bnode_param_res.addProperty(RDF.type, cmlType);
+            } else {
+                throw new UnexpectedCompChemSchema("Not yet support multiple elements in CMLParameter : dictRef = " + parameter.getDictRef());
+            }
+        }
+        return bnode_param_res;
+    }
+}

semsci-converters-chem/src/main/java/gigadot/semsci/converters/chem/tools/SemPropertyTool.java

+package gigadot.semsci.converters.chem.tools;
+
+import com.hp.hpl.jena.rdf.model.Literal;
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.vocabulary.RDF;
+import gigadot.semsci.converters.chem.exception.UnexpectedCompChemSchema;
+import java.util.List;
+import org.xmlcml.cml.base.CMLElement;
+import org.xmlcml.cml.element.CMLProperty;
+import gigadot.semsci.chem.schema.CompChemSematics;
+
+/**
+ * 
+ * @author Weerapong Phadungsukanan
+ * 
+ */
+public class SemPropertyTool extends AbstractSemanticTool {
+
+    private CMLProperty property;
+    private Resource bnode_prop_res = null;
+
+    protected SemPropertyTool(CMLProperty property) {
+        this.property = property;
+    }
+
+    public static SemPropertyTool getOrCreateTool(CMLProperty property) {
+        SemPropertyTool tool = null;
+        if (property != null) {
+            tool = (SemPropertyTool) property.getTool();
+            if (tool == null) {
+                tool = new SemPropertyTool(property);
+                property.setTool(tool);
+            }
+        }
+        return tool;
+    }
+
+    @Override
+    public Resource getResource(Model model) {
+        if (bnode_prop_res == null) {
+            List<CMLElement> list = property.getChildCMLElements();
+            if (list.size() == 1) {
+                // get cml value type
+                CMLElement elem = list.get(0);
+                Literal val_res = getXSDLiteral(elem, model);
+
+                bnode_prop_res = model.createResource(CompChemSematics.cmlrdfProperty);
+
+                bnode_prop_res.addProperty(CompChemSematics.cmlrdfHasValue, val_res);
+
+                String units = elem.getAttributeValue("units");
+                if (units != null) {
+                    bnode_prop_res.addProperty(CompChemSematics.cmlrdfHasUnits, units);
+                }
+
+                Resource cmlType = getCMLTypeString(elem);
+                bnode_prop_res.addProperty(RDF.type, cmlType);
+            } else {
+                throw new UnexpectedCompChemSchema("Not yet support multiple elements in CMLProperty : dictRef = " + property.getDictRef());
+            }
+        }
+        return bnode_prop_res;
+    }
+}

semsci-converters-chem/src/main/java/gigadot/semsci/converters/chem/uri/DefaultURIUUIDGenerator.java

+package gigadot.semsci.converters.chem.uri;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.UUID;
+import org.xmlcml.cml.base.CMLElement;
+
+/**
+ *
+ * @author wp214
+ */
+public class DefaultURIUUIDGenerator implements URIGenerator {
+
+    public static final String PATH_URI = "http://ch.cam.ac.uk/data/";
+
+    public URI createUUIDURI(CMLElement element) {
+        try {
+            return new URI("uri", "uuid:" + UUID.randomUUID().toString(), null);
+        } catch (URISyntaxException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     *
+     * @param subpath must not be gin with / but ends with /
+     * @return
+     */
+    public URI createCMLURL(CMLElement element) {
+        try {
+            return new URI(PATH_URI + UUID.randomUUID().toString() + ".cml");
+        } catch (URISyntaxException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static String createResourcePathURI(String path) {
+        if (path.startsWith("/")) {
+            path = path.substring(1);
+        }
+        return PATH_URI + path;
+    }
+}

semsci-converters-chem/src/main/java/gigadot/semsci/converters/chem/uri/HasURIGenerator.java

+package gigadot.semsci.converters.chem.uri;
+
+/**
+ *
+ * @author wp214
+ */
+public interface HasURIGenerator {
+
+    void setURIGenerator(URIGenerator uriGen);
+
+    URIGenerator getURIGenerator();
+}

semsci-converters-chem/src/main/java/gigadot/semsci/converters/chem/uri/URIGenerator.java

+package gigadot.semsci.converters.chem.uri;
+
+import java.net.URI;
+import org.xmlcml.cml.base.CMLElement;
+
+/**
+ *
+ * @author wp214
+ */
+public interface URIGenerator {
+
+    URI createUUIDURI(CMLElement element);
+
+    URI createCMLURL(CMLElement element);
+}

semsci-converters-chem/src/test/java/gigadot/semsci/converters/chem/uri/DefaultURIUUIDGeneratorTest.java

+package gigadot.semsci.converters.chem.uri;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class DefaultURIUUIDGeneratorTest {
+
+    private static String hexChars(int n) {
+        return HEXCHAR + "{" + n + "}";
+    }
+    private static String HEXCHAR = "[0123456789abcdefABCDEF]";
+    private static Pattern uuidRegex = Pattern.compile("uri:uuid:"
+            + hexChars(8) + "-" + hexChars(4) + "-" + hexChars(4) + "-"
+            + hexChars(4) + "-" + hexChars(12));
+
+    @Test
+    public void checkSyntax() {
+        DefaultURIUUIDGenerator uriGen = new DefaultURIUUIDGenerator();
+        String uuid = uriGen.createUUIDURI(null).toString();
+        Assert.assertTrue("UUID should match regex, but was " + uuid, uuidRegex.matcher(uuid).matches());
+    }
+
+    @Test
+    public void checkRandom() {
+        long t0 = System.currentTimeMillis();
+        int testSize = 10000;
+        Set<String> results = new HashSet<String>(testSize);
+        DefaultURIUUIDGenerator uriGen = new DefaultURIUUIDGenerator();
+        for (int i = 0; i < testSize; i++) {
+            String uuid = uriGen.createUUIDURI(null).toString();
+            Assert.assertTrue("UUID should match regex", uuidRegex.matcher(uuid).matches());
+            Assert.assertTrue(results.add(uuid));
+        }
+        System.err.println("Test for " + testSize + " took "
+                + (System.currentTimeMillis() - t0));
+    }
+}

semsci-converters-chem/src/test/resources/CH4.n3

+@prefix cml: <http://www.xmlcml.org/rdf-schema#> .
+@prefix qm: <http://www.xmlcml.org/qm-rdf-schema#> .
+@prefix jim: <tag:ojd20@cam.ac.uk,2010-02-04:#> .
+@prefix chem: <http://whatever.com/chemaxiom/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
+
+# The tag uris would be replaced by UUID URIs
+
+<./target/CH4.cml> a cml:dataResource.
+
+jim:computation
+    a qm:Computation;
+    cml:representedBy <./target/CH4.cml>;
+    qm:jobs ( jim:job1 ).
+# I've used a list for the jobs. This is very neat in Turtle. Not so much in RDF/XML.
+
+jim:job1
+    a qm:ComputationalJob;
+    qm:hasInitialisation jim:j1init;
+    qm:hasOptimization jim:j1opt;
+    qm:hasFinalResult jim:final1.
+
+jim:j1init
+    a qm:Initialization;
+    qm:hasGeometry [
+        a chem:MolecularEntity;
+        cml:representedBy <./target/CH4init.cml> ] ;
+    qm:cmdGeom [
+        a cml:Parameter ;
+        cml:hasValue "Geometry optimization" ] ;
+    qm:qmMethod [
+        a cml:Parameter ;
+        cml:hasValue "uB97-1" ] .
+
+jim:j1opt
+    a qm:Optimization;
+    qm:hasSteps ( jim:step1 jim:step2 ) .
+
+# The scfEnergies could use blank nodes, or UUID URIs as with the parameters above. Doesn't really matter too much.
+jim:step1
+    a qm:OptimizationStep;
+    qm:scfEnergy [
+        a cml:Property ;
+        cml:hasValue "-40.5111727871"^^xsd:double;
+        cml:hasUnits cml:molarEnergy ] .
+
+jim:step2
+    a qm:OptimizationStep;
+    cam:scfEnergy [
+        a cml:Property ;
+        cml:hasValue "-40.5111790287"^^xsd:double;
+        cml:hasUnits cml:molarEnergy ] .
+
+jim:final1
+    a qm:FinalResult;
+    qm:hasGeometry jim:mol2;
+# What should we do about "unknown:unknown" units?
+    qm:dipole [
+        a cml:Vector3 ;
+        cml:hasValue ("1.51313187E-6" "-2.06531504E-7" "-1.331166E-7") ] .
+
+jim:mol2
+    a chem:MolecularEntity;
+    cml:representedBy <./target/CH4final.cml> .
+

semsci-converters-chem/src/test/resources/gigadot/semsci/converters/chem/data/CH4.cml

+<?xml version="1.0" encoding="UTF-8"?>
+<cml xmlns="http://www.xml-cml.org/schema">
+  <module role="joblist">
+    <module role="job" title="job1">
+      <module role="init">
+        <molecule id="m1" formalCharge="0" spinMultiplicity="1">
+          <atomArray>
+            <atom id="a1" elementType="C" x3="1.02054" y3="-0.02666" z3="5.03634"/>
+            <atom id="a2" elementType="H" x3="1.15867" y3="0.89102" z3="5.60982"/>
+            <atom id="a3" elementType="H" x3="1.81427" y3="-0.11392" z3="4.29305"/>
+            <atom id="a4" elementType="H" x3="1.05637" y3="-0.88472" z3="5.70905"/>
+            <atom id="a5" elementType="H" x3="0.05285" y3="9.8E-4" z3="4.53344"/>
+          </atomArray>
+          <bondArray>
+            <bond atomRefs2="a1 a2" id="a1_a2" order="S"/>
+            <bond atomRefs2="a1 a3" id="a1_a3" order="S"/>
+            <bond atomRefs2="a1 a4" id="a1_a4" order="S"/>
+            <bond atomRefs2="a1 a5" id="a1_a5" order="S"/>
+          </bondArray>
+        </molecule>
+        <parameterList>
+          <parameter dictRef="cmlqm:cmd.geom">
+            <scalar dataType="xsd:string">Geometry optimization</scalar>
+          </parameter>
+          <parameter dictRef="cmlqm:qm.method">
+            <scalar dataType="xsd:string">uB97-1</scalar>
+          </parameter>
+        </parameterList>
+      </module>
+      <module role="optimization">
+        <module role="step" title="step1">
+          <propertyList>
+            <property dictRef="cmlqm:property.g03.scfenergy">
+              <scalar dataType="xsd:double" units="unit:hartree">-40.5111727871</scalar>
+            </property>
+          </propertyList>
+        </module>
+        <module role="step" title="step2">
+          <propertyList>
+            <property dictRef="cmlqm:property.g03.scfenergy">
+              <scalar dataType="xsd:double" units="unit:hartree">-40.5111790287</scalar>
+            </property>
+          </propertyList>
+        </module>
+      </module>
+      <module role="final">
+        <molecule id="m1" formalCharge="0" spinMultiplicity="1">
+          <atomArray>
+            <atom id="a1" elementType="C" x3="1.02054" y3="-0.02666" z3="5.03634"/>
+            <atom id="a2" elementType="H" x3="1.15867" y3="0.89102" z3="5.60982"/>
+            <atom id="a3" elementType="H" x3="1.81427" y3="-0.11392" z3="4.29305"/>
+            <atom id="a4" elementType="H" x3="1.05637" y3="-0.88472" z3="5.70905"/>
+            <atom id="a5" elementType="H" x3="0.05285" y3="9.8E-4" z3="4.53344"/>
+          </atomArray>
+          <bondArray>
+            <bond atomRefs2="a1 a2" id="a1_a2" order="S"/>
+            <bond atomRefs2="a1 a3" id="a1_a3" order="S"/>
+            <bond atomRefs2="a1 a4" id="a1_a4" order="S"/>
+            <bond atomRefs2="a1 a5" id="a1_a5" order="S"/>
+          </bondArray>
+          <propertyList/>
+        </molecule>
+      </module>
+    </module>
+    <module role="job" title="job2">
+      <module role="init">
+        <molecule id="m1" formalCharge="0" spinMultiplicity="1">
+          <atomArray>
+            <atom id="a1" elementType="C" x3="1.0205384335" y3="-0.0266600215" z3="5.036340003"/>
+            <atom id="a2" elementType="H" x3="1.1588721361" y3="0.892361138" z3="5.6106538195"/>
+            <atom id="a3" elementType="H" x3="1.8154275953" y3="-0.1140475138" z3="4.2919697706"/>
+            <atom id="a4" elementType="H" x3="1.0564256091" y3="-0.885976317" z3="5.7100311148"/>
+            <atom id="a5" elementType="H" x3="0.0514362258" y3="0.0010227143" z3="4.5327052921"/>
+          </atomArray>
+          <bondArray>
+            <bond atomRefs2="a1 a2" id="a1_a2" order="S"/>
+            <bond atomRefs2="a1 a3" id="a1_a3" order="S"/>
+            <bond atomRefs2="a1 a4" id="a1_a4" order="S"/>
+            <bond atomRefs2="a1 a5" id="a1_a5" order="S"/>
+          </bondArray>
+        </molecule>
+        <parameterList>
+          <parameter dictRef="cmlqm:cmd.freq">
+            <scalar dataType="xsd:string">Frequency analysis</scalar>
+          </parameter>
+          <parameter dictRef="cmlqm:qm.method">
+            <scalar dataType="xsd:string">uB97-1</scalar>
+          </parameter>
+        </parameterList>
+      </module>
+      <module role="optimization">
+        <module role="step" title="step1">
+          <propertyList>
+            <property dictRef="cmlqm:property.g03.scfenergy">
+              <scalar dataType="xsd:double" units="unit:hartree">-40.5111790287</scalar>
+            </property>
+          </propertyList>
+        </module>
+      </module>
+      <module role="final">
+        <molecule id="m1" formalCharge="0" spinMultiplicity="1">
+          <atomArray>
+            <atom id="a1" elementType="C" x3="1.0205384335" y3="-0.0266600215" z3="5.036340003"/>
+            <atom id="a2" elementType="H" x3="1.1588721361" y3="0.892361138" z3="5.6106538195"/>
+            <atom id="a3" elementType="H" x3="1.8154275953" y3="-0.1140475138" z3="4.2919697706"/>
+            <atom id="a4" elementType="H" x3="1.0564256091" y3="-0.885976317" z3="5.7100311148"/>
+            <atom id="a5" elementType="H" x3="0.0514362258" y3="0.0010227143" z3="4.5327052921"/>
+          </atomArray>
+          <bondArray>
+            <bond atomRefs2="a1 a2" id="a1_a2" order="S"/>
+            <bond atomRefs2="a1 a3" id="a1_a3" order="S"/>
+            <bond atomRefs2="a1 a4" id="a1_a4" order="S"/>
+            <bond atomRefs2="a1 a5" id="a1_a5" order="S"/>
+          </bondArray>
+          <propertyList>
+            <property dictRef="cmlqm:property.g03.dipole">
+              <vector3 units="unit:debye">1.51313187E-6 -2.06531504E-7 -1.331166E-7</vector3>
+            </property>
+            <property dictRef="cmlqm:property.g03.polarizability">
+              <array dataType="xsd:double" size="6" units="unit:unknown" delimiter="">14.2878997 3.56675918E-5 14.287313 -1.0451945E-4 6.01378969E-5 14.2880081</array>
+            </property>
+            <property dictRef="cmlqm:property.g03.diagvibpolar">
+              <vector3 units="unit:unknown">0.3477215 0.3477035 0.3476808</vector3>
+            </property>
+            <property dictRef="cmlqm:property.g03.freqmode">
+              <array dataType="xsd:double" size="9" units="unit:cm-1" delimiter="">1335.2498 1335.279 1335.2921 1555.212 1555.2274 3018.422 3131.0 3131.0232 3131.0533</array>
+            </property>
+            <property dictRef="cmlqm:property.g03.reducedmass">
+              <array dataType="xsd:double" size="9" units="unit:amu" delimiter="">1.1801 1.1801 1.1801 1.0078 1.0078 1.0078 1.1007 1.1007 1.1007</array>
+            </property>
+            <property dictRef="cmlqm:property.g03.forceconstant">
+              <array dataType="xsd:double" size="9" units="unit:mDyne.A-1" delimiter="">1.2397 1.2397 1.2397 1.4362 1.4362 5.41 6.3572 6.3573 6.3575</array>
+            </property>
+            <property dictRef="cmlqm:property.g03.irintensity">
+              <array dataType="xsd:double" size="9" units="unit:KM.mol-1" delimiter="">18.7197 18.7212 18.7204 0.0 0.0 0.0 23.7305 23.7272 23.7341</array>
+            </property>
+            <property dictRef="cmlqm:property.g03.freqmodeeigen">
+              <matrix rows="5" columns="27" dataType="xsd:double" units="unit:A">0.07 -0.07 -0.07 0.1 0.05 0.06 0.01 0.09 -0.09 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.05 -0.02 0.08 -0.02 0.09 0.01 0.08 0.01 0.05 -0.42 -0.06 0.08 -0.43 0.15 -0.03 -0.01 -0.29 0.51 0.4 -0.2 0.23 -0.3 -0.18 0.36 0.06 0.42 0.26 -0.03 -0.16 -0.08 -0.1 -0.61 -0.39 -0.04 -0.36 -0.21 0.07 0.3 -0.07 -0.36 -0.25 -0.39 0.2 -0.46 0.21 -0.2 0.37 -0.26 -0.28 -0.33 -0.26 0.36 -0.04 -0.34 0.59 -0.07 -0.54 0.18 0.0 -0.17 -0.12 0.02 0.14 -0.36 0.28 0.39 -0.48 -0.23 -0.27 -0.05 0.11 0.0 -0.32 0.23 0.31 0.38 0.21 0.25 0.02 -0.39 0.31 -0.03 0.44 -0.33 0.02 -0.47 0.39 0.01 0.2 -0.14 -0.18 0.34 0.43 0.08 -0.25 0.02 -0.21 -0.43 0.33 0.13 -0.4 -0.27 0.19 0.3 -0.35 -0.44 0.01 -0.23 0.05 -0.01 0.05 0.11 0.02 0.06 -0.75 0.02 -0.39</matrix>
+            </property>
+          </propertyList>
+        </molecule>
+      </module>
+    </module>
+  </module>
+</cml>

semsci-converters-chem/src/test/resources/gigadot/semsci/converters/chem/data/CH4.g03

+ Entering Gaussian System, Link 0=g03
+ Input=./CH4.gau
+ Output=./CH4.log
+ Initial command:
+ /opt//g03/l1.exe /scratch/Gau-13991.inp -scrdir=/scratch/
+ Entering Link 1 = /opt//g03/l1.exe PID=     14008.
+  
+ Copyright (c) 1988,1990,1992,1993,1995,1998,2003,2004,2007, Gaussian, Inc.
+                  All Rights Reserved.
+  
+ This is the Gaussian(R) 03 program.  It is based on the
+ the Gaussian(R) 98 system (copyright 1998, Gaussian, Inc.),
+ the Gaussian(R) 94 system (copyright 1995, Gaussian, Inc.),
+ the Gaussian 92(TM) system (copyright 1992, Gaussian, Inc.),
+ the Gaussian 90(TM) system (copyright 1990, Gaussian, Inc.),
+ the Gaussian 88(TM) system (copyright 1988, Gaussian, Inc.),
+ the Gaussian 86(TM) system (copyright 1986, Carnegie Mellon
+ University), and the Gaussian 82(TM) system (copyright 1983,
+ Carnegie Mellon University). Gaussian is a federally registered
+ trademark of Gaussian, Inc.
+  
+ This software contains proprietary and confidential information,
+ including trade secrets, belonging to Gaussian, Inc.
+  
+ This software is provided under written license and may be
+ used, copied, transmitted, or stored only in accord with that
+ written license.
+  
+ The following legend is applicable only to US Government
+ contracts under FAR:
+  
+                    RESTRICTED RIGHTS LEGEND
+  
+ Use, reproduction and disclosure by the US Government is
+ subject to restrictions as set forth in subparagraphs (a)
+ and (c) of the Commercial Computer Software - Restricted
+ Rights clause in FAR 52.227-19.
+  
+ Gaussian, Inc.
+ 340 Quinnipiac St., Bldg. 40, Wallingford CT 06492
+  
+  
+ ---------------------------------------------------------------
+ Warning -- This program may not be used in any manner that
+ competes with the business of Gaussian, Inc. or will provide
+ assistance to any competitor of Gaussian, Inc.  The licensee
+ of this program is prohibited from giving any competitor of
+ Gaussian, Inc. access to this program.  By using this program,
+ the user acknowledges that Gaussian, Inc. is engaged in the
+ business of creating and licensing software in the field of
+ computational chemistry and represents and warrants to the
+ licensee that it is not a competitor of Gaussian, Inc. and that
+ it will not use this program in any manner prohibited above.
+ ---------------------------------------------------------------
+  
+
+ Cite this work as:
+ Gaussian 03, Revision E.01,
+ M. J. Frisch, G. W. Trucks, H. B. Schlegel, G. E. Scuseria, 
+ M. A. Robb, J. R. Cheeseman, J. A. Montgomery, Jr., T. Vreven, 
+ K. N. Kudin, J. C. Burant, J. M. Millam, S. S. Iyengar, J. Tomasi, 
+ V. Barone, B. Mennucci, M. Cossi, G. Scalmani, N. Rega, 
+ G. A. Petersson, H. Nakatsuji, M. Hada, M. Ehara, K. Toyota, 
+ R. Fukuda, J. Hasegawa, M. Ishida, T. Nakajima, Y. Honda, O. Kitao, 
+ H. Nakai, M. Klene, X. Li, J. E. Knox, H. P. Hratchian, J. B. Cross, 
+ V. Bakken, C. Adamo, J. Jaramillo, R. Gomperts, R. E. Stratmann, 
+ O. Yazyev, A. J. Austin, R. Cammi, C. Pomelli, J. W. Ochterski, 
+ P. Y. Ayala, K. Morokuma, G. A. Voth, P. Salvador, J. J. Dannenberg, 
+ V. G. Zakrzewski, S. Dapprich, A. D. Daniels, M. C. Strain, 
+ O. Farkas, D. K. Malick, A. D. Rabuck, K. Raghavachari, 
+ J. B. Foresman, J. V. Ortiz, Q. Cui, A. G. Baboul, S. Clifford, 
+ J. Cioslowski, B. B. Stefanov, G. Liu, A. Liashenko, P. Piskorz, 
+ I. Komaromi, R. L. Martin, D. J. Fox, T. Keith, M. A. Al-Laham, 
+ C. Y. Peng, A. Nanayakkara, M. Challacombe, P. M. W. Gill, 
+ B. Johnson, W. Chen, M. W. Wong, C. Gonzalez, and J. A. Pople, 
+ Gaussian, Inc., Wallingford CT, 2004.
+ 
+ ******************************************
+ Gaussian 03:  AM64L-G03RevE.01 11-Sep-2007
+                30-Mar-2009 
+ ******************************************
+ %NProcShared=2
+ Will use up to    2 processors via shared memory.
+ ----------------------------------------------------------------------
+ #p uB971/6-311+G(d,p) opt=(Tight, NewEstmFC, MaxCyc = 200) freq #GFInp
+ ut Population=Regular #Integral(Grid=UltraFine) Guess=Mix NoSymmetry
+ ----------------------------------------------------------------------
+ 1/6=200,7=10,10=7,14=-1,18=20,26=3,38=1/1,3;
+ 2/9=110,15=1,17=6,18=5,40=1/2;
+ 3/5=4,6=6,7=111,11=2,16=1,24=10,25=1,30=1,74=-20,75=5/1,2,3;
+ 4/7=2,9=2,13=1/1;
+ 5/5=2,38=5/2;
+ 6/28=1/1;
+ 7/29=1,30=1/1,2,3,16;
+ 1/6=200,10=7,14=-1,18=20/3(3);
+ 2/9=110,15=1/2;
+ 6/19=2,28=1/1;
+ 99//99;
+ 2/9=110,15=1/2;
+ 3/5=4,6=6,7=111,11=2,16=1,25=1,30=1,74=-20,75=5/1,2,3;
+ 4/5=5,7=2,9=2,16=3/1;
+ 5/5=2,38=5/2;
+ 7/30=1/1,2,3,16;
+ 1/6=200,14=-1,18=20/3(-5);
+ 2/9=110,15=1/2;
+ 6/19=2,28=1/1;
+ 99/9=1/99;
+ Leave Link    1 at Mon Mar 30 15:42:29 2009, MaxMem=          0 cpu:       0.2
+ (Enter /opt//g03/l101.exe)
+ ---------------------------
+ #NewComb uB971/6-311+G(d,p)
+ ---------------------------
+ Symbolic Z-matrix:
+ Charge =  0 Multiplicity = 1
+ C                     1.02054  -0.02666   5.03634 
+ H                     1.15867   0.89102   5.60982 
+ H                     1.81427  -0.11392   4.29305 
+ H                     1.05637  -0.88472   5.70905 
+ H                     0.05285   0.00098   4.53344 
+ 
+                    Isotopes and Nuclear Properties:
+ (Nuclear quadrupole moments (NQMom) in fm**2, nuclear magnetic moments (NMagM)
+  in nuclear magnetons)
+
+  Atom         1           2           3           4           5
+ IAtWgt=          12           1           1           1           1
+ AtmWgt=  12.0000000   1.0078250   1.0078250   1.0078250   1.0078250
+ NucSpn=           0           1           1           1           1
+ AtZEff=   0.0000000   0.0000000   0.0000000   0.0000000   0.0000000
+ NQMom=    0.0000000   0.0000000   0.0000000   0.0000000   0.0000000
+ NMagM=    0.0000000   2.7928460   2.7928460   2.7928460   2.7928460
+ Leave Link  101 at Mon Mar 30 15:42:29 2009, MaxMem=    6291456 cpu:       0.1
+ (Enter /opt//g03/l103.exe)
+
+ GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad
+ Berny optimization.
+ Initialization pass.
+                           ----------------------------
+                           !    Initial Parameters    !
+                           ! (Angstroms and Degrees)  !
+ --------------------------                            --------------------------
+ ! Name  Definition              Value          Derivative Info.                !
+ --------------------------------------------------------------------------------
+ ! R1    R(1,2)                  1.0909         estimate D2E/DX2                !
+ ! R2    R(1,3)                  1.0909         estimate D2E/DX2                !
+ ! R3    R(1,4)                  1.0909         estimate D2E/DX2                !
+ ! R4    R(1,5)                  1.0909         estimate D2E/DX2                !
+ ! A1    A(2,1,3)              109.4713         estimate D2E/DX2                !
+ ! A2    A(2,1,4)              109.4708         estimate D2E/DX2                !
+ ! A3    A(2,1,5)              109.4716         estimate D2E/DX2                !
+ ! A4    A(3,1,4)              109.4715         estimate D2E/DX2                !
+ ! A5    A(3,1,5)              109.471          estimate D2E/DX2                !
+ ! A6    A(4,1,5)              109.4711         estimate D2E/DX2                !
+ --------------------------------------------------------------------------------
+ Trust Radius=3.00D-01 FncErr=1.00D-07 GrdErr=1.00D-06
+ Number of steps in this run= 100 maximum allowed number of steps= 100.
+ GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad
+
+ Leave Link  103 at Mon Mar 30 15:42:29 2009, MaxMem=    6291456 cpu:       0.0
+ (Enter /opt//g03/l202.exe)
+                          Input orientation:                          
+ ---------------------------------------------------------------------
+ Center     Atomic     Atomic              Coordinates (Angstroms)
+ Number     Number      Type              X           Y           Z
+ ---------------------------------------------------------------------
+    1          6             0        1.020540   -0.026660    5.036340
+    2          1             0        1.158670    0.891020    5.609820
+    3          1             0        1.814270   -0.113920    4.293050
+    4          1             0        1.056370   -0.884720    5.709050
+    5          1             0        0.052850    0.000980    4.533440
+ ---------------------------------------------------------------------
+                    Distance matrix (angstroms):
+                    1          2          3          4          5
+     1  C    0.000000
+     2  H    1.090915   0.000000
+     3  H    1.090918   1.781460   0.000000
+     4  H    1.090912   1.781450   1.781460   0.000000
+     5  H    1.090915   1.781461   1.781457   1.781453   0.000000
+ Symmetry turned off by external request.
+ Stoichiometry    CH4
+ Framework group  C1[X(CH4)]
+ Deg. of freedom     9
+ Full point group                 C1
+ Rotational constants (GHZ):    158.0094955    158.0090210    158.0080140
+ Leave Link  202 at Mon Mar 30 15:42:30 2009, MaxMem=    6291456 cpu:       0.1
+ (Enter /opt//g03/l301.exe)
+ Standard basis: 6-311+G(d,p) (5D, 7F)
+ AO basis set in the form of general basis input:
+      1 0
+ S   6 1.00       0.000000000000
+      0.4563240000D+04  0.1966650249D-02
+      0.6820240000D+03  0.1523060193D-01
+      0.1549730000D+03  0.7612690966D-01
+      0.4445530000D+02  0.2608010331D+00
+      0.1302900000D+02  0.6164620782D+00
+      0.1827730000D+01  0.2210060280D+00
+ SP   3 1.00       0.000000000000
+      0.2096420000D+02  0.1146600807D+00  0.4024869267D-01
+      0.4803310000D+01  0.9199996477D+00  0.2375939567D+00
+      0.1459330000D+01 -0.3030682134D-02  0.8158538515D+00
+ SP   1 1.00       0.000000000000
+      0.4834560000D+00  0.1000000000D+01  0.1000000000D+01
+ SP   1 1.00       0.000000000000
+      0.1455850000D+00  0.1000000000D+01  0.1000000000D+01
+ SP   1 1.00       0.000000000000
+      0.4380000000D-01  0.1000000000D+01  0.1000000000D+01
+ D   1 1.00       0.000000000000
+      0.6260000000D+00  0.1000000000D+01
+ ****
+      2 0
+ S   3 1.00       0.000000000000
+      0.3386500000D+02  0.2549381454D-01
+      0.5094790000D+01  0.1903731086D+00
+      0.1158790000D+01  0.8521614860D+00
+ S   1 1.00       0.000000000000
+      0.3258400000D+00  0.1000000000D+01
+ S   1 1.00       0.000000000000
+      0.1027410000D+00  0.1000000000D+01
+ P   1 1.00       0.000000000000
+      0.7500000000D+00  0.1000000000D+01
+ ****
+      3 0
+ S   3 1.00       0.000000000000
+      0.3386500000D+02  0.2549381454D-01
+      0.5094790000D+01  0.1903731086D+00
+      0.1158790000D+01  0.8521614860D+00
+ S   1 1.00       0.000000000000
+      0.3258400000D+00  0.1000000000D+01
+ S   1 1.00       0.000000000000
+      0.1027410000D+00  0.1000000000D+01
+ P   1 1.00       0.000000000000
+      0.7500000000D+00  0.1000000000D+01
+ ****
+      4 0
+ S   3 1.00       0.000000000000
+      0.3386500000D+02  0.2549381454D-01
+      0.5094790000D+01  0.1903731086D+00
+      0.1158790000D+01  0.8521614860D+00
+ S   1 1.00       0.000000000000
+      0.3258400000D+00  0.1000000000D+01
+ S   1 1.00       0.000000000000
+      0.1027410000D+00  0.1000000000D+01
+ P   1 1.00       0.000000000000
+      0.7500000000D+00  0.1000000000D+01
+ ****
+      5 0
+ S   3 1.00       0.000000000000
+      0.3386500000D+02  0.2549381454D-01
+      0.5094790000D+01  0.1903731086D+00
+      0.1158790000D+01  0.8521614860D+00
+ S   1 1.00       0.000000000000
+      0.3258400000D+00  0.1000000000D+01
+ S   1 1.00       0.000000000000
+      0.1027410000D+00  0.1000000000D+01
+ P   1 1.00       0.000000000000
+      0.7500000000D+00  0.1000000000D+01
+ ****
+
+ Integral buffers will be    131072 words long.
+ Raffenetti 2 integral format.
+ Two-electron integral symmetry is turned off.
+    46 basis functions,    68 primitive gaussians,    47 cartesian basis functions
+     5 alpha electrons        5 beta electrons
+       nuclear repulsion energy        13.4241187687 Hartrees.
+ IExCor=1614 DFT=T Ex=B97-1+HF Corr=B97-1 ExCW=0 ScaHFX=  0.210000
+ ScaDFX=  1.000000  1.000000  1.000000  1.000000
+ IRadAn=      5 IRanWt=     -1 IRanGd=            0 ICorTp=0
+ NAtoms=    5 NActive=    5 NUniq=    5 SFac= 7.50D-01 NAtFMM=   80 NAOKFM=F Big=F
+ Leave Link  301 at Mon Mar 30 15:42:30 2009, MaxMem=    6291456 cpu:       0.0
+ (Enter /opt//g03/l302.exe)
+ NPDir=0 NMtPBC=     1 NCelOv=     1 NCel=       1 NClECP=     1 NCelD=      1
+         NCelK=      1 NCelE2=     1 NClLst=     1 CellRange=     0.0.
+ One-electron integrals computed using PRISM.
+ NBasis=    46 RedAO= T  NBF=    46
+ NBsUse=    46 1.00D-06 NBFU=    46
+ Precomputing XC quadrature grid using
+ IXCGrd= 2 IRadAn=           5 IRanWt=          -1 IRanGd=           0.
+ NRdTot=     418 NPtTot=      112448 NUsed=      115395 NTot=      115427
+ NSgBfM=    47    47    47    47.
+ Leave Link  302 at Mon Mar 30 15:42:30 2009, MaxMem=    6291456 cpu:       0.3
+ (Enter /opt//g03/l303.exe)
+ DipDrv:  MaxL=1.
+ Leave Link  303 at Mon Mar 30 15:42:30 2009, MaxMem=    6291456 cpu:       0.0
+ (Enter /opt//g03/l401.exe)
+ SCF N**3 symmetry information disabled.
+ Harris functional with IExCor= 1614 diagonalized for initial guess.
+ ExpMin= 4.38D-02 ExpMax= 4.56D+03 ExpMxC= 6.82D+02 IAcc=3 IRadAn=         5 AccDes= 0.00D+00
+ HarFok:  IExCor=1614 AccDes= 0.00D+00 IRadAn=         5 IDoV=1
+ ScaDFX=  1.000000  1.000000  1.000000  1.000000
+ Harris En= -39.1962205019986    
+ <S**2> of initial guess= 1.0000
+ Leave Link  401 at Mon Mar 30 15:42:31 2009, MaxMem=    6291456 cpu:       1.1
+ (Enter /opt//g03/l502.exe)
+ UHF open shell SCF:
+ Requested convergence on RMS density matrix=1.00D-08 within 128 cycles.
+ Requested convergence on MAX density matrix=1.00D-06.
+ Requested convergence on             energy=1.00D-06.
+ No special actions if energy rises.
+ Using DIIS extrapolation, IDIIS=  1040.
+ Two-electron integral symmetry not used.
+       115394 words used for storage of precomputed grid.
+ Keep R1 and R2 integrals in memory in canonical form, NReq=     3100301.
+ IEnd=    140737 IEndB=    140737 NGot=   6291456 MDV=   4896090
+ LenX=   4896090
+ Symmetry not used in FoFDir.
+ MinBra= 0 MaxBra= 2 Meth= 1.
+ IRaf=       0 NMat=   1 IRICut=       1 DoRegI=T DoRafI=F ISym2E= 0 JSym2E=0.
+
+ Cycle   1  Pass 1  IDiag  1:
+ E= -40.1013503559180    
+ DIIS: error= 9.04D-02 at cycle   1 NSaved=   1.
+ NSaved= 1 IEnMin= 1 EnMin= -40.1013503559180     IErMin= 1 ErrMin= 9.04D-02
+ ErrMax= 9.04D-02 EMaxC= 1.00D-01 BMatC= 4.55D-01 BMatP= 4.55D-01
+ IDIUse=3 WtCom= 9.57D-02 WtEn= 9.04D-01
+ Coeff-Com:  0.100D+01
+ Coeff-En:   0.100D+01
+ Coeff:      0.100D+01
+ Gap=     0.053 Goal=   None    Shift=    0.000
+ Gap=     0.052 Goal=   None    Shift=    0.000
+ GapD=    0.052 DampG=0.500 DampE=0.500 DampFc=0.2500 IDamp=-1.
+ Damping current iteration by 2.50D-01
+ RMSDP=4.51D-02 MaxDP=1.62D+00              OVMax= 6.14D-01
+
+ Cycle   2  Pass 1  IDiag  1:
+ E= -40.2026596279920     Delta-E=       -0.101309272074 Rises=F Damp=T
+ DIIS: error= 6.67D-02 at cycle   2 NSaved=   2.
+ NSaved= 2 IEnMin= 2 EnMin= -40.2026596279920     IErMin= 2 ErrMin= 6.67D-02
+ ErrMax= 6.67D-02 EMaxC= 1.00D-01 BMatC= 2.39D-01 BMatP= 4.55D-01
+ IDIUse=3 WtCom= 3.33D-01 WtEn= 6.67D-01
+ Coeff-Com: -0.210D+01 0.310D+01
+ Coeff-En:   0.000D+00 0.100D+01
+ Coeff:     -0.699D+00 0.170D+01
+ Gap=     0.408 Goal=   None    Shift=    0.000
+ Gap=     0.409 Goal=   None    Shift=    0.000
+ RMSDP=3.41D-02 MaxDP=1.22D+00 DE=-1.01D-01 OVMax= 4.62D-02
+
+ Cycle   3  Pass 1  IDiag  1:
+ E= -40.5075680235506     Delta-E=       -0.304908395559 Rises=F Damp=F
+ DIIS: error= 5.89D-03 at cycle   3 NSaved=   3.
+ NSaved= 3 IEnMin= 3 EnMin= -40.5075680235506     IErMin= 3 ErrMin= 5.89D-03
+ ErrMax= 5.89D-03 EMaxC= 1.00D-01 BMatC= 7.29D-03 BMatP= 2.39D-01
+ IDIUse=3 WtCom= 9.41D-01 WtEn= 5.89D-02
+ Coeff-Com:  0.192D+00-0.260D+00 0.107D+01
+ Coeff-En:   0.000D+00 0.000D+00 0.100D+01
+ Coeff:      0.181D+00-0.244D+00 0.106D+01
+ Gap=     0.409 Goal=   None    Shift=    0.000
+ Gap=     0.409 Goal=   None    Shift=    0.000
+ RMSDP=1.43D-03 MaxDP=1.37D-02 DE=-3.05D-01 OVMax= 3.75D-02
+
+ Cycle   4  Pass 1  IDiag  1:
+ E= -40.5108832142420     Delta-E=       -0.003315190691 Rises=F Damp=F
+ DIIS: error= 2.39D-03 at cycle   4 NSaved=   4.
+ NSaved= 4 IEnMin= 4 EnMin= -40.5108832142420     IErMin= 4 ErrMin= 2.39D-03
+ ErrMax= 2.39D-03 EMaxC= 1.00D-01 BMatC= 7.41D-04 BMatP= 7.29D-03
+ IDIUse=3 WtCom= 9.76D-01 WtEn= 2.39D-02
+ Coeff-Com: -0.184D+00 0.251D+00 0.187D-01 0.914D+00
+ Coeff-En:   0.000D+00 0.000D+00 0.000D+00 0.100D+01
+ Coeff:     -0.179D+00 0.245D+00 0.182D-01 0.916D+00
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ RMSDP=2.79D-04 MaxDP=2.65D-03 DE=-3.32D-03 OVMax= 7.42D-03
+
+ Cycle   5  Pass 1  IDiag  1:
+ E= -40.5111475880622     Delta-E=       -0.000264373820 Rises=F Damp=F
+ DIIS: error= 5.09D-04 at cycle   5 NSaved=   5.
+ NSaved= 5 IEnMin= 5 EnMin= -40.5111475880622     IErMin= 5 ErrMin= 5.09D-04
+ ErrMax= 5.09D-04 EMaxC= 1.00D-01 BMatC= 4.96D-05 BMatP= 7.41D-04
+ IDIUse=3 WtCom= 9.95D-01 WtEn= 5.09D-03
+ Coeff-Com:  0.227D-01-0.321D-01-0.326D-01 0.299D-01 0.101D+01
+ Coeff-En:   0.000D+00 0.000D+00 0.000D+00 0.000D+00 0.100D+01
+ Coeff:      0.226D-01-0.320D-01-0.324D-01 0.297D-01 0.101D+01
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ RMSDP=9.55D-05 MaxDP=1.28D-03 DE=-2.64D-04 OVMax= 2.62D-03
+
+ Cycle   6  Pass 1  IDiag  1:
+ E= -40.5111714325959     Delta-E=       -0.000023844534 Rises=F Damp=F
+ DIIS: error= 1.44D-04 at cycle   6 NSaved=   6.
+ NSaved= 6 IEnMin= 6 EnMin= -40.5111714325959     IErMin= 6 ErrMin= 1.44D-04
+ ErrMax= 1.44D-04 EMaxC= 1.00D-01 BMatC= 2.89D-06 BMatP= 4.96D-05
+ IDIUse=3 WtCom= 9.99D-01 WtEn= 1.44D-03
+ Coeff-Com:  0.179D-01-0.249D-01 0.167D-03-0.651D-01 0.649D-01 0.101D+01
+ Coeff-En:   0.000D+00 0.000D+00 0.000D+00 0.000D+00 0.000D+00 0.100D+01
+ Coeff:      0.178D-01-0.249D-01 0.167D-03-0.651D-01 0.648D-01 0.101D+01
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ RMSDP=2.42D-05 MaxDP=3.67D-04 DE=-2.38D-05 OVMax= 7.88D-04
+
+ Cycle   7  Pass 1  IDiag  1:
+ E= -40.5111726808115     Delta-E=       -0.000001248216 Rises=F Damp=F
+ DIIS: error= 5.52D-05 at cycle   7 NSaved=   7.
+ NSaved= 7 IEnMin= 7 EnMin= -40.5111726808115     IErMin= 7 ErrMin= 5.52D-05
+ ErrMax= 5.52D-05 EMaxC= 1.00D-01 BMatC= 3.43D-07 BMatP= 2.89D-06
+ IDIUse=1 WtCom= 1.00D+00 WtEn= 0.00D+00
+ Coeff-Com: -0.607D-03 0.885D-03 0.664D-03-0.155D-01-0.278D-01 0.219D+00
+ Coeff-Com:  0.824D+00
+ Coeff:     -0.607D-03 0.885D-03 0.664D-03-0.155D-01-0.278D-01 0.219D+00
+ Coeff:      0.824D+00
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ RMSDP=5.96D-06 MaxDP=6.33D-05 DE=-1.25D-06 OVMax= 1.38D-04
+
+ Cycle   8  Pass 1  IDiag  1:
+ E= -40.5111727851779     Delta-E=       -0.000000104366 Rises=F Damp=F
+ DIIS: error= 5.09D-06 at cycle   8 NSaved=   8.
+ NSaved= 8 IEnMin= 8 EnMin= -40.5111727851779     IErMin= 8 ErrMin= 5.09D-06
+ ErrMax= 5.09D-06 EMaxC= 1.00D-01 BMatC= 3.61D-09 BMatP= 3.43D-07
+ IDIUse=1 WtCom= 1.00D+00 WtEn= 0.00D+00
+ Coeff-Com: -0.149D-03 0.234D-03 0.781D-04 0.314D-02 0.496D-03-0.514D-01
+ Coeff-Com: -0.700D-01 0.112D+01
+ Coeff:     -0.149D-03 0.234D-03 0.781D-04 0.314D-02 0.496D-03-0.514D-01
+ Coeff:     -0.700D-01 0.112D+01
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ RMSDP=9.56D-07 MaxDP=1.03D-05 DE=-1.04D-07 OVMax= 2.43D-05
+
+ Cycle   9  Pass 1  IDiag  1:
+ E= -40.5111727870692     Delta-E=       -0.000000001891 Rises=F Damp=F
+ DIIS: error= 7.87D-07 at cycle   9 NSaved=   9.
+ NSaved= 9 IEnMin= 9 EnMin= -40.5111727870692     IErMin= 9 ErrMin= 7.87D-07
+ ErrMax= 7.87D-07 EMaxC= 1.00D-01 BMatC= 8.82D-11 BMatP= 3.61D-09
+ IDIUse=1 WtCom= 1.00D+00 WtEn= 0.00D+00
+ Coeff-Com:  0.129D-04-0.248D-04-0.564D-04 0.389D-04 0.330D-04 0.194D-02
+ Coeff-Com: -0.175D-02-0.147D+00 0.115D+01
+ Coeff:      0.129D-04-0.248D-04-0.564D-04 0.389D-04 0.330D-04 0.194D-02
+ Coeff:     -0.175D-02-0.147D+00 0.115D+01
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ RMSDP=1.55D-07 MaxDP=1.92D-06 DE=-1.89D-09 OVMax= 3.65D-06
+
+ Cycle  10  Pass 1  IDiag  1:
+ E= -40.5111727871138     Delta-E=       -0.000000000045 Rises=F Damp=F
+ DIIS: error= 1.61D-07 at cycle  10 NSaved=  10.
+ NSaved=10 IEnMin=10 EnMin= -40.5111727871138     IErMin=10 ErrMin= 1.61D-07
+ ErrMax= 1.61D-07 EMaxC= 1.00D-01 BMatC= 2.48D-12 BMatP= 8.82D-11
+ IDIUse=1 WtCom= 1.00D+00 WtEn= 0.00D+00
+ Coeff-Com:  0.103D-05-0.134D-05 0.723D-05-0.691D-04 0.248D-04 0.497D-03
+ Coeff-Com:  0.216D-03-0.239D-02-0.472D-01 0.105D+01
+ Coeff:      0.103D-05-0.134D-05 0.723D-05-0.691D-04 0.248D-04 0.497D-03
+ Coeff:      0.216D-03-0.239D-02-0.472D-01 0.105D+01
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ RMSDP=1.62D-08 MaxDP=1.36D-07 DE=-4.46D-11 OVMax= 3.74D-07
+
+ Cycle  11  Pass 1  IDiag  1:
+ E= -40.5111727871147     Delta-E=       -0.000000000001 Rises=F Damp=F
+ DIIS: error= 1.58D-08 at cycle  11 NSaved=  11.
+ NSaved=11 IEnMin=11 EnMin= -40.5111727871147     IErMin=11 ErrMin= 1.58D-08
+ ErrMax= 1.58D-08 EMaxC= 1.00D-01 BMatC= 1.40D-14 BMatP= 2.48D-12
+ IDIUse=1 WtCom= 1.00D+00 WtEn= 0.00D+00
+ Coeff-Com: -0.229D-06 0.459D-06 0.142D-05-0.292D-05-0.927D-06-0.123D-04
+ Coeff-Com:  0.521D-04 0.237D-02-0.232D-01 0.596D-01 0.961D+00
+ Coeff:     -0.229D-06 0.459D-06 0.142D-05-0.292D-05-0.927D-06-0.123D-04
+ Coeff:      0.521D-04 0.237D-02-0.232D-01 0.596D-01 0.961D+00
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ Gap=     0.415 Goal=   None    Shift=    0.000
+ RMSDP=1.45D-09 MaxDP=1.55D-08 DE=-8.60D-13 OVMax= 4.21D-08
+
+ SCF Done:  E(UB97-1+HF-B97-1) =  -40.5111727871     A.U. after   11 cycles
+             Convg  =    0.1451D-08             -V/T =  2.0051
+             S**2   =   0.0000
+ KE= 4.030419818920D+01 PE=-1.201248004869D+02 EE= 2.588531074185D+01
+ Annihilation of the first spin contaminant:
+ S**2 before annihilation     0.0000,   after     0.0000
+ Leave Link  502 at Mon Mar 30 15:42:40 2009, MaxMem=    6291456 cpu:      16.6
+ (Enter /opt//g03/l601.exe)
+ Copying SCF densities to generalized density rwf, ISCF=1 IROHF=0.
+
+ **********************************************************************
+
+            Population analysis using the SCF density.
+
+ **********************************************************************
+
+ Alpha  occ. eigenvalues --  -10.16130  -0.69831  -0.39331  -0.39331  -0.39330
+ Alpha virt. eigenvalues --    0.02127   0.06927   0.06927   0.06927   0.15565
+ Alpha virt. eigenvalues --    0.15565   0.15565   0.22093   0.40999   0.40999
+ Alpha virt. eigenvalues --    0.40999   0.60621   0.60621   0.60621   0.61228
+ Alpha virt. eigenvalues --    0.83413   0.96530   0.96530   1.45790   1.45790
+ Alpha virt. eigenvalues --    1.45790   1.53892   1.53892   1.53892   1.90898
+ Alpha virt. eigenvalues --    1.90898   1.90898   2.29162   2.31767   2.31768
+ Alpha virt. eigenvalues --    2.48584   2.48584   2.48585   2.55632   2.55632
+ Alpha virt. eigenvalues --    2.55633   2.88292   3.80550   3.80551   3.80552
+ Alpha virt. eigenvalues --   24.06687
+  Beta  occ. eigenvalues --  -10.16130  -0.69831  -0.39331  -0.39331  -0.39330
+  Beta virt. eigenvalues --    0.02127   0.06927   0.06927   0.06927   0.15565
+  Beta virt. eigenvalues --    0.15565   0.15565   0.22093   0.40999   0.40999
+  Beta virt. eigenvalues --    0.40999   0.60621   0.60621   0.60621   0.61228
+  Beta virt. eigenvalues --    0.83413   0.96530   0.96530   1.45790   1.45790
+  Beta virt. eigenvalues --    1.45790   1.53892   1.53892   1.53892   1.90898
+  Beta virt. eigenvalues --    1.90898   1.90898   2.29162   2.31767   2.31768
+  Beta virt. eigenvalues --    2.48584   2.48584   2.48585   2.55632   2.55632
+  Beta virt. eigenvalues --    2.55633   2.88292   3.80550   3.80551   3.80552
+  Beta virt. eigenvalues --   24.06687
+     Alpha Molecular Orbital Coefficients
+                           1         2         3         4         5
+                           O         O         O         O         O
+     EIGENVALUES --   -10.16130  -0.69831  -0.39331  -0.39331  -0.39330
+   1 1   C  1S          0.56407  -0.10860   0.00000   0.00000   0.00000
+   2        2S          0.46240  -0.16920   0.00000   0.00000   0.00000
+   3        2PX         0.00000   0.00000   0.03332   0.13844   0.14316
+   4        2PY         0.00000   0.00000  -0.00251   0.14543  -0.14005
+   5        2PZ         0.00000   0.00000   0.19913  -0.02133  -0.02572
+   6        3S          0.01794   0.43754   0.00000   0.00000   0.00000
+   7        3PX         0.00000   0.00000   0.04855   0.20170   0.20857
+   8        3PY         0.00000   0.00000  -0.00365   0.21188  -0.20405
+   9        3PZ         0.00000   0.00000   0.29012  -0.03108  -0.03747
+  10        4S         -0.00626   0.28868   0.00000   0.00000   0.00000
+  11        4PX         0.00000   0.00000   0.03318   0.13786   0.14256
+  12        4PY         0.00000   0.00000  -0.00250   0.14482  -0.13947
+  13        4PZ         0.00000   0.00000   0.19830  -0.02125  -0.02561
+  14        5S         -0.00354   0.02366   0.00000   0.00000   0.00000
+  15        5PX         0.00000   0.00000   0.00218   0.00908   0.00939
+  16        5PY         0.00000   0.00000  -0.00016   0.00954  -0.00918
+  17        5PZ         0.00000   0.00000   0.01306  -0.00140  -0.00169
+  18        6D 0        0.00000   0.00000  -0.00001   0.00177   0.00553
+  19        6D+1        0.00000   0.00000   0.00226  -0.01342  -0.01789
+  20        6D-1        0.00000   0.00000  -0.00275   0.01842  -0.01334
+  21        6D+2        0.00000   0.00000  -0.02277  -0.00334  -0.00050
+  22        6D-2        0.00000   0.00000   0.00258   0.00198  -0.00294
+  23 2   H  1S          0.00029   0.08532   0.09570   0.11528  -0.10145
+  24        2S         -0.00309   0.10262   0.13585   0.16366  -0.14402
+  25        3S          0.00304  -0.00186   0.05892   0.07099  -0.06247
+  26        4PX         0.00023  -0.00203   0.00034   0.00683   0.01131
+  27        4PY         0.00152  -0.01350  -0.01238  -0.00521   0.00379
+  28        4PZ         0.00095  -0.00844   0.00538  -0.01059   0.00641
+  29 3   H  1S          0.00029   0.08532  -0.09968   0.09287   0.11908
+  30        2S         -0.00309   0.10262  -0.14150   0.13183   0.16905
+  31        3S          0.00304  -0.00186  -0.06138   0.05718   0.07332
+  32        4PX         0.00131  -0.01168   0.01318  -0.00120  -0.00379
+  33        4PY        -0.00014   0.00128  -0.00137   0.01063  -0.00771
+  34        4PZ        -0.00123   0.01094   0.00271   0.00820   0.01063
+  35 4   H  1S          0.00029   0.08532   0.11279  -0.11022   0.08872
+  36        2S         -0.00309   0.10262   0.16011  -0.15647   0.12594
+  37        3S          0.00304  -0.00186   0.06945  -0.06787   0.05463
+  38        4PX         0.00006  -0.00053   0.00162   0.00960   0.00891
+  39        4PY        -0.00142   0.01263   0.01329  -0.00365   0.00143
+  40        4PZ         0.00111  -0.00990   0.00246   0.00892  -0.00998
+  41 5   H  1S          0.00029   0.08532  -0.10881  -0.09793  -0.10635
+  42        2S         -0.00309   0.10262  -0.15446  -0.13902  -0.15098
+  43        3S          0.00304  -0.00186  -0.06700  -0.06030  -0.06549
+  44        4PX        -0.00160   0.01424  -0.01246  -0.00413  -0.00496
+  45        4PY         0.00005  -0.00041   0.00025   0.00988  -0.00874
+  46        4PZ        -0.00083   0.00740   0.00541  -0.00824  -0.00912
+                           6         7         8         9        10
+                           V         V         V         V         V
+     EIGENVALUES --     0.02127   0.06927   0.06927   0.06927   0.15565
+   1 1   C  1S          0.04397   0.00000   0.00000   0.00000   0.00000
+   2        2S          0.07298   0.00000   0.00000   0.00000   0.00000