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

Rebase database test #196

Merged
merged 7 commits into from Mar 31, 2014

Conversation

nyee
Copy link
Contributor

@nyee nyee commented Mar 31, 2014

Includes the new checks I've been making to make sure the database is well formed.

This function gives the boolean of whether two LogicOr objects are
equivilant or not. I needed this for database checking
The function equivilant and isSpecificCaseOf for GroupAtom now checks the
list of charges and atom label
The function isIsomorphic was meant to compare molecules to groups,
therefore it respects wildcards (seeing as a molecule will never have an
atom named Cs or Ct). However, this makes the function isIsomorphic not
useful when tryint to compare two groups.

I've created a new function isIdentical which will not respect wildcards
and can tell if two groups are the same.
This function is used to check for malformed kinetic families. I have also
removed the function isWellFormed from base.py because it is deprecated by
this new function (and also didn't work due to the many changes we've been
making).

The new function checks for:
-rule labels that have group names which do not exist in groups.py
-rule adjLists that do not match with the corresponding adj list in
groups.py
-Each group must exist in the tree
-Each group adjList must actually be a more specific case of it's parent's adjList
Coded another check in checkWellFormed to see if each node is unique inside
of a family.
connie added a commit that referenced this pull request Mar 31, 2014
@connie connie merged commit 57fdfaa into ReactionMechanismGenerator:master Mar 31, 2014
@@ -349,9 +357,17 @@ def isSpecificCaseOf(self, other):
if radical1 == radical2 and spin1 == spin2: break
else:
return False
#Each charge in self must have an equivalent in other
for charge1 in self.charge:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should have been other.charge. Fixing now.
(update: I now think the line below should have been other.charge 😊)

@nyee nyee deleted the rebaseDatabaseTest branch April 9, 2014 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants