(no subject)

Dear Lammps experts,
I am wondering if I can print the data file in Lammps using write_data for a certain condition like (if(z>certain value)). I have a configuration with zmax = 24 A. When I anneal the system, the substrate atoms start leaving the substrate and it will not happen all the time. I want to print those data files when any atom starts leaving the substrate i.e. I want to print that data file that has at least one atom Zmax > 25 A in that data file. Or is there a way to apply the “if” command for a pre-defined attribute in lammps script? I appreciate your suggestions.

Thank you.

Regards,
Indi

Dear Lammps experts,
I am wondering if I can print the data file in Lammps using write_data for a certain condition like (if(z>certain value)). I have a configuration with zmax = 24 A. When I anneal the system, the substrate atoms start leaving the substrate and it will not happen all the time. I want to print those data files when any atom starts leaving the substrate i.e. I want to print that data file that has at least one atom Zmax > 25 A in that data file. Or is there a way to apply the “if” command for a pre-defined attribute in lammps script? I appreciate your suggestions.

no. write_data only applies to the whole system.

however, the dump command can be applied to a subsystem and there is an “thresh” to the “dump_modify” command, that allows you to output only atoms conforming to specific conditions.

the if command has a very different purpose. it serves to do some minimal structured programming inside of LAMMPS input scripts, e.g. to realize loops

axel.

Thank you.