Dimer orientation

Hi there,
It's being a few months learning lammps. Still, so many things to learn. I am trying to make a dimer above a certain height from the top surface of the substrate. I made a block 0 6 0 6 4 4 above substrate 0 6 0 6 0 2. And I made a molecular file and I want a dimer to have an orientation of 45 degrees with the z-axis(not the bond angle) on the block above the substrate. The coordinates to define dimer is as follow:
1 0 0 0
2 r*sin(theta)*cos(phi) r*sin(theta)*sin(phi) r*cos(theta)
where theta being 45 and r is the bond length and phi random values between 0 -360 degrees. But it does not make 45 degrees with the z-axis. Hope I made my issue clear. I would appreciate your suggestions to resolve the issue.

Thank you.

Best Regards,
Indiras Khatri

Please note, that LAMMPS is primarily designed to be a simulation engine and not a molecular editor or system builder, even though there are occasional contributions to the LAMMPS code to improve system and topology building abilities.

however, for more complex operations, it is highly advisable to use some external tools that are written for this purpose and that can produce a data file or a file that can be converted into a data file and then load the data file into LAMMPS. you can find an incomplete list here: https://lammps.sandia.gov/prepost.html


Thank you, Axel.