Пример #1
0
    def __init__(self, job_parms, **job_prop):
        """
        To support the 2 ways of gamess job creation.
        """
        name = "Gamess Job 1"
        [self.job_batfile,
         self.job_outputfile] = job_prop.get('job_from_file', [None, None])
        if self.job_outputfile:
            self.job_outputfile = self.job_outputfile.strip('"')
        self.gamessJig = job_prop.get('jig', None)

        if self.job_batfile:
            server_id = job_parms['Server_id']
            self.server = ServerManager().getServerById(int(server_id))
            if not self.server:
                raise ValueError, "The server of %d can't be found." % server_id

        SimJob.__init__(self, name, job_parms)

        self.edit_cntl = GamessProp()

        #Huaicai 7/6/05: try to fix the problem when run a gamess jig coming from mmp file
        #and without opening the jig property windows and save it.
        if not self.__dict__.has_key('server'):
            sManager = ServerManager()
            self.server = sManager.getServers()[0]
        return
Пример #2
0
    def __init__(self):
        QDialog.__init__(self)
        self.setModal(True)
        self.setupUi(self)

        self.ecm_btngrp = QButtonGroup()
        self.ecm_btngrp.setExclusive(True)
        objId = 0
        for obj in self.ecm_grpbox.children():
            if isinstance(obj, QAbstractButton):
                self.ecm_btngrp.addButton(obj)
                self.ecm_btngrp.setId(obj, objId)
                objId += 1

        self.scftyp_btngrp = QButtonGroup()
        self.scftyp_btngrp.setExclusive(True)
        objId = 0
        for obj in self.scftyp_grpbox.children():
            if isinstance(obj, QAbstractButton):
                self.scftyp_btngrp.addButton(obj)
                self.scftyp_btngrp.setId(obj, objId)
                objId += 1

        self.connect(self.cancel_btn, SIGNAL("clicked()"), self.reject)
        self.connect(self.ecm_btngrp, SIGNAL("buttonPressed(int)"),
                     self.set_ecmethod)
        self.connect(self.multi_combox, SIGNAL("activated(int)"),
                     self.set_multiplicity)
        self.connect(self.run_job_btn, SIGNAL("clicked()"), self.run_job)
        self.connect(self.save_btn, SIGNAL("clicked()"), self.accept)
        self.connect(self.runtyp_combox, SIGNAL("activated(int)"),
                     self.calculate_changed)
        self.connect(self.choose_color_btn, SIGNAL("clicked()"),
                     self.change_jig_color)
        self.connect(self.whats_this_btn, SIGNAL("clicked()"), self.whats_this)
        ##self.connect(self.new_btn,SIGNAL("clicked()"),self.addServer)
        ##self.connect(self.exit_btn,SIGNAL("clicked()"),self.close)
        ##self.connect(self.server_listview,SIGNAL("currentChanged(QListViewItem*)"),self.changeServer)
        ##self.connect(self.engine_combox,SIGNAL("activated(const QString&)"),self.engineChanged)
        ##self.connect(self.del_btn,SIGNAL("clicked()"),self.deleteServer)
        self.sManager = ServerManager()
        self.servers = self.sManager.getServers()
        self.server = self.servers[0]

        self.name_linedit.setWhatsThis("""Name of the GAMESS jig.""")
        self.runtyp_combox.setWhatsThis(
            """Type of calculation, where "Energy" calculates the Energy Minima,and "Optimization" calculates the "Equilibrium Geometry"."""
        )
        self.comment_linedit.setWhatsThis(
            """Description, also placed in the comment line of the $DATA section of the INP file."""
        )
        self.choose_color_btn.setWhatsThis("""Change the GAMESS jig color.""")
        self.rhf_radiobtn.setWhatsThis(
            """Restricted Hartree-Fock.  All electrons are paired and each spatial orbital is doubly occupied.  Cannot be used with multiplicities greater than 1."""
        )
        self.uhf_radiobtn.setWhatsThis(
            """Unrestricted Hartree-Fock.  All electrons are unpaired and spatial (spin) orbitals are uniquely defined for each electron.  More time consuming, but more accurate, than ROHF.  """
        )
        self.rohf_radiobtn.setWhatsThis(
            """Restricted Open-shell Hartree-Fock.  Spin-paired electrons are assigned to doubly-occupied spatial orbitals, while electrons with unpaired spins are provided unique spatial orbitals."""
        )
        self.icharg_spinbox.setWhatsThis(
            """The total charge of the structure to be treated quantum mechanically (ICHARG)."""
        )
        self.multi_combox.setWhatsThis(
            """N + 1, where N is the number of unpaired electrons (MULT).""")
        self.memory_spinbox.setWhatsThis(
            """System memory reserved for calculation""")
        self.dirscf_checkbox.setWhatsThis(
            """Check this box to run the calculation in RAM and avoid hard disk usage for integral storage."""
        )
        self.gbasis_combox.setWhatsThis(
            """Select from among the standard Gaussian-type basis sets and semi-empirical parameters in GAMESS."""
        )
        self.checkBox10_3_2.setWhatsThis(
            """Reads the $HESS group from the output file of a previous GAMESS calculation.  Only valid for identical molecules."""
        )
        self.checkBox10_2_2_2.setWhatsThis(
            """Reads the $VEC group from the output of a previous GAMESS calculation. Requires that both the molecule and basis set be identical.  Useful for restarted calculations and starting orbitals for electron correlation methods."""
        )
        self.none_radiobtn.setWhatsThis(
            """Select this button to neglect electron correlation in the calculation."""
        )
        self.dft_radiobtn.setWhatsThis(
            """Select this button to perform a density functional theory calculation."""
        )
        self.mp2_radiobtn.setWhatsThis(
            """Select this button to perform a Second-Order Moeller Plesset calculation."""
        )
        self.dfttyp_combox.setWhatsThis(
            """Select an available density functional in GAMESS.""")
        self.gridsize_combox.setWhatsThis(
            """Select the grid spacing for the DFT calculation.""")
        self.core_electrons_checkbox.setWhatsThis(
            """Check this box to include both the valence and core electrons in the MP2 calculation."""
        )
        self.density_conv_combox.setWhatsThis(
            """Selects the accuracy of the electron density convergence for the calculation (CONV)."""
        )
        self.rmsd_combox.setWhatsThis(
            """Gradient convergence tolerance (OPTTOL), in Hartree/Bohr. Convergence of a geometry search requires the largest component of the gradient to be less than this value, and the root mean square gradient less than 1/3 of OPTTOL.  (default=0.0001)"""
        )
        self.iterations_spinbox.setWhatsThis(
            """Maximum number of SCF iteration cycles (MAXIT).""")
        self.edit_input_file_cbox.setWhatsThis(
            """Opens the INP file generated by NanoEngineer-1 in a text editor."""
        )
        self.whats_this_btn.setWhatsThis("""What's This Help Utility""")
        self.run_job_btn.setWhatsThis(
            """Save GAMESS parameters, generates the INP file and launches the GAMESS job."""
        )
        self.save_btn.setWhatsThis(
            """Save GAMESS parameters and generates the INP file.  It does not launch the GAMESS job."""
        )
        self.cancel_btn.setWhatsThis("""Cancels changes and closes dialog.""")