Invoke lammsp calculation after a Matlab/c++/Fortran evaluation

Hi Arun,

Thanks for your helpful information.

The DFT will takes the .xyz files from LAMMPS that contains element types and coordinates of each atom.

It is possible to run multiple jobs one after the other using bash script using ‘flat’ chain or ‘looped’ chain. For my case, the ‘looped’ chain is preferred. However, I am struggling in assigning a criteria to quit this loop.

Why ?

Because a third-body program (Matlab/c++/fortran) will be used to compare the results obtained from previous runs of LAMMPS and Quantum expresso (QE). There are two possibilities for this comparison:

i) If A = [LAMMPS_results – QE_results]/ QE_results > 1%, the running will continue.

ii) If A < 1%, the running will stop and all jobs will be killed.

Bash programming supports “Loops for, while and until” to conditionally run a job, but how do I include the variable A, that obtained from the third-body program (Matlab/c++/fortran), into the control expression of these Loops.

Can bash script do this ?

Best regards,

Thi Dinh TA

PhD Candidate

School of Mechanical, Materials & Mechatronic Engineering

University of Wollongong

NSW 2522, Australia

Phone : (+61) 405 234 812

Email: dtt507@…3974…