<jupyter_start><jupyter_text>╰(*°▽°*)╯ Import stuff ╰(*°▽°*)╯<jupyter_code>import pandas as pd
import rdkit as rdkit
from rdkit import Chem
from rdkit.Chem import AllChem, Descriptors
from rdkit.Chem import rdMolDescriptors
from rdkit import *
from rdkit.Chem import PandasTools
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import statsmodels.api as sm
import plotly.graph_objects as go
import plotly_express as px
from rdkit.Chem import rdMolDescriptors
from rdkit.Chem.Draw import SimilarityMaps

df  = pd.read_csv("chemical_descriptors.csv")<jupyter_output><empty_output><jupyter_text>Plot of MolLogP vs Fingerprint Density Morgan 3<jupyter_code>df.plot(kind="scatter", x="MolLogP", y = "FpDensityMorgan3", color="red")
df.plot(kind="scatter", x="MolLogP", y = "FpDensityMorgan3", color="red")
df.plot(kind="scatter", x = "ExactMolWt", y  = "FpDensityMorgan3", color = "red")
df.plot(kind="scatter", x = "ExactMolWt", y  = "MolLogP", color = "red")
plt.savefig("ExactMolWt_MolLogP.png", transparent = True)
plt.savefig('ExactMolWt_MolLogLOL',  bbox_inches='tight')
df.plot(kind="scatter", x = "MaxPartialCharge", y  = "FpDensityMorgan3", color = "red")
df.plot(kind="scatter", x = "MaxPartialCharge", y  = "MolLogP", color = "red")
df.plot(kind="scatter", x = "MinPartialCharge", y  = "FpDensityMorgan3", color = "red")
df.plot(kind="scatter", x = "MaxPartialCharge", y  = "FpDensityMorgan1", color = "red")
df.plot(kind="scatter", x = "MaxPartialCharge", y  = "FpDensityMorgan2", color = "red")
df.plot(kind="scatter", x = "MaxPartialCharge", y  = "FpDensityMorgan3", color = "red")

df = pd.DataFrame({"A": [0,1]})
trend = regression.predict(beta=regression.beta, x=x[20:])
ax = df.plot()
ax.legend(loc='best', fancybox=True, framealpha=0)
ax.plot()
import statsmodels.api as sm
fig, ax = plt.subplots()
df.plot(kind= "scatter", x="MolLogP", y = "ExactMolWt", ax=ax)


fig, ax = plt.subplots()
df.plot(kind= "scatter", x="MolLogP", y = "ExactMolWt", ax=ax)
model = sm.formula.ols(formula="MolLogP ~ ExactMolWt", data=df)
res = model.fit()
df.assign(fit=res.fittedvalues).plot(x="MolLogP", y="MolLogP", ax=ax)
fig = go.Figure()
fig.add_trace(
    go.Scatter(
        x = df["MolLogP"],
        y = df["ExactMolWt"],
        fill = "tozeroy"
       
))
df.plot(kind="scatter", x = "MolLogP", y  = "NumValenceElectrons", color = "red")<jupyter_output><empty_output><jupyter_text>Plot of the partition coefficient vs charge- Outliers are ubiquinone (MolLogP = 15 & Charge = 0)<jupyter_code>df.plot(kind="scatter", x = "MolLogP", y  = "charge", color = "red")
df.plot(kind="scatter", x = "FpDensityMorgan1", y  = "charge", color = "red")
df.plot(kind="scatter", x = "FpDensityMorgan2", y  = "charge", color = "red")
df.plot(kind="scatter", x = "FpDensityMorgan3", y  = "charge", color = "red")
df.plot(kind="scatter", x = "MinPartialCharge", y  = "charge", color = "red")
df.plot(kind="scatter", x = "MaxPartialCharge", y  = "charge", color = "red")
df.plot(kind="scatter", x = "NumValenceElectrons", y  = "MolLogP", color = "red")
df.plot(kind="scatter", x = "FpDensityMorgan3", y  = "ExactMolWt", color = "red")
df.plot(kind="scatter", x = "FpDensityMorgan3", y  = "HeavyAtomMolWt", color = "red")
df.plot(kind="scatter", x = "FpDensityMorgan3", y  = "NumAromaticHeterocycles", color = "red")
df.plot(kind="scatter", x = "FpDensityMorgan3", y  = "NumAromaticRings", color = "red")
df.plot(kind="scatter", x = "FpDensityMorgan3", y  = "NumRotatableBonds", color = "red")
df.plot(kind="scatter", x = "ExactMolWt", y  = "FpDensityMorgan1", color = "red")
df.plot(kind="scatter", x = "ExactMolWt", y  = "FpDensityMorgan2", color = "red")
df.plot(kind="scatter", x = "MolMR", y  = "FpDensityMorgan1", color = "red")
df.plot(kind="scatter", x = "MolMR", y  = "FpDensityMorgan2", color = "red")
df.plot(kind="scatter", x = "MolMR", y  = "FpDensityMorgan3", color = "red")
df.plot(kind="scatter", x = "TPSA", y  = "FpDensityMorgan3", color = "red")
df.plot(kind="scatter", x = "TPSA", y  = "FpDensityMorgan1", color = "red")
mol = Chem.MolFromSmiles('COc1cccc2cc(C(=O)NCCCCN3CCN(c4cccc5nccnc54)CC3)oc21')

AllChem.ComputeGasteigerCharges(mol)

contribs = [mol.GetAtomWithIdx(i).GetDoubleProp('_GasteigerCharge') for i in range(mol.GetNumAtoms())]
fig = SimilarityMaps.GetSimilarityMapFromWeights(mol, contribs, colormap="jet", contourLines =10)<jupyter_output>C:\Users\meide\.conda\envs\rdkit\lib\site-packages\rdkit\Chem\Draw\SimilarityMaps.py:224: UserWarning: The following kwargs were not used by contour: 'colormap'
  contourset = fig.axes[0].contour(x, y, z, contourLines, colors=colors, alpha=alpha, **kwargs)
{'fraction_non_alphanumeric': 0.18213206732844195, 'fraction_numerical': 0.010358221838584376, 'mean_word_length': 6.130769230769231, 'pattern_counts': {'":': 1, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '427765', 'license': 'MIT', 'n_tokens_mistral': 1944, 'n_tokens_neox': 1886, 'n_words': 378, 'path': 'Archive/Data/Plots.ipynb', 'repo_name': 'meidelien/Metabolic-network-layout-using-biochemical-coordinates', 'size': '4634'}