Custom lattice larger than the desired size _ periodic boundary conditions

Hello Everyone,

I am trying to build a solid domain using the “lattice custom” command by specifying the locations of atoms based on the orthogonal sides, whose size is 1.42 A. This is to create a domain made of simple cubes. I am using “lattice custom” with a scaling of 1 to avoid the complications of scaling/rescaling. I want to create a solid domain that extends from z=0 to 400A. The simulation has periodic boundary conditions conditions. The problem is that the created solid domain extends the desired dimensions (z=0 to 400A) and becomes (z=0 to 568A = 1.42* 400A). The problem requires periodic boundaries for later stages of simulation. What would you suggest/recommend?

I have appended the script creating this part (where the solid domain is called shell_final). Thank you very much for your help.

Best regards,
Alex

units real
dimension 3
atom_style molecular
bond_style harmonic
pair_style lj/cut 14
boundary p p p

region simulation_box block -200 200 -200 200 0 400
region region_cylinder_in cylinder z 0 0 100 0 400 side in
region region_cylinder_out cylinder z 0 0 100 0 400 side out
region shell_in cylinder z 0 0 101.5 0 400 side in

region shell_final intersect 2 shell_in region_cylinder_out # here the shell is obtained by intersecting two regions.

lattice custom 1 a1 1.42 0.0 0.0 a2 0.0 1.42 0.0 a3 0.0 0.0 1.42 &
basis 0.0 0.0 0.0 basis 0.0 0.5 0.0

create_atoms 2 region shell_final

It doesn’t for the script you posted below (which, BTW, cannot run because it is lacking a create_box command).

Please provide a proper example input that can be run and reproduces the problem you are claiming and also make sure it actually does that.

You are right. The code was incomplete. Please see the attached two files. The input file (INPUT) first reads the locations of oxygen molecules inside a tube (stored in second, which satisfies the create_box requirement). It then creates the solid domain (made of carbons) I referred to in previous message. Subsequently, it applies the point force (f= 0.001) to the gas molecules and followed by the nvt thermostat (T is set to 300K). Later, it computes the flow rate by binning 400A intervals inside the tube starting from -200A. So, the first bin is (z= -200A to 200A) with z=0 average (please see Rate.data created after simulation). This is expected to cover the entire height of tube (and solid domain).

The problem is the second bin created, whose average height is 568A (=4001.42A). This should not be created because the solid domain extends from z=0 to 400A. Even if the code accounts for the periodic boundary condition, the average height of the second bin may need to be 400A (not 568A). When I change the dimensions of a1,a2, and a3 (custom lattice) from 1.42 to 1.5 in the INPUT, the average height of the second bin becomes 600A (=4001.5).

The outcome of the simulation for the bin height of 800A starting from z=-200A, is a bin whose average height is 284 (=568/2 A). Please see Rate_second.data generated by the code for this. Please note that 800A is twice the height of the solid.

Sorry for the long message, but I tried to provide as much info as possible.

Many thanks,
Alex

Please have a look at the documentation for the compute chunk/atom command and pay particular attention to the “units” keyword and re-check the “lattice” command documentation.

Before you issued the lattice command, “units box” and “units lattice” create the same geometries because of the default setting for “lattice”; after you defined the lattice command, this is no longer the case.

Thank you very much for your suggestions. It was too subtle for me see the units and what they really mean. This really helped a lot.

Many thanks,
Alex