Package ComboCode :: Package cc :: Package modeling :: Package codes :: Module Chemistry :: Class Chemistry
[hide private]
[frames] | no frames]

Class Chemistry

source code


Class that includes all methods required for creating an Chemistry model.

Instance Methods [hide private]
 
__init__(self, path_chemistry='runTest', replace_db_entry=0, db=None, single_session=0)
Initializing an instance of ModelingSession.
source code
bool
setCommandKey(self, comm_key, star, star_key=None, alternative=None)
Try setting a key in the command_list from a star instance.
source code
 
cCL(self, *args, **kwargs)
Short-hand helper function for compareCommandLists.
source code
bool
checkDatabase(self)
Checking Chemistry database.
source code
 
doChemistry(self, star)
Running Chemistry.
source code

Inherited from cc.modeling.codes.ModelingSession.ModelingSession: compareCommandLists, makeNewId

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, path_chemistry='runTest', replace_db_entry=0, db=None, single_session=0)
(Constructor)

source code 

Initializing an instance of ModelingSession.

Parameters:
  • db (Database()) - the Chemistry database

    (default: None)

  • replace_db_entry (bool) - replace an entry in the Chemistry database with a newly calculated model with a new model id (for instance if some general data not included in the inputfiles is changed)

    (default: 0)

  • path_chemistry (string) - modeling folder in Chemistry home

    (default: 'runTest')

  • new_entries (list[str]) - The new model_ids when replace_db_entry is 1 of other models in the grid. These are not replaced!

    (default: [])

  • single_session (bool) - If this is the only CC session. Speeds up db check.

    (default: 0)

Overrides: object.__init__

setCommandKey(self, comm_key, star, star_key=None, alternative=None)

source code 

Try setting a key in the command_list from a star instance.

If the key is unknown, it is left open and will be filled in from the standard gastronoom inputfile.

Parameters:
  • comm_key (string) - the name of the keyword in the command list
  • star (Star()) - Parameter set for this session
  • star_key (string) - the name of the keyword in Star() (minus '_%s' %key_type (DUST or GAS), which is added as well in a second attempt if the first without the addition is not found). If None, it's equal to comm_key

    (default: None)

  • alternative (string) - a default value passed from the standard inputfile that is used if the keyword or the keyword + '_%s'%key_type is not found in Star().

    (default: None)

Returns: bool
Success?
Overrides: cc.modeling.codes.ModelingSession.ModelingSession.setCommandKey

cCL(self, *args, **kwargs)

source code 

Short-hand helper function for compareCommandLists.

Overrides: cc.modeling.codes.ModelingSession.ModelingSession.cCL

checkDatabase(self)

source code 

Checking Chemistry database.

Returns: bool
The presence of the Chemistry model in the database

doChemistry(self, star)

source code 

Running Chemistry.

Parameters:
  • star (Star()) - The parameter set for this session