Skip to content

Commit

Permalink
Fix charge reading from PDBQTParser
Browse files Browse the repository at this point in the history
  • Loading branch information
pgbarletta committed Sep 6, 2023
1 parent c289b7f commit c316306
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Fixes
their original type value (np.float64 and np.nan) (PR #4272)
* Fixes a case where qcprot.CalcRMSDRotationalMatrix would return a
RMSD of None
* Fix atom charge reading in PDBQT parser (PR #4283)

Enhancements
* Updated lib.qcprot.CalcRMSDRotationalMatrix to accept either float32 or float64
Expand Down
3 changes: 2 additions & 1 deletion package/MDAnalysis/coordinates/PDBQT.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ class PDBQTReader(base.SingleFrameReaderBase):
47 - 54 Real(8.3) z Orthogonal coordinates for Z in Angstroms.
55 - 60 Real(6.2) occupancy Occupancy.
61 - 66 Real(6.2) tempFactor Temperature factor.
67 - 76 Real(10.4) partialChrg Gasteiger PEOE partial charge *q*.
67 - 70 LString(4) footnote Usually blank. IGNORED.
71 - 76 Real(6.4) partialChrg Gasteiger PEOE partial charge *q*.
79 - 80 LString(2) atomType AutoDOCK atom type *t*.
============= ============ =========== =============================================
Expand Down
3 changes: 1 addition & 2 deletions package/MDAnalysis/topology/PDBQTParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class PDBQTParser(TopologyReaderBase):
- charges
Guesses the following:
- elements
- masses
.. versionchanged:: 0.18.0
Expand Down Expand Up @@ -140,7 +139,7 @@ def parse(self, **kwargs):
icodes.append(line[26:27].strip())
occupancies.append(float(line[54:60]))
tempfactors.append(float(line[60:66]))
charges.append(float(line[66:76]))
charges.append(float(line[70:76]))
atomtypes.append(line[77:80].strip())

n_atoms = len(serials)
Expand Down

0 comments on commit c316306

Please sign in to comment.