{
  "id": 517029,
  "title": "Getting problem in using rdkit. ",
  "url": "/competitions/leash-BELKA/discussion/517029",
  "author_name": "Zoya Amjad",
  "post_date": "2024-07-04T15:01:40.690000",
  "votes": 0,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I'm using the RDKit library to generate Morgan fingerprints from SMILES data, but I'm encountering several errors:</p>\n<ol>\n<li>DEPRECATION WARNING: please use MorganGenerator<br>\nAttributeError: 'module 'rdkit.Chem.rdMolDescriptors' has no attribute 'MorganGenerator'<br>\nAttributeError: 'ExplicitBitVect' object has no attribute 'ConvertToNumpyArray'</li>\n</ol>\n<p>Any help or suggestions would be greatly appreciated!<br>\nThank you.</p>",
  "messages": [
    {
      "id": 2905480,
      "postDate": "2024-07-05T01:39:45.673Z",
      "content": "<p>I'm not sure about your exact use case, but here's what I'm using to generate fingerprint after deprecation of the original method:</p>\n<pre><code> rdkit  Chem\n rdkit.Chem  rdFingerprintGenerator\n\nmfgen = rdFingerprintGenerator.GetMorganGenerator(radius=, fpSize=)\n\n ():\n    molecule = Chem.MolFromSmiles(smiles)\n     molecule  :\n         \n     mfgen.GetFingerprintAsNumPy(molecule)\n</code></pre>",
      "rawMarkdown": "I'm not sure about your exact use case, but here's what I'm using to generate fingerprint after deprecation of the original method:\n\n```python\nfrom rdkit import Chem\nfrom rdkit.Chem import rdFingerprintGenerator\n\nmfgen = rdFingerprintGenerator.GetMorganGenerator(radius=2, fpSize=4096)\n\ndef generate_ecfp(smiles):\n    molecule = Chem.MolFromSmiles(smiles)\n    if molecule is None:\n        return None\n    return mfgen.GetFingerprintAsNumPy(molecule)\n```",
      "votes": 2,
      "replies": [
        {
          "id": 2905709,
          "postDate": "2024-07-05T06:13:45.633Z",
          "content": "<p>Thanks, miozune, for sharing your approach. </p>",
          "rawMarkdown": "Thanks, miozune, for sharing your approach. "
        }
      ]
    },
    {
      "id": 2904770,
      "postDate": "2024-07-04T15:01:40.690Z",
      "content": "<p>I'm using the RDKit library to generate Morgan fingerprints from SMILES data, but I'm encountering several errors:</p>\n<ol>\n<li>DEPRECATION WARNING: please use MorganGenerator<br>\nAttributeError: 'module 'rdkit.Chem.rdMolDescriptors' has no attribute 'MorganGenerator'<br>\nAttributeError: 'ExplicitBitVect' object has no attribute 'ConvertToNumpyArray'</li>\n</ol>\n<p>Any help or suggestions would be greatly appreciated!<br>\nThank you.</p>",
      "rawMarkdown": "I'm using the RDKit library to generate Morgan fingerprints from SMILES data, but I'm encountering several errors:\n1. DEPRECATION WARNING: please use MorganGenerator\nAttributeError: 'module 'rdkit.Chem.rdMolDescriptors' has no attribute 'MorganGenerator'\nAttributeError: 'ExplicitBitVect' object has no attribute 'ConvertToNumpyArray'\n\nAny help or suggestions would be greatly appreciated!\nThank you."
    },
    {
      "id": 2904778,
      "postDate": "2024-07-04T15:06:43.707Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2905480,
      "author_name": "miozune",
      "author_url": "",
      "post_date": "2024-07-05T01:39:45.673000",
      "content": "<p>I'm not sure about your exact use case, but here's what I'm using to generate fingerprint after deprecation of the original method:</p>\n<pre><code> rdkit  Chem\n rdkit.Chem  rdFingerprintGenerator\n\nmfgen = rdFingerprintGenerator.GetMorganGenerator(radius=, fpSize=)\n\n ():\n    molecule = Chem.MolFromSmiles(smiles)\n     molecule  :\n         \n     mfgen.GetFingerprintAsNumPy(molecule)\n</code></pre>",
      "votes": 2,
      "replies": [
        {
          "id": 2905709,
          "author_name": "Zoya Amjad",
          "author_url": "",
          "post_date": "2024-07-05T06:13:45.633000",
          "content": "<p>Thanks, miozune, for sharing your approach. </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2904778,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-07-04T15:06:43.707000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2905480": "I'm not sure about your exact use case, but here's what I'm using to generate fingerprint after deprecation of the original method:\n\n```python\nfrom rdkit import Chem\nfrom rdkit.Chem import rdFingerprintGenerator\n\nmfgen = rdFingerprintGenerator.GetMorganGenerator(radius=2, fpSize=4096)\n\ndef generate_ecfp(smiles):\n    molecule = Chem.MolFromSmiles(smiles)\n    if molecule is None:\n        return None\n    return mfgen.GetFingerprintAsNumPy(molecule)\n```",
    "2904770": "I'm using the RDKit library to generate Morgan fingerprints from SMILES data, but I'm encountering several errors:\n1. DEPRECATION WARNING: please use MorganGenerator\nAttributeError: 'module 'rdkit.Chem.rdMolDescriptors' has no attribute 'MorganGenerator'\nAttributeError: 'ExplicitBitVect' object has no attribute 'ConvertToNumpyArray'\n\nAny help or suggestions would be greatly appreciated!\nThank you.",
    "2904778": ""
  }
}