Rotate duplicated objects according to a list of vectors? I'm trying to edit code that imports atom positions (xyz) and an arrow on each one with the spin (uvw). The atom positions can easily be imported with an add-on called XYZ importer, but it uses instances/dupliverts to duplicate a representative object to create the overall structure. However, each duplicated object needs to have a custom rotation, specified by the spin vector. I'm struggling in how to modify dupliverts to achieve this and I can't find any simple alternatives. It should look like the image I attached, with an arrow centered on each atom.
Assign and align to the vertex normals

Similarly to https://blender.stackexchange.com/a/163958/15543 using the cone as a duplivert instance



The vertex normals of suzanne are determined by the faces. If we construct a vert only mesh, then set v.normal = (x, y, z) for each vertex

Here is a script that adds a pointmesh cube, assigns the normals to the coordinate normalized and adds an empty as duplivert object.  Used the cone display type, as it points in Y to which the normals point.

Assign your "spin" direction to as the normal of the vert.  Make sure align to vert normal is checked.  Remember that instances will be aligned Y axis to vert normal.

import bpy
import bmesh
from itertools import product
from mathutils import Vector
from bpy_extras.io_utils import axis_conversion

M = axis_conversion
context = bpy.context
coll = context.collection

bm = bmesh.new()
for v in  product(*(((-1, 1),) * 3)):
    vert = bm.verts.new(v)
    #norm = Vector(random() * a for a in v)
    vert.normal =  vert.co.normalized()


cube = bpy.data.objects.new(
        "Cube",
        bpy.data.meshes.new("Foo")
        )
bm.to_mesh(cube.data)
coll.objects.link(cube)


bpy.ops.object.empty_add(
                radius=0.5,
                type='CONE',
                location = (0, 0, 0),
                )
arrow = context.object

arrow.parent = cube

cube.instance_type = 'VERTS'
cube.use_instance_vertices_rotation = True