Dipole data with i-PI to analyze IR spectra

107 views
Skip to first unread message

M. X. L (M. X.)

unread,
Mar 28, 2024, 12:15:07 PM3/28/24
to MBX-users
Dear MBX users and developers,

I want analyze IR spectra of centroid trajectories by TRPMD simulations. I use MBX interfaced with i-PI. But the output of i-PI software is only xyz trajectories. Can I output the dipole moment for the trajectory? I saw similar questions on the group last year. Would we have a new release to fix it?

Please forgive my presumption and urgency, this is very important to me.
Thank you very much for your time. 

Regards,
L. M. X.

Richa Rashmi

unread,
Mar 28, 2024, 3:16:01 PM3/28/24
to MBX-users
Dear L.M.X,

Currently, there isn't a straightforward method to print dipole moments using MBX+i-PI. However, you can utilize MBX+LAMMPS to obtain the dipole moments for your trajectory. You can extract the centroid positions from your i-PI TRPMD simulation (likely printed in simulation.xc.xyz), convert the .xyz file into a LAMMPS trajectory file format, and then do a LAMMPS rerun on those coordinates to print the dipole moments.

We hope this is helpful. Please feel free to reach out if you require assistance with the MBX+LAMMPS rerun to print dipole moments.

Thank you.
Best regards, 
MBX team

M. X. L (M. X.)

unread,
Mar 30, 2024, 6:31:16 PM3/30/24
to MBX-users
Thank you! It's very hepful for me!!!!

M. X. L

unread,
May 27, 2024, 2:36:03 AM5/27/24
to MBX-users
I am very grateful for all your selfless help.
I am trying to use the MBX1.1.0+LAMMPS to calculate the dipole moment of simulation.xc.xyz by reruning. I need to calculate the dipole moment of each atom to analyze the IR.
I have no experience with LAMMPS. I checked the input in /MBX-1.1.0/examples/lammps/256h2o/ and the previous posts (Dipoles and polarization (google.com) and fix mbx print/dipoles in lammps (google.com) ). 
I have converted the trajectory file (simulation.xc.xyz) to a dump file and the initial structure to a data file.
I have the following error:

Finding 1-2 1-3 1-4 neighbors ...
  special bond factors lj:    0        0        0      
  special bond factors coul:  0        0        0      
     2 = max # of 1-2 neighbors
     1 = max # of 1-3 neighbors
     1 = max # of 1-4 neighbors
     2 = max # of special neighbors
  special bonds CPU = 0.014 seconds
  read_data CPU = 0.050 seconds
[g02r1n08:808  :0:808] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x194264f0)
==== backtrace (tid:    808) ====
 0 0x000000000004ed85 ucs_debug_print_backtrace()  ???:0
 1 0x0000000000942cc4 LAMMPS_NS::FixMBX::mbx_fill_system_information_from_atom()  /work/home/acqz25xa41/software/lammps-stable/src/Obj_mpi_mbx/../fix_mbx.cpp:507
 2 0x00000000009414ab LAMMPS_NS::FixMBX::FixMBX()  /work/home/acqz25xa41/software/lammps-stable/src/Obj_mpi_mbx/../fix_mbx.cpp:202
 3 0x000000000080512f _INTERNAL688e006b::style_creator<LAMMPS_NS::Fix, LAMMPS_NS::FixMBX>()  /work/home/acqz25xa41/software/lammps-stable/src/Obj_mpi_mbx/../modify.cpp:44
 4 0x000000000081646e LAMMPS_NS::Modify::add_fix()  /work/home/acqz25xa41/software/lammps-stable/src/Obj_mpi_mbx/../modify.cpp:914
 5 0x0000000000416494 LAMMPS_NS::Input::fix()  /work/home/acqz25xa41/software/lammps-stable/src/Obj_mpi_mbx/../input.cpp:1528
 6 0x0000000000416494 LAMMPS_NS::Input::execute_command()  /work/home/acqz25xa41/software/lammps-stable/src/Obj_mpi_mbx/../input.cpp:787
 7 0x0000000000414cb8 LAMMPS_NS::Input::file()  /work/home/acqz25xa41/software/lammps-stable/src/Obj_mpi_mbx/../input.cpp:302
 8 0x0000000000410aeb main()  /work/home/acqz25xa41/software/lammps-stable/src/Obj_mpi_mbx/../main.cpp:105
 9 0x00000000000223d5 __libc_start_main()  ???:0
10 0x00000000004109a9 _start()  ???:0
=================================
srun: error: g02r1n08: task 14: Segmentation fault
srun: launch/slurm: _step_signal: Terminating StepId=11578238.0
slurmstepd: error: *** STEP 11578238.0 ON g02r1n08 CANCELLED AT 2024-05-27T10:28:12 ***
srun: error: g02r1n08: tasks 0-13,15-29: Terminated
srun: Force Terminated StepId=11578238.0

It looks like it got stuck in "fix 2 all mbx 1 5 h2o print/settings json "mbx.json" print/dipoles".

I apologize for any trouble or inconvenience I may have caused, and I am immensely grateful for any advice you provide.

在2024年3月29日星期五 UTC+8 03:16:01<Richa Rashmi> 写道:
slurm-11578238.out
mbx.json
lammps.in
initial.data

M. X. L

unread,
May 27, 2024, 1:44:07 PM5/27/24
to MBX-users
I solved it! I write my solution here in the hope that it will help users like me who have no experience with lammps
1. The pair_style in lammps.in should be consistent with twobody_cutoff in mbx.json.
2It should be "fix              3 all mbx 1 h2o 1 2 3 2 1 1 json mbx.json print/settings print/dipoles", and that corresponds to O=1, H=2 in initial.data.
3. A lot of attention needs to be paid to the consistency of initial.data and trajectories. For non-periodic systems it may to add a large enough box first.
This is a rerun of lammps.in, and I hope can it help sombody.
lammps.in
Reply all
Reply to author
Forward
0 new messages