How to read from a file that has both wrapped and unwrapped position?

Hello,
I have a LAMMPS dump file that has

ITEM: ATOMS id x y xu yu

I am using this to get the list of quantities to read, but I only get ID and position.

pipeline = import_file(file, sort_particles=True)
quantities = list(pipeline.source.data.particles.keys())

In Ovito, I can remap the quantities, but how can I do that in Python?

Thank you in Advance

You can give the column mapping as keyword argument to the import_file function.

pipeline = import_file('file.xyz', columns =
    ['Particle Identifier', 'Particle Type', 'Position.X', 'Position.Y', 'Position.Z'])

Thank you, but is it possible to read both at the same time?

Yes, that is possible. However, you cannot directly read multiple “custom” properties into an Nx3 vector. Instead, you need to store each component separately.

Please note that you can only have one particle property named “Position”, which defines each particle’s position for visualization and is accessible via data.particles.position.

For example:

pipeline = import_file('test.dump', columns=[
    'Particle Identifier', 'Position.X', 'Position.Y', 'Position.Z',
    'UnwrappedPositionX', 'UnwrappedPositionY', 'UnwrappedPositionZ'
])

I’ll put this on the list for possible future improvement. Reading this directly as:

pipeline = import_file('test.dump', columns=[
    'Particle Identifier', 'Position.X', 'Position.Y', 'Position.Z',
    'UnwrappedPosition.X', 'UnwrappedPosition.Y', 'UnwrappedPosition.Z'
])

seems much nicer.

Yea I was looking for this.

Thank you