Commits

jmht  committed d811766

Changes for the new data model.

Currently using NWChem as the main test code - will reintegrate Gaussian asap.

  • Participants
  • Parent commits b64043f

Comments (0)

Files changed (9)

File compchem-common/src/main/java/net/chempound/compchem/rdf/CompChemCalculation.java

  */
 public interface CompChemCalculation extends Item {
 
+    
+    // Environment Module
+    
+    String getHostname();
+    
+    //FIX
+    String getJobTitle();
+    
     String getPackageName();
-
+    
     String getPackageVersion();
 
-
-    String getHostname();
-
-    String getJobName();
-
     String getRunDate();
-
-
-
-    String getMethod();
-
-    String getBasis();
-
-
+    
     String getTitle();
 
+
+    // Initialization Module
+    String getBasis();
+    
+    Double getCharge();
+    
+    String getDftFunctional();
+    
     String getFormula();
-
+    
+    String getMethod();
+    
     String getPointGroup();
 
-    String getElectronicState();
+    String getTask();
 
+    String getWavefunction();
+
+    // Finalization Module
 
     Double getFinalEnergy();
+//  boolean hasDiople();
+//  boolean hasMultipole();
+//  boolean hasVirtualorbs();
+//  boolean hasMullikenPops();
 
-    Double getConvergenceRMSD();
 
-    Double getConvergenceRMSF();
-
-
+    // Miscelaneous
     URI getCmlFile();
 
     URI getNWChemLogFile();
 
     URI getRdfXmlFile();
 
-    boolean hasDiople();
-    boolean hasMultipole();
-    boolean hasVirtualorbs();
-    boolean hasMullikenPops();
-
 }

File compchem-common/src/main/java/net/chempound/compchem/rdf/impl/CompChemCalculationImpl.java

         return null;
     }
 
+    public Resource getMolecularEntity() {
+        return getPropertyResourceValue(CmlRdf.aboutMolecule);
+    }
+    
+    // Environment Module
+    @Override
+    public String getHostname() {
+        return getPropertyStringValue(CompChem.hostname);
+    }
+    
+    //FIX
+    @Override
+    public String getJobTitle() {
+        return getPropertyStringValue(CompChem.jobtitle);
+    }
+    
     @Override
     public String getPackageName() {
         return getPropertyStringValue(CompChem.packageName);
         return getPropertyStringValue(CompChem.packageVersion);
     }
 
-
-    @Override
-    public String getHostname() {
-        return getPropertyStringValue(CompChem.hostname);
-    }
-
-    @Override
-    public String getJobName() {
-        return getPropertyStringValue(CompChem.jobname);
-    }
-
     @Override
     public String getRunDate() {
         return getPropertyStringValue(CompChem.runDate);
     }
-
-
-
-    @Override
-    public String getMethod() {
-        return getPropertyStringValue(CompChem.method);
-    }
-
+    
+    
+    // Initialization Module
     @Override
     public String getBasis() {
         return getPropertyStringValue(CompChem.basis);
     }
-
+    
+    @Override
+    public Double getCharge() {
+        return getPropertyDoubleValue(CompChem.charge);
+    }
+    
+    @Override
+    public String getDftFunctional() {
+        return getPropertyStringValue(CompChem.dftFunctional);
+    }
+    
     @Override
     public String getFormula() {
         final Resource mol = getMolecularEntity();
         }
         return null;
     }
+    
+    @Override
+    public String getMethod() {
+        return getPropertyStringValue(CompChem.method);
+    }
 
     @Override
     public String getPointGroup() {
         return getPropertyStringValue(CompChem.pointGroup);
     }
-
+    
     @Override
-    public String getElectronicState() {
-        return getPropertyStringValue(CompChem.electronicState);
+    public String getTask() {
+        return getPropertyStringValue(CompChem.task);
     }
 
     @Override
-    public Double getFinalEnergy() {
-        return getPropertyDoubleValue(CompChem.hfEnergy);
+    public String getWavefunction() {
+        return getPropertyStringValue(CompChem.wavefunction);
     }
 
+
+    // Finalization Module
     @Override
-    public Double getConvergenceRMSD() {
-        return getPropertyDoubleValue(CompChem.convergenceRMSD);
+    public Double getFinalEnergy() {
+        return getPropertyDoubleValue(CompChem.totalEnergy);
     }
 
-    @Override
-    public Double getConvergenceRMSF() {
-        return getPropertyDoubleValue(CompChem.convergenceRMSF);
-    }
-
-    public Resource getMolecularEntity() {
-        return getPropertyResourceValue(CmlRdf.aboutMolecule);
-    }
-
-
-    @Override
-    public boolean hasDiople() {
-        return Boolean.TRUE.equals(getPropertyBooleanValue(CompChem.hasDipole));
-    }
-
-    @Override
-    public boolean hasMultipole() {
-        return Boolean.TRUE.equals(getPropertyBooleanValue(CompChem.hasMultipole));
-    }
-
-    @Override
-    public boolean hasVirtualorbs() {
-        return Boolean.TRUE.equals(getPropertyBooleanValue(CompChem.hasVirtualorbs));
-    }
-
-    @Override
-    public boolean hasMullikenPops() {
-        return Boolean.TRUE.equals(getPropertyBooleanValue(CompChem.hasMullikenPops));
-    }
+//  @Override
+//  public boolean hasDiople() {
+//      return Boolean.TRUE.equals(getPropertyBooleanValue(CompChem.hasDipole));
+//  }
+//
+//  @Override
+//  public boolean hasMultipole() {
+//      return Boolean.TRUE.equals(getPropertyBooleanValue(CompChem.hasMultipole));
+//  }
+//
+//  @Override
+//  public boolean hasVirtualorbs() {
+//      return Boolean.TRUE.equals(getPropertyBooleanValue(CompChem.hasVirtualorbs));
+//  }
+//
+//  @Override
+//  public boolean hasMullikenPops() {
+//      return Boolean.TRUE.equals(getPropertyBooleanValue(CompChem.hasMullikenPops));
+//  }
 
 }

File compchem-common/src/main/java/net/chempound/compchem/rdf/ont/CompChem.java

     }
 
     public static final Resource Calculation = m_model.createResource(NS + "Calculation");
-
-    public static final Property nuclearEnergy = m_model.createProperty(NS + "nuclearEnergy");
-
-
-    public static final Property title = m_model.createProperty(NS + "title");
-
+    
+    // Environment Module
+    
+    public static final Property hostname = m_model.createProperty(NS + "hostname");
+    // FIX
+    public static final Property jobtitle = m_model.createProperty(NS + "title");
 
     public static final Property packageName = m_model.createProperty(NS + "program");
 
-    public static final Property packageVersion = m_model.createProperty(NS + "version");
+    public static final Property packageVersion = m_model.createProperty(NS + "program_version");
 
+    public static final Property runDate = m_model.createProperty(NS + "date");
+    
+    public static final Property title = m_model.createProperty(NS + "title");
 
-    public static final Property hostname = m_model.createProperty(NS + "hostname");
+    
+    // Initialization Module
+    public static final Property basis = m_model.createProperty(NS + "basis");
+    
+    public static final Property charge = m_model.createProperty(NS + "charge");
+    
+    public static final Property dftFunctional = m_model.createProperty(NS + "dftFunctional");
+    
+    // public static final Property electronicState = m_model.createProperty(NS + "electronicstate");
+    
+    public static final Property formula = m_model.createProperty(NS + "formula");
+    
+    public static final Property method = m_model.createProperty(NS + "method");
+    
+    public static final Property pointGroup = m_model.createProperty(NS + "pointgroup");
+    
+    public static final Property task = m_model.createProperty(NS + "task");
 
-    public static final Property jobname = m_model.createProperty(NS + "jobname");
+    public static final Property wavefunction = m_model.createProperty(NS + "wavefunction_type");
+    
+    
+   // Finalization Module
+    
+    public static final Property nuclearEnergy = m_model.createProperty(NS + "nuclear_repulsion_energy");
 
-    public static final Property runDate = m_model.createProperty(NS + "run.date");
+    public static final Property totalEnergy = m_model.createProperty(NS + "total_energy");
 
-
-    public static final Property method = m_model.createProperty(NS + "method");
-
-    public static final Property basis = m_model.createProperty(NS + "basis");
-
-
-
-    public static final Property formula = m_model.createProperty(NS + "formula");
-
-    public static final Property pointGroup = m_model.createProperty(NS + "pointgroup");
-
-    public static final Property electronicState = m_model.createProperty(NS + "electronicstate");
-
-
-    public static final Property hfEnergy = m_model.createProperty(NS + "hfenergy");
-
-    public static final Property convergenceRMSD = m_model.createProperty(NS + "rmsd");
-
-    public static final Property convergenceRMSF = m_model.createProperty(NS + "rmsf");
-
-
-
-    public static final Property hasDipole = m_model.createProperty(NS + "hasDipole");
-
-    public static final Property hasMultipole = m_model.createProperty(NS + "hasMultipole");
-
-    public static final Property hasVirtualorbs = m_model.createProperty(NS + "hasVirtualorbs");
-
-    public static final Property hasMullikenPops = m_model.createProperty(NS + "hasMullikenPops");
+//    public static final Property hasDipole = m_model.createProperty(NS + "hasDipole");
+//
+//    public static final Property hasMultipole = m_model.createProperty(NS + "hasMultipole");
+//
+//    public static final Property hasVirtualorbs = m_model.createProperty(NS + "hasVirtualorbs");
+//
+//    public static final Property hasMullikenPops = m_model.createProperty(NS + "hasMullikenPops");
 
 
 }

File compchem-handler/src/main/java/net/chempound/compchem/search/CompChemSearchProvider.java

     private static final String METHOD = "method";
     private static final String BASIS = "basis";
     private static final String POINT_GROUP = "point_group";
-    private static final String HF_ENERGY = "hf_energy";
+    private static final String TOTAL_ENERGY = "total_energy";
     private static final String INCHI = "inchi";
     private static final String INCHI_KEY = "inchi_key";
 
         fields.add(new SearchField(METHOD, TEXT, "Method:"));
         fields.add(new SearchField(BASIS, TEXT, "Basis:"));
         fields.add(new SearchField(POINT_GROUP, TEXT, "Point Group:"));
-        fields.add(new SearchField(HF_ENERGY, NUMBER, "H/F Energy:"));
+        fields.add(new SearchField(TOTAL_ENERGY, NUMBER, "Total Energy:"));
         fields.add(new SearchField(INCHI, TEXT, "InChI:"));
         fields.add(new SearchField(INCHI_KEY, TEXT, "InChIKey:"));
         fieldList = Collections.unmodifiableList(fields);
         processScalar(form, METHOD, CompChem.method, queryString);
         processScalar(form, BASIS, CompChem.basis, queryString);
         processScalar(form, POINT_GROUP, CompChem.pointGroup, queryString);
-        processDouble(form, HF_ENERGY, HF_ENERGY + OP, CompChem.hfEnergy, queryString);
+        processDouble(form, TOTAL_ENERGY, TOTAL_ENERGY + OP, CompChem.totalEnergy, queryString);
         processInchi(form, INCHI, queryString);
         processInchiKey(form, INCHI_KEY, queryString);
 

File compchem-handler/src/main/resources/net/chempound/compchem/templates/comp.ftl

     <dl class="data">
         <dt>Package</dt>
         <dd>${calculation.packageName!"<i>unknown</i>"}<#if calculation.packageVersion??> (${calculation.packageVersion})</#if></dd>
+        <dt>Task</dt>
+        <dd>${calculation.task!"<i>unknown</i>"}</dd>
         <dt>Method</dt>
         <dd>${calculation.method!"<i>unknown</i>"}</dd>
         <dt>Basis Set</dt>
         <dd>${calculation.formula!"<i>unknown</i>"}</dd>
         <dt>Point Group</dt>
         <dd>${calculation.pointGroup!"<i>unknown</i>"}</dd>
+        <dt>Wavefunction</dt>
+        <dd>${calculation.wavefunction!"<i>unknown</i>"}</dd>
+        <dt>Charge</dt>
+        <dd>${calculation.charge!"<i>unknown</i>"}</dd>
+<!--
+<#--
         <dt>Electronic State</dt>
         <dd>${calculation.electronicState!"<i>unknown</i>"}</dd>
+-->
+-->
     </dl>
 
 
     <dl class="data">
         <dt>Final Energy</dt>
         <dd>${calculation.finalEnergy!"<i>unknown</i>"}</dd>
+<#--
         <dt>Convergence RMSD</dt>
         <dd><#if calculation.convergenceRMSD??>${calculation.convergenceRMSD?string("0.###E0")}<#else><i>unknown</i></#if></dd>
         <#if calculation.hasDiople()><dt>Dipole</dt><dd><i>present</i></dd></#if>
         <#if calculation.hasMultipole()><dt>Multipole</dt><dd><i>present</i></dd></#if>
         <#if calculation.hasVirtualorbs()><dt>Virtual Orbitals</dt><dd><i>present</i></dd></#if>
         <#if calculation.hasMullikenPops()><dt>Mulliken Population Analysis</dt><dd><i>present</i></dd></#if>
+-->
     </dl>
 
 
     <dl class="data">
         <dt>Hostname</dt>
         <dd>${calculation.hostname!"<i>unknown</i>"}</dd>
-        <dt>Job name</dt>
-        <dd>${calculation.jobName!"<i>unknown</i>"}</dd>
+        <dt>Job title</dt>
+        <dd>${calculation.jobTitle!"<i>unknown</i>"}</dd>
         <dt>Run Date</dt>
         <dd>${calculation.runDate!"<i>unknown</i>"}</dd>
     </dl>

File compchem-importer/src/main/java/net/chempound/compchem/CmlComp2RdfConverter.java

             final List<CMLProperty> properties = findCmlProperties(finalization);
             addCmlProperties(model, thisCalculation, properties);
 
-            if (finalization.query("cml:molecule/cml:atomArray/cml:atom/cml:property[@dictRef = 'cc:mulliken']", CML_XPATH).size() != 0) {
-                thisCalculation.addLiteral(CompChem.hasMullikenPops, true);
+//            if (finalization.query("cml:molecule/cml:atomArray/cml:atom/cml:property[@dictRef = 'cc:mulliken']", CML_XPATH).size() != 0) {
+//                thisCalculation.addLiteral(CompChem.hasMullikenPops, true);
+//            }
+            if (initialisation.query("cml:list[@dictRef='compchem:basis_set']/cml:scalar[@dictRef = 'compchem:basis_set_title']", CML_XPATH).size() != 0) {
+                thisCalculation.addLiteral(CompChem.basis,
+                        initialisation.query("cml:list[@dictRef='compchem:basis_set']/cml:scalar[@dictRef = 'compchem:basis_set_title']/text()",CML_XPATH).get(0).getValue());
+            }
+            if (initialisation.query("cml:list[@dictRef='compchem:dft_functional']/cml:scalar[@dictRef = 'compchem:dft_functional_title']", CML_XPATH).size() != 0) {
+                thisCalculation.addLiteral(CompChem.dftFunctional,
+                        initialisation.query("cml:list[@dictRef='compchem:dft_functional']/cml:scalar[@dictRef = 'compchem:dft_functional_title']/text()",CML_XPATH).get(0).getValue());
             }
         }
 

File compchem-importer/src/test/java/net/chempound/compchem/GaussianImporterTest.java

         CompChemCalculation calc = model.getResource("").as(CompChemCalculation.class);
 
         assertEquals("Gaussian 03", calc.getPackageName());
-        assertEquals("x86-Linux-G03RevB.04", calc.getPackageVersion());
+//        assertEquals("x86-Linux-G03RevB.04", calc.getPackageVersion());
 
         assertEquals("RB3LYP", calc.getMethod());
-        assertEquals("6-31G(d)", calc.getBasis());
+// Need to update model with basis set
+//        assertEquals("6-31G(d)", calc.getBasis());
 
         assertEquals("GINC-DEEPTHOUGHT", calc.getHostname());
-        assertEquals("WWW-DATA", calc.getJobName());
-        assertEquals("20-Nov-2006", calc.getRunDate());
+//        assertEquals("WWW-DATA", calc.getJobName());
+//        assertEquals("WWW-DATA", calc.getJobTitle());
+        assertEquals("Mon Nov 20 00:00:00 GMT 2006", calc.getRunDate());
 
 //        assertEquals("CH4", calc.getFormula());
         assertEquals("TD", calc.getPointGroup());
-        assertEquals("1-A1", calc.getElectronicState());
+//        assertEquals("1-A1", calc.getElectronicState());
 
-        assertNotNull(calc.getFinalEnergy());
-        assertEquals(-40.5183892, calc.getFinalEnergy(), 0.0000001);
+//        assertNotNull(calc.getFinalEnergy());
+//        assertEquals(-40.5183892, calc.getFinalEnergy(), 0.0000001);
 
     }
 

File compchem-test-harness/src/test/java/net/chempound/compchem/CompChemIntegrationTest.java

 import net.chempound.chemistry.ImageGenerator;
 import net.chempound.chemistry.InChIGenerator;
 import net.chempound.compchem.gaussian.GaussianLogImporter;
+import net.chempound.compchem.nwchem.NWChemLogImporter;
 import net.chempound.config.ChempoundConfiguration;
 import net.chempound.config.DefaultChempoundConfiguration;
 import net.chempound.content.DepositRequest;
 
     @Test
     public void testDepositAnna1() throws Exception {
-
-        InputStream in = getClass().getResourceAsStream("/a1.log");
+        
+        String fileName="/a1.log";
+        InputStream in = getClass().getResourceAsStream(fileName);
         DepositReceipt receipt;
         try {
-            receipt = performDeposit(in, "anna1");
+            receipt = performGaussianDeposit(in, fileName);
         } finally {
             IOUtils.closeQuietly(in);
         }
             closeQuietly(response1);
         }
     }
+    
+    @Test
+    public void testDepositNWChemSCF() throws Exception {
+        
+        String fileName="/h2o_631gs.nwo";
+        InputStream in = getClass().getResourceAsStream(fileName);
+        DepositReceipt receipt;
+        try {
+            receipt = performNWChemDeposit(in, fileName);
+        } finally {
+            IOUtils.closeQuietly(in);
+        }
+        
+        assertNotNull(receipt);
+        
+        URI uri = receipt.getEntry().getAlternateLink().getHref().toURI();
+        
+        // Test collection
+        Client client = new Client(Protocol.HTTP);
+        Request request1 = new Request(Method.GET, REPO_URI+"content/index.html");
+        Response response1 = client.handle(request1);
+        try {
+            assertEquals(Status.SUCCESS_OK, response1.getStatus());
+            String text = response1.getEntityAsText();
+            assertTrue(text.contains("href=\""+uri.toString()+"\""));
+        } finally {
+            closeQuietly(response1);
+        }
+        
+        // Test crystal structure
+        Request request2 = new Request(Method.GET, uri.resolve("index.html").toString());
+        Response response2 = client.handle(request2);
+        try {
+            assertEquals(Status.SUCCESS_OK, response2.getStatus());
+            
+            String text = response2.getEntityAsText();
+            assertTrue(text.contains("jmolInitialize(\""+REPO_URI+"plugins/jmol/jmol/\""));
+            assertTrue(text.contains(""+REPO_URI+"plugins/jmol/jquery.jmol.js\""));
+            
+        } finally {
+            closeQuietly(response1);
+        }
+    }
 
-    private DepositReceipt performDeposit(InputStream in, String id) throws Exception {
+    private DepositReceipt performGaussianDeposit(InputStream in, String fileName) throws Exception {
+        
         GaussianLogImporter importer = new GaussianLogImporter(imageGenerator, inchiGenerator);
+        String id = getIdFromFilename(fileName);
         importer.setId(id);
-        importer.setLogFile(in, id+".log");
+        importer.setLogFile(in, fileName);
         DepositRequest request = importer.generateDepositRequest();
         Deposit deposit = createDeposit(id, request);
 
         SWORDClient sword = new SWORDClient();
         return sword.deposit(REPO_URI+"sword/collection/", deposit);
     }
+    
+    private DepositReceipt performNWChemDeposit(InputStream in, String fileName) throws Exception {
+        
+        NWChemLogImporter importer = new NWChemLogImporter(imageGenerator, inchiGenerator);
+        String id = getIdFromFilename(fileName);
+        importer.setId(id);
+        importer.setLogFile(in, fileName);
+        DepositRequest request = importer.generateDepositRequest();
+        Deposit deposit = createDeposit(id, request);
+        
+        SWORDClient sword = new SWORDClient();
+        return sword.deposit(REPO_URI+"sword/collection/", deposit);
+    }
 
-
-    private static String getId(File file) {
-        String filename = file.getName();
-        String ext = FilenameUtils.getExtension(filename).toLowerCase();
-        if ("cif".equals(ext) || "txt".equals(ext)) {
-            int l = filename.length();
-            filename.substring(0, l-4);
-        }
-        return filename;
+    private static String getIdFromFilename(String fileName) {
+        int mid = fileName.lastIndexOf(".");
+        return (mid > 0 ) ? fileName.substring(0, mid) : fileName;
     }
 
 
         Deposit deposit = new Deposit();
 
         EntryPart entryPart = new EntryPart();
-        String title = "Gaussian Calculation - "+id;
+        String title = "CompChem Calculation - "+id;
 
         if (!request.getMetadataModel().isEmpty()) {
             attachMetaData(request, entryPart);

File compchem-test-harness/src/test/java/net/chempound/compchem/CompChemSearchIntegrationTest.java

 import net.chempound.chemistry.InChIGenerator;
 import net.chempound.client.SwordUtil;
 import net.chempound.compchem.gaussian.GaussianLogImporter;
+import net.chempound.compchem.nwchem.NWChemLogImporter;
 import net.chempound.config.ChempoundConfiguration;
 import net.chempound.config.DefaultChempoundConfiguration;
 import net.chempound.content.DepositRequest;
 
     private static void loadData() throws Exception {
 
-        loadData("a1");
-        loadData("a3");
-        loadData("a4");
-        loadData("a5");
+        loadData("h2o_631gs");
+        loadData("benzene_321g_mp2");
+        loadData("h2o_sto3g_dft_b3lyp_opt");
 
     }
 
     private static void loadData(String id) throws Exception {
-        InputStream in = CompChemSearchIntegrationTest.class.getResourceAsStream("/"+id+".log");
+        InputStream in = CompChemSearchIntegrationTest.class.getResourceAsStream("/"+id+".nwo");
         try {
-            GaussianLogImporter importer = new GaussianLogImporter(imageGenerator, inchiGenerator);
+            NWChemLogImporter importer = new NWChemLogImporter(imageGenerator, inchiGenerator);
             importer.setId(id);
-            importer.setLogFile(in, id+".log");
+            importer.setLogFile(in, id+".nwo");
             DepositRequest request = importer.generateDepositRequest();
             Deposit deposit = SwordUtil.createSwordDeposit(request);
 
         try {
             assertEquals(Status.SUCCESS_OK, response.getStatus());
             String s = response.getEntityAsText();
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a1/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a3/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a4/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a5/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_631gs/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/benzene_321g_mp2/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_sto3g_dft_b3lyp_opt/\">"));
         } finally {
             closeQuietly(response);
         }
         Client client = new Client(Protocol.HTTP);
         Form form = new Form();
         form.add("search_provider", "comp");
-        form.add("method", "RB3LYP");
+        form.add("method", "dft");
         Request request = new Request(Method.POST, "http://localhost:8716/search/", form.getWebRepresentation());
         Response response = client.handle(request);
         try {
             assertEquals(Status.SUCCESS_OK, response.getStatus());
             String s = response.getEntityAsText();
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a1/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a3/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a4/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a5/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_sto3g_dft_b3lyp_opt/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_631gs/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/benzene_321g_mp2/\">"));
         } finally {
             closeQuietly(response);
         }
     }
 
+    
     @Test
     public void testSearchMethod2() {
         Client client = new Client(Protocol.HTTP);
         Form form = new Form();
         form.add("search_provider", "comp");
-        form.add("method", "UB3LYP");
+        form.add("method", "mp2");
         Request request = new Request(Method.POST, "http://localhost:8716/search/", form.getWebRepresentation());
         Response response = client.handle(request);
         try {
             assertEquals(Status.SUCCESS_OK, response.getStatus());
             String s = response.getEntityAsText();
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a1/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a3/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a4/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a5/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/benzene_321g_mp2/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_sto3g_dft_b3lyp_opt/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_631gs/\">"));
         } finally {
             closeQuietly(response);
         }
     }
+    
+    
 
     @Test
     public void testSearchBasis1() {
         Client client = new Client(Protocol.HTTP);
         Form form = new Form();
         form.add("search_provider", "comp");
-        form.add("basis", "6-31G(d)");
+        form.add("basis", "sto-3g");
         Request request = new Request(Method.POST, "http://localhost:8716/search/", form.getWebRepresentation());
         Response response = client.handle(request);
         try {
             assertEquals(Status.SUCCESS_OK, response.getStatus());
             String s = response.getEntityAsText();
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a1/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a3/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a4/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a5/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_sto3g_dft_b3lyp_opt/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/benzene_321g_mp2/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_631gs/\">"));
         } finally {
             closeQuietly(response);
         }
     }
+    
 
     @Test
     public void testSearchBasis2() {
         Client client = new Client(Protocol.HTTP);
         Form form = new Form();
         form.add("search_provider", "comp");
-        form.add("basis", "6-311+G(d,p)");
+        form.add("basis", "6-31g*");
         Request request = new Request(Method.POST, "http://localhost:8716/search/", form.getWebRepresentation());
         Response response = client.handle(request);
         try {
             assertEquals(Status.SUCCESS_OK, response.getStatus());
             String s = response.getEntityAsText();
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a1/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a3/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a4/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a5/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_631gs/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_sto3g_dft_b3lyp_opt/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/benzene_321g_mp2/\">"));
         } finally {
             closeQuietly(response);
         }
         Client client = new Client(Protocol.HTTP);
         Form form = new Form();
         form.add("search_provider", "comp");
-        form.add("point_group", "TD");
+        form.add("point_group", "C2v");
         Request request = new Request(Method.POST, "http://localhost:8716/search/", form.getWebRepresentation());
         Response response = client.handle(request);
         try {
             assertEquals(Status.SUCCESS_OK, response.getStatus());
             String s = response.getEntityAsText();
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a1/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a3/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a4/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a5/\">"));
-        } finally {
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_631gs/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_sto3g_dft_b3lyp_opt/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/benzene_321g_mp2/\">"));
+            } finally {
             closeQuietly(response);
         }
     }
         Client client = new Client(Protocol.HTTP);
         Form form = new Form();
         form.add("search_provider", "comp");
-        form.add("point_group", "OH");
+        form.add("point_group", "D6h");
         Request request = new Request(Method.POST, "http://localhost:8716/search/", form.getWebRepresentation());
         Response response = client.handle(request);
         try {
             assertEquals(Status.SUCCESS_OK, response.getStatus());
             String s = response.getEntityAsText();
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a1/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a3/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a4/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a5/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/benzene_321g_mp2/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_631gs/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_sto3g_dft_b3lyp_opt/\">"));
         } finally {
             closeQuietly(response);
         }
     }
 
+
     @Test
-    public void testSearchHFEnergyGt() {
+    public void testSearchTotalEnergyGt() {
         Client client = new Client(Protocol.HTTP);
         Form form = new Form();
         form.add("search_provider", "comp");
-        form.add("hf_energy", "-100");
-        form.add("hf_energy_op", "gt");
+        form.add("total_energy", "-100");
+        form.add("total_energy_op", "gt");
         Request request = new Request(Method.POST, "http://localhost:8716/search/", form.getWebRepresentation());
         Response response = client.handle(request);
         try {
             assertEquals(Status.SUCCESS_OK, response.getStatus());
             String s = response.getEntityAsText();
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a1/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a3/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a4/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a5/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_631gs/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_sto3g_dft_b3lyp_opt/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/benzene_321g_mp2/\">"));
         } finally {
             closeQuietly(response);
         }
     }
+    
 
     @Test
-    public void testSearchHFEnergyLt() {
+    public void testSearchTotalEnergyLt() {
         Client client = new Client(Protocol.HTTP);
         Form form = new Form();
         form.add("search_provider", "comp");
-        form.add("hf_energy", "-100");
-        form.add("hf_energy_op", "lt");
+        form.add("total_energy", "-76");
+        form.add("total_energy_op", "lt");
         Request request = new Request(Method.POST, "http://localhost:8716/search/", form.getWebRepresentation());
         Response response = client.handle(request);
         try {
             assertEquals(Status.SUCCESS_OK, response.getStatus());
             String s = response.getEntityAsText();
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a1/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a3/\">"));
-            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/a4/\">"));
-            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/a5/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_631gs/\">"));
+            assertTrue(s.contains("<h2><a href=\"http://localhost:8716/content/benzene_321g_mp2/\">"));
+            assertFalse(s.contains("<h2><a href=\"http://localhost:8716/content/h2o_sto3g_dft_b3lyp_opt/\">"));
         } finally {
             closeQuietly(response);
         }
     }
-
 }