Skip to content

Commit

Permalink
Merge pull request #194 from stefdoerr/fix_pdb_writer
Browse files Browse the repository at this point in the history
Fix for PDB writer
  • Loading branch information
Darren Curtis committed Jun 9, 2021
2 parents 1838cc4 + f320d48 commit b29772b
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions pdb2pqr/structures.py
Expand Up @@ -328,18 +328,7 @@ def get_pdb_string(self):
:rtype: str
"""
outstr = self.get_common_string_rep(chainflag=True)
tstr = f"{self.occupancy:6.2f}"
outstr += str.ljust(tstr, 6)[:6]
tstr = f"{self.temp_factor:6.2f}"
outstr += str.rjust(tstr, 6)[:6]
# padding between temp factor and seg_id
outstr += " " * 7
tstr = self.seg_id
outstr += str.ljust(tstr, 4)[:4]
tstr = self.element
outstr += str.ljust(tstr, 2)[:2]
tstr = str(self.charge)
outstr += str.ljust(tstr, 2)[:2]
outstr += f"{self.occupancy:>6.2f}{self.temp_factor:>6.2f} {self.seg_id:4.4s}{self.element:>2.2s}{self.charge:2.2s}"
return outstr

@property
Expand Down

0 comments on commit b29772b

Please sign in to comment.