Skip to content

More options for wrapping #5316

@hejamu

Description

@hejamu

Is your feature request related to a problem?

Most analyses become simpler when working in the "brick shape" representation of triclinic boxes. It would be nice to have the option to select the representation when wrapping (and possibly unwrapping?).

Describe the solution you'd like

Similar to gmx trjconv -ur:

u.atoms.wrap(representation="tric")  # default behaviour
u.atoms.wrap(representation="rect")  # brick shape, does nothing for orthorhombic boxes
u.atoms.wrap(representation="compact")

See #2982 for the importance of compact wrapping.

Describe alternatives you've considered

We currently do this

is_triclinic = np.any(ts.dimensions[-3:] != np.array([90.0, 90.0, 90.0]))
self._universe.atoms.wrap(compound=self.wrap_compound)
if is_triclinic:
    ortho_box = triclinic_to_orthorhombic(ts.dimensions)
    self._universe.atoms.wrap(
        compound=self.wrap_compound, box=ortho_box
     )

Additional context

maicos-devel/maicos#571

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions