Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cell_matrix = np.zeros((3,4))
cell_matrix[:, :3] = atoms.get_cell()
cell_matrix[:, 3] = atoms.info.get('cell_origin',
[0., 0., 0.])
cell = SimulationCell(matrix=cell_matrix,
pbc=atoms.get_pbc())
data.addObject(cell)
position = ParticleProperty(name='Position',
type=Particles.ParticleProperty.Type.Position,
array=atoms.get_positions())
data.addObject(position)
return data
node = import_file(sys.argv[1])
data = node.compute()
atoms = data_to_atoms(data)
atoms.positions[...] *= 1.1 # would be something more complex
node.remove_from_scene()