Skip to content

Rosa bulo/pdb and mol2#405

Merged
rebadam merged 4 commits into
trunkfrom
RosaBulo/pdb_and_mol2
Jun 15, 2026
Merged

Rosa bulo/pdb and mol2#405
rebadam merged 4 commits into
trunkfrom
RosaBulo/pdb_and_mol2

Conversation

@rebadam

@rebadam rebadam commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Small bugfix for Mol2 reading: Before, Plams would first write bond orders as floats in the mol2 file, but then when reading, floats were not accepted. I now changed the reading code to accept bond orders as floats in the mol2 format.

PDB file writing would not place any default values in the residue, resnum, occ, and fix columns if they were not specifically assigned as properties to the Molecule object. This resulted in a strangely empty format that would not be accepted by any software I know. I changed to print default values in those four columns.

rebadam and others added 3 commits June 10, 2026 18:45
- The PDB writer would by default not write any default resname, resnum, or occ/fix value
  That would make the PDB format unreadable to most applications.
- There was also a bug in the MOL2 reader, which made it fail if there were non-integer bond-orders
  in the MOL2 file.
Comment thread src/scm/plams/mol/molecule.py
Comment thread src/scm/plams/mol/molecule.py Outdated
Comment thread src/scm/plams/mol/molecule.py Outdated
@dormrod

dormrod commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Also please mention your fix in the changelog! https://github.com/SCM-NV/PLAMS/blob/trunk/CHANGELOG.md

@rebadam rebadam merged commit bf4044f into trunk Jun 15, 2026
21 checks passed
@rebadam rebadam deleted the RosaBulo/pdb_and_mol2 branch June 15, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants