-
Notifications
You must be signed in to change notification settings - Fork 667
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
Allow PDBWriter (and similar) to write record_types #1753
Comments
Our PDB writer currently doesn't support writing |
@kain88-de It seems not.
old pdb |
Well yeah for the writing it is lost. Like I said we do not write |
@kain88-de Thank you for the help. I guess I will do some string manipulation at the end of my script to solve this problem. |
So what we could do is add this as a TopologyAttr and read/write it as
you'd expect
…On Thu, 11 Jan 2018, 12:42 p.m. xiki-tempula, ***@***.***> wrote:
Closed #1753 <#1753>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1753 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI0jB3x9ifkTFy6mkoed8JKf1SB2H-dYks5tJgGXgaJpZM4RavIv>
.
|
I planned to create an issue ticket with the same request so I'm glad that someone else noticed this. I have also noticed that the ticket is already 2 years old. I can confirm that HETATM is kept in selection, but I'm not sure what's the problem with writing it out? The simple code to reproduce the issue is as follows (the one in the first message with
|
@mieczyslaw the issue currently is just a case that the PDBWriter as-is doesn't have the correct if/else construct to switch between HETATMs and ATOMs when writing the record lines. It should be relatively simple (from the looks of it maybe ~ 3 lines + tests), unfortunately it's one of those things that get added on top of very long to-do list. I've added a help wanted tag in case this might incite others to join in and work on this. |
@IAlibay I have just improved PDB.py code and will create a PR in a couple of minutes! |
@IAlibay my first PR created; is this change desired also for PDBQT? |
@mieczyslaw I think we'll eventually need to fix the PDBQT writer too (although I'm not super clear on where the standard is written out for PDBQT). That being said, the changes here are probably going to be more involved as I'm already seeing a ton of tests that are failing. My suggestion here would be to get #2880 closer to merging before starting on the PDBQT writer (just to avoid code backtracking in case we make decisions that should then be ported from PDB to PDBQT). Either way it's your choice though. |
Good suggestion, let's focus on #2880. |
Fixes #1753 and #2906 ## Overview of work done in this PR 1) PDBWriter will now write out either `ATOM` or `HETATM` entries based on the contents of the atomgroup `record_types` attribute. If the `record_types` attribute is missing, writing will default to `ATOM` entries. 2) Updates the PDB documentation to refer to PDBv3.3 instead of PDBv3.2.
Fixes MDAnalysis#1753 and MDAnalysis#2906 ## Overview of work done in this PR 1) PDBWriter will now write out either `ATOM` or `HETATM` entries based on the contents of the atomgroup `record_types` attribute. If the `record_types` attribute is missing, writing will default to `ATOM` entries. 2) Updates the PDB documentation to refer to PDBv3.3 instead of PDBv3.2.
(@richardjgowers edit:) Following #1762 we now read the record type (ATOM/HETATM) of each atom. Now we need to make the PDBWriter (and PQR/PDBQT) write these records when found, otherwise defaulting to a sensible value.
Original Issue:
I have a gro file which contains a ligand and I want to write it out as a pdb file. In the new pdb file can the ligand has a Record type of HETATOM instead of ATOM?
Like
The text was updated successfully, but these errors were encountered: