chemistry

How to make a comprehensive composition table efficiently

How to make a comprehensive composition table efficiently Question: I am trying to make a comprehensive compositon table for composite development (in chemistry field) based on the specific rules. The rules are The numbers in a table mean the weight percentage of each raw material in the ccomposite There are three raw materials(A, B, C), …

Total answers: 1

Indexing of strings (molecule SMILES)

Indexing of strings (molecule SMILES) Question: Also, please can someone adjust or give me advice on how to look at the second order of parenthesis. Same process as this, but with only parenthesis in second order (this code is first order). Can you make it so I can easily adjust? By second order I mean …

Total answers: 2

How to organise DataFrame columns

How to organise DataFrame columns Question: I am trying to organise DataFrame columns based on the specific rules, but I don’t know the way. For example, I have a DataFrame related to chemistry as shown below. Each row shows the number of chemical bonds in a chemical compound. OH HO CaO OCa OO NaMg MgNa …

Total answers: 3

Converting an Isometric SMILE into its atoms and non-hydrogen neighbours

Converting an Isometric SMILE into its atoms and non-hydrogen neighbours Question: Hope whoever is reading this is well. I have an issue with my code. I am trying to convert an isometric SMILE, a descriptor of a molecule, into its atomic groups and neightbours. My code is below. import rdkit from rdkit import Chem def …

Total answers: 1

Python function about chemical formulas

Python function about chemical formulas Question: I have a CSV file that contains chemical matter names and some info.What I need to do is add new columns and write their formulas, molecular weights and count H,C,N,O,S atom numbers in each formula.I am stuck with the counting atom numbers part.I have the function related it but …

Total answers: 1

converting a tree array to a specific string (chemical formulas) (py)

converting a tree array to a specific string (chemical formulas) (py) Question: I have a specific kind of array which looks often like this: [{3: ‘Ca’}, {2: [{1: ‘P’}, {4: ‘O’}]}] and I want to convert it to something like Ca3(PO4)2. Could someone help me? I tried a lot of techniques, but the code gets …

Total answers: 1

How to balance a chemical equation in Python 2.7 Using matrices

How to balance a chemical equation in Python 2.7 Using matrices Question: I have a college assignment where I must balance the following equation : NaOH + H2S04 –> Na2S04 + H20 my knowledge of python and coding in general is extremely limited at the moment. So far I have attempted to use matrices to …

Total answers: 4

Python Progam to read SDF (chemistry) file

Python Progam to read SDF (chemistry) file Question: I want to read sdf file (containing many molecules) and return the weighted adjacency matrix of the molecule. Atoms should be treated as vertices and bond as edges. If i and j vertex are connected by single, double, or triple bond then corresponding entries in the adjacency …

Total answers: 3