Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change api #1

Closed
kiranvad opened this issue Aug 29, 2020 · 0 comments
Closed

Change api #1

kiranvad opened this issue Aug 29, 2020 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@kiranvad
Copy link
Owner

Currently the api involves initiating a mechanism with seperate lists of species and reactions. Species can be obtained from the mechanism. So we change the api to the following:

A = Specie('A', C0=1e-6)
B = Specie('B')
C = Specie('C')
D = Specie('D')

R1 = ChargeTransfer([(A,1),('e',1)],[(B,1)],E0=0.0, ks=1.0e1)
R2 = ChemicalReaction([(B,1),(C,1)],[(A,1),(D,1)], kf=1e8, kb=1e-5)

A reaction now takes tuple of the form (specie, coefficient) instead of dictionary with {'specie.name':coefficient}.

A mechanism can now be initiated by just passing the list of reactions as follows:

rxn = [R1, R2]
mech = Mechanism(rxn)

Also few performances issues needs to be addressed:

  1. Species order to generate input file should be solution species followed surface reaction species.
  2. Species should also follow the order : species on the left side of equations should come first in the
    self.species = species
  3. input files that change for every simulation should be untracked and removed from repository.
@kiranvad kiranvad added bug Something isn't working enhancement New feature or request labels Aug 29, 2020
@kiranvad kiranvad self-assigned this Aug 29, 2020
kiranvad pushed a commit that referenced this issue Aug 29, 2020
kiranvad pushed a commit that referenced this issue Aug 29, 2020
@kiranvad kiranvad mentioned this issue Sep 13, 2020
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant