Dear Thomas,
you may set the PDB residue info at the atom level (see below).
Cheers,
p.
In [1]:
from rdkit import Chem
from rdkit.Chem import rdDistGeom
from rdkit.Chem.Draw import IPythonConsole
In [2]:
mol = Chem.MolFromSmiles('c1ccccn1')
In [3]:
rdDistGeom.EmbedMolecule(mol)
Out[3]:
0
In [4]:
mi = Chem.AtomPDBResidueInfo()
mi.SetResidueName('MOL')
mi.SetResidueNumber(1)
mi.SetOccupancy(0.0)
mi.SetTempFactor(0.0)
In [5]:
[a.SetMonomerInfo(mi) for a in mol.GetAtoms()];
In [6]:
print(Chem.MolToPDBBlock(mol))
HETATM 1 MOL 1 -1.011 0.850 -0.017 0.00 0.00 C
HETATM 2 MOL 1 0.159 1.321 -0.598 0.00 0.00 C
HETATM 3 MOL 1 1.251 0.462 -0.564 0.00 0.00 C
HETATM 4 MOL 1 1.052 -0.805 -0.026 0.00 0.00 C
HETATM 5 MOL 1 -0.213 -1.342 -0.195 0.00 0.00 C
HETATM 6 MOL 1 -1.238 -0.486 0.039 0.00 0.00 N
CONECT 1 2 2 6
CONECT 2 3
CONECT 3 4 4
CONECT 4 5
CONECT 5 6 6
END
On 30/08/2018 18:32, [email protected] wrote:
Hi,
I read in a mol2 file, do some modifications and then want to write it
out as pdb file. So far, I always get as residue name in the pdb
“UNL”, and haven’t been able to change that e.g. to “MOL”.
Does anybody have a short code snipped how to set the PDB residue
name? I seem to be too stupid to deduct that from the documentation.
Thanks,
Th.
Mit freundlichen Grüßen / Kind regards,
Dr. Thomas Fox
Boehringer Ingelheim Pharma GmbH & Co. KG
Medicinal Chemistry
Tel.: +49 (7351) 54-7585
Fax: +49 (7351) 83-7585
mailto:[email protected]
Pflichtangaben finden Sie
unter:https://www.boehringer-ingelheim.de/unser-unternehmen/gesellschaften-in-deutschland
Mandatory information can be found at:
https://www.boehringer-ingelheim.de/unser-unternehmen/gesellschaften-in-deutschland
_Datenschutzhinweis_: Für bereits bestehende und neue
Geschäftsbeziehungen nutzen wir personenbezogene Daten und werden
diese für die Dauer unserer Geschäftsbeziehung aufbewahren. Während
unserer Geschäftsbeziehung erheben wir unter Umständen Kontaktdaten,
Daten zur Berufsqualifikation (Publikationen etc.). Einige Daten
werden aus öffentlichen Quellen und Internetseiten bezogen.
Rechtsgrundlage: Artikel 6 (1) b) und f) EU DS-GVO. Klicken Sie _hier
<https://www.boehringer-ingelheim.com/locations/europe>_, um weitere
Informationen auf der lokalen Unternehmensinternetseite des
betreffenden Landes über Datenschutz bei Boehringer Ingelheim und zu
Ihren Rechten zu erhalten. Bitte beachten Sie, dass zusätzliche
Datenschutzhinweise gelten können und alle diese Datenschutzhinweise
von Zeit zu Zeit aktualisiert werden können.
_P__rivacy Notice_: We use personal data for current and future
business collaborations, and will retain such data for the duration of
our business relationship. During the course of our business
relationship we may collect contact data, data about professional
qualifications (publications etc.). Some of the data is sourced from
public sources and websites. Legal basis: Article 6 (1) b) and f) EU
GDPR. Click _here
<https://www.boehringer-ingelheim.com/locations/europe>_ for more
information on the local company website of the respective country
about data protection at Boehringer Ingelheim and your rights. Please
note that additional privacy notices may apply and that all these
privacy notices might be updated from time to time.
Diese E-Mail ist vertraulich zu behandeln. Sie kann besonderem
rechtlichem Schutz unterliegen. Wenn Sie nicht der richtige Adressat
sind, senden Sie bitte diese E-Mail an den Absender zurück, löschen
die eingegangene E-Mail und geben den Inhalt der E-Mail nicht weiter.
Jegliche unbefugte Bearbeitung, Nutzung, Vervielfältigung oder
Verbreitung ist verboten. / This e-mail is confidential and may also
be legally privileged. If you are not the intended recipient please
reply to sender, delete the e-mail and do not disclose its contents to
any person. Any unauthorized review, use, disclosure, copying or
distribution is strictly prohibited.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss