Closed yalinli2 closed 2 years ago
Hi Yalin,
This reply comes a little late, sorry about that! I think your concern makes sense. I removed aliases for copied chemicals. Now we have the following:
>>> from biorefineries import corn as cn
>>> chems = cn.create_chemicals()
>>> chems.Cellulose.aliases
{'C6H10O5'}
>>> chems.Starch.aliases
set()
Hope this helps, Thanks!
Wonderful, thanks @yoelcortes!
The
copy
method basically copy everything from one chemical to another, but this could cause problem for aliases setting as it bypasses the duplicate alias check.For example, in the corn biorefinery,
Starch
(and alsoFiber
,SolubleProtein
,InsolubleProtein
) is copied fromCellulose
, and they end up having the same aliases https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/1d79328e2cb60ef15392dce2ac0134c374980460/BioSTEAM%202.x.x/biorefineries/corn/_chemicals.py#L22I'm OK with just fixing it in the biorefinery setting like https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/86fa9bc440d0e7d55a637bdcfb9a91c909928c07/BioSTEAM%202.x.x/biorefineries/corn/_chemicals.py#L22
but wondering if it's better to do something on the method, thanks!