added household chemicals - #340
Conversation
Lyq322
left a comment
There was a problem hiding this comment.
A few things about your code:
- Class names should always be pascal case (eg CorrectClassName)
- Node names should be snake case (eg correct_node_name)
- Dictionaries should have correct indentation and formatting. See other dictionaries in global-chem for examples.
- Some SMILES in your code are invalid. Please use rdkit to double check all SMILES are valid before creating pull request. You can use
Chem.MolFromSmiles(smiles)to see if there is an error.
Other Changes:
- Change
README.mdto add your node to the list and any references you used - In
global_chem/global_chem/global_chem.pyyou need to import your nodes at the top (egfrom global_chem.environment.chemicals_from_biomass import ChemicalsFromBioMass)
| from global_chem.household_chemicals.organophosphate_flame_retardants import Organophosphate_flame_retardants | ||
| from global_chem.household_chemicals.Surface_cleaners import Surface_cleaners |
There was a problem hiding this comment.
Class names should be all capitalized to match coding style.
| from global_chem.household_chemicals.organophosphate_flame_retardants import Organophosphate_flame_retardants | |
| from global_chem.household_chemicals.Surface_cleaners import Surface_cleaners | |
| from global_chem.household_chemicals.organophosphate_flame_retardants import OrganophosphateFlameRetardants | |
| from global_chem.household_chemicals.surface_cleaners import SurfaceCleaners |
| 'mango_vitamins': MangoVitamins, # Damilola Bodun & Sevien Schulhofff | ||
| 'mango_flavonoids': MangoFlavonoids, # Damilola Bodun & Sevien Schulhofff | ||
| 'insect_sex_pheromones': InsectSexPheromones, # Yuqing Liu & Suliman Sharif | ||
| 'household_chemicals' : household_chemicals, # Kalana Kotawalagedara & Anuththara Gamage |
There was a problem hiding this comment.
You should add an entry to this list for every node, not just the folder household chemicals.
| 'household_chemicals' : household_chemicals, # Kalana Kotawalagedara & Anuththara Gamage | |
| 'bleach' : Bleach, # Kalana Kotawalagedara & Anuththara Gamage | |
| ’cosmetics’: Cosmetics, # Kalana Kotawalagedara & Anuththara Gamage | |
| # …etc |
| smarts = { | ||
|
|
||
| } |
There was a problem hiding this comment.
Indent to match coding style.
| smarts = { | |
| } | |
| smarts = { | |
| } |
| smiles = { | ||
| 'oxybenzone' : 'COC1=CC(=C(C=C1)C(=O)C2=CC=CC=C2)O', | ||
| 'hydroquinone' : 'C1=CC(=CC=C1O)O', | ||
| 'diethyl phthalate' : 'CCOC(=O)C1=CC=CC=C1C(=O)OCC', | ||
|
|
||
| } |
There was a problem hiding this comment.
Indent to match coding style.
| smiles = { | |
| 'oxybenzone' : 'COC1=CC(=C(C=C1)C(=O)C2=CC=CC=C2)O', | |
| 'hydroquinone' : 'C1=CC(=CC=C1O)O', | |
| 'diethyl phthalate' : 'CCOC(=O)C1=CC=CC=C1C(=O)OCC', | |
| } | |
| smiles = { | |
| 'oxybenzone' : 'COC1=CC(=C(C=C1)C(=O)C2=CC=CC=C2)O', | |
| 'hydroquinone' : 'C1=CC(=CC=C1O)O', | |
| 'diethyl phthalate' : 'CCOC(=O)C1=CC=CC=C1C(=O)OCC', | |
| } |
| 'hydrochloric acid' : 'Cl', | ||
| 'brass' : ' [Cu].[Zn].[Pb]', | ||
| 'chloroxylenol' : 'CC1=CC(=CC(=C1Cl)C)O', | ||
| '1,4- dioxane' : 'C1COCCO1', |
There was a problem hiding this comment.
No space after dash in IUPAC
| '1,4- dioxane' : 'C1COCCO1', | |
| '1,4-dioxane' : 'C1COCCO1', |
| 'triclosan' : 'C1=CC(=C(C=C1Cl)O)OC2=C(C=C(C=C2)Cl)Cl', | ||
| 'benzalkonium chloride' : '[Cl-].CCCCCCCCCCCCN+(C)CC1=CC=CC=C1', | ||
| 'isopropyl alcohol' : 'CC(C)O', | ||
| 'chlorohexidine' : r 'C1=CC(=CC=C1N/C(=N/C(=NCCCCCCN=C(/N=C(/NC2=CC=C(C=C2)Cl)\N)N)N)/N)Cl', |
There was a problem hiding this comment.
Incorrect name
| 'chlorohexidine' : r 'C1=CC(=CC=C1N/C(=N/C(=NCCCCCCN=C(/N=C(/NC2=CC=C(C=C2)Cl)\N)N)N)/N)Cl', | |
| 'chlorhexidine' : r 'C1=CC(=CC=C1N/C(=N/C(=NCCCCCCN=C(/N=C(/NC2=CC=C(C=C2)Cl)\N)N)N)/N)Cl', |
| 'phenol' : 'C1=CC=C(C=C1)O', | ||
| 'formaldehyde' : 'C=O', | ||
| 'boric acid' : 'B(O)(O)O', | ||
| 'triclosan' : 'C1=CC(=C(C=C1Cl)O)OC2=C(C=C(C=C2)Cl)Cl', |
There was a problem hiding this comment.
Duplicate
| 'triclosan' : 'C1=CC(=C(C=C1Cl)O)OC2=C(C=C(C=C2)Cl)Cl', |
| 'boric acid' : 'B(O)(O)O', | ||
| 'triclosan' : 'C1=CC(=C(C=C1Cl)O)OC2=C(C=C(C=C2)Cl)Cl', | ||
| 'oligo(2-(2-ethoxy)-ethoxyethyl)guanidinium chloride' : 'Cl.NC(N)=N.NCCOCCOCCN', | ||
| 'polyhexamethylene guanidine' : 'Cl.NC(N)=N.NCCCCCCN', |
| def get_smiles(): | ||
|
|
||
| smiles = { | ||
| 'tris(1,3-dichloro-2-propyl)phosphate' : 'C(C(CCl)OP(=O)(OC(CCl)CCl)OC(CCl)CCl)Cl', |
There was a problem hiding this comment.
Missing a space.
| 'tris(1,3-dichloro-2-propyl)phosphate' : 'C(C(CCl)OP(=O)(OC(CCl)CCl)OC(CCl)CCl)Cl', | |
| 'tris(1,3-dichloro-2-propyl) phosphate' : 'C(C(CCl)OP(=O)(OC(CCl)CCl)OC(CCl)CCl)Cl', |
There was a problem hiding this comment.
Thanks @Lyq322.
@kalanakotawalagedara go through above mistakes, discuss with yuquing about them correct all of them.

added bleach, detergents,disinfectants,cosmetics, surface cleaners and flame retardants SMILES