Beispiel #1
0
def getSolventList():
    """
    Return list of solvent molecules for initializing solvation search form.
    """
    loadDatabase('solvation','')
    SolventList = [(entry.label, index) for index,entry in database.solvation.libraries['solvent'].entries.iteritems()]
    return SolventList
Beispiel #2
0
                software=form.cleaned_data["software"].encode(),
                method=form.cleaned_data["method"].encode(),
                fileStore=form.cleaned_data["fileStore"].encode(),
                scratchDirectory=form.cleaned_data["scratchDirectory"].encode(),
                onlyCyclics=form.cleaned_data["onlyCyclics"],
                maxRadicalNumber=form.cleaned_data["maxRadicalNumber"],
            )

        # Save the input.py file
        self.rmg.saveInput(self.savepath)


################################################################################
# DATABASE MODELS
################################################################################
loadDatabase("thermo", "libraries")
loadDatabase("kinetics", "libraries")
ThermoLibraries = [(label, label) for label, library in database.thermo.libraries.iteritems()]
ThermoLibraries.sort()
KineticsLibraries = [(label, label) for label, library in database.kinetics.libraries.iteritems()]
KineticsLibraries.sort()


class ThermoLibrary(models.Model):
    input = models.ForeignKey(Input, related_name="thermo_libraries")
    thermolib = models.CharField(choices=ThermoLibraries, max_length=200, blank=True)

    def __unicode__(self):
        return self.thermolib

Beispiel #3
0
            self.rmg.pressureDependence.model = interpolation
        
        # Additional Options
        self.rmg.units = 'si' 
        self.rmg.saveRestartPeriod = Quantity(form.cleaned_data['saveRestartPeriod'], form.cleaned_data['saveRestartPeriodUnits'].encode()) if form.cleaned_data['saveRestartPeriod'] else None
        self.rmg.drawMolecules = form.cleaned_data['drawMolecules']
        self.rmg.generatePlots = form.cleaned_data['generatePlots']
        self.rmg.saveSimulationProfiles = form.cleaned_data['saveSimulationProfiles']

        # Save the input.py file        
        self.rmg.saveInput(self.savepath)

################################################################################
# DATABASE MODELS
################################################################################
loadDatabase('thermo','libraries')
loadDatabase('kinetics','libraries')
ThermoLibraries = [(label, label) for label, library in database.thermo.libraries.iteritems()]
ThermoLibraries.sort()
KineticsLibraries = [(label, label) for label, library in database.kinetics.libraries.iteritems()]
KineticsLibraries.sort()

class ThermoLibrary(models.Model):
    input = models.ForeignKey(Input, related_name = 'thermo_libraries')
    thermolib = models.CharField(choices = ThermoLibraries, max_length=200, blank=True)
    def __unicode__(self):
        return self.thermolib

class ReactionLibrary(models.Model):
    input = models.ForeignKey(Input, related_name = 'reaction_libraries')
    reactionlib = models.CharField(choices = KineticsLibraries, max_length=200, blank=True)
Beispiel #4
0
                method=form.cleaned_data['method'].encode(),
                fileStore=form.cleaned_data['fileStore'].encode(),
                scratchDirectory=form.cleaned_data['scratchDirectory'].encode(
                ),
                onlyCyclics=form.cleaned_data['onlyCyclics'],
                maxRadicalNumber=form.cleaned_data['maxRadicalNumber'],
            )

        # Save the input.py file
        self.rmg.saveInput(self.savepath)


################################################################################
# DATABASE MODELS
################################################################################
loadDatabase('thermo', 'libraries')
loadDatabase('kinetics', 'libraries')
ThermoLibraries = [(label, label)
                   for label, library in database.thermo.libraries.iteritems()]
ThermoLibraries.sort()
KineticsLibraries = [
    (label, label)
    for label, library in database.kinetics.libraries.iteritems()
]
KineticsLibraries.sort()


class ThermoLibrary(models.Model):
    input = models.ForeignKey(Input, related_name='thermo_libraries')
    thermolib = models.CharField(choices=ThermoLibraries,
                                 max_length=200,