Skip to content

Commit

Permalink
PDB export plugin now writes type names (if assigned) without integer…
Browse files Browse the repository at this point in the history
… suffix.
  • Loading branch information
trisyoungs committed Feb 7, 2018
1 parent e0c98b8 commit c12cecd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/io_pdb/pdb_funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ bool PDBModelPlugin::exportData()
{
for (n = 0; n < p->nAtoms(); ++n)
{
if (useTypeNames && i->type()) s = QString("%1%2").arg(i->type()->name()).arg(n);
if (useTypeNames && i->type()) s = i->type()->name();
else s = QString("%1%2").arg(ElementMap::symbol(i)).arg(n);

if (!fileParser_.writeLineF("ATOM %-5i %-4s MOL %-4i %8.3f%8.3f%8.3f%6.2f%6.2f %2s", i->id()+1, qPrintable(s), molId, i->r().x, i->r().y, i->r().z, 1.0, 1.0, ElementMap::symbol(i))) return false;
Expand Down

0 comments on commit c12cecd

Please sign in to comment.