Skip to content

Structure.copy() does not carry bond orders #1255

Description

@sebastianmdick

Copying a Structure causes all bond orders to be reset to 1.0.
This can be easily trace back to the lack of bond order specified in

ParmEd/parmed/structure.py

Lines 474 to 479 in b9f2955

for b in self.bonds:
c.bonds.append(
Bond(atoms[b.atom1.idx], atoms[b.atom2.idx],
b.type and c.bond_types[b.type.idx])
)
c.bonds[-1].funct = b.funct

so should be a straightforward fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions