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

added household chemicals #340

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

kalanakotawalagedara
Copy link
Collaborator

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

Copy link
Collaborator

@Lyq322 Lyq322 left a comment

Choose a reason for hiding this comment

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

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.md to add your node to the list and any references you used
  • In global_chem/global_chem/global_chem.py you need to import your nodes at the top (eg from global_chem.environment.chemicals_from_biomass import ChemicalsFromBioMass)

Comment on lines +155 to +156
from global_chem.household_chemicals.organophosphate_flame_retardants import Organophosphate_flame_retardants
from global_chem.household_chemicals.Surface_cleaners import Surface_cleaners
Copy link
Collaborator

Choose a reason for hiding this comment

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

Class names should be all capitalized to match coding style.

Suggested change
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

@@ -492,6 +492,7 @@ class GlobalChem(object):
'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
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should add an entry to this list for every node, not just the folder household chemicals.

Suggested change
'household_chemicals' : household_chemicals, # Kalana Kotawalagedara & Anuththara Gamage
'bleach' : Bleach, # Kalana Kotawalagedara & Anuththara Gamage
cosmetics’: Cosmetics, # Kalana Kotawalagedara & Anuththara Gamage
# …etc

Comment on lines +29 to +31
smarts = {

}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Indent to match coding style.

Suggested change
smarts = {
}
smarts = {
}

Comment on lines +16 to +21
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',

}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Indent to match coding style.

Suggested change
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',
Copy link
Collaborator

Choose a reason for hiding this comment

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

No space after dash in IUPAC

Suggested change
'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',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Incorrect name

Suggested change
'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',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Duplicate

Suggested change
'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',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wrong smiles? This picture showed up when I searched up polyhexamethylene guanidine.
image

def get_smiles():

smiles = {
'tris(1,3-dichloro-2-propyl)phosphate' : 'C(C(CCl)OP(=O)(OC(CCl)CCl)OC(CCl)CCl)Cl',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing a space.

Suggested change
'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',

Copy link
Collaborator

@ANUGAMAGE ANUGAMAGE Nov 8, 2024

Choose a reason for hiding this comment

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

Thanks @Lyq322.
@kalanakotawalagedara go through above mistakes, discuss with yuquing about them correct all of them.

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.

3 participants