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
PDB Import issue : MolFromPDBFile() vs MolFromPDBBlock() #7362
Comments
Hi there, rdkit/Code/GraphMol/Wrap/rough_test.py Line 3315 in a087cfd
|
refer this file pdbparser.cpp : https://github.com/rdkit/rdkit/blob/a087cfd894497e98936245605dd87ca7f0f3de2a/Code/GraphMol/FileParsers/PDBParser.cpp where MolFromPDBFile calls ---> MolFromPDBDataStream( file data getting parsed) ---> MolFromPDBBlock this is obvious that MolFromPDBFile depends on MolFromPDBBlock then why this difference between importing MolFromPDBFile vs MolFromPDBBlock @ |
Hi @urekam712 , I think the problem you have in your code has to do with the way you define the pdb variable, because you are putting a string without the carriage returns and that is influencing the calling of the MolFromPDBBlock method. I leave you an example that works in my installation so that you can try it in yours. fileN = os.path.join(RDConfig.RDBaseDir, 'Code', 'GraphMol', 'FileParsers', 'test_data', m = Chem.MolFromPDBBlock(pdb) print(m) |
@urekam712 could this ticket be closed? |
Kindly refer the file attached
The data from the file is used for both MolFromPDBFile() and MolFromPDBBlock()
OUTPUT:
output:
DNA.pdb.txt
The text was updated successfully, but these errors were encountered: