[lammps-users] Barostat with triclinic and fix/deform



Hi
I am trying to shear (xy) a periodic box in all three dimensions using fix/deform erate for which I believe the box needs to be triclinic. However I wish to use a barostat (either npt, or any other), but it seems like Barostat cannot be used using triclinic (LAMMPS logs an error and gives the message). Is there any other way to use the barostat (controling the volume in Z) while shearing?
Thanks

Nitin Daphalapurkar

— On Tue, 1/27/09, Steve Plimpton [email protected] wrote:



> From: Steve Plimpton [email protected]
> Subject: Re: [lammps-users] compute stress/atom
> To: “Gaurav Pranami” <[email protected]…258…>
> Cc: [email protected]
> Date: Tuesday, January 27, 2009, 6:01 AM
>
> <br>> See the script below.<br>> <br>> (1) if you comment out the pair_modify tail yes command then pressure<br>> will match stress. You are adding in a tail correction to the global pressure,<br>> so it doesn't match.<br>> <br>> (2) Comment in/out the thermo_modify norm no command. You will<br>> see that the output of compute reduce sum is extensive, but it is normalized<br>> when output by the thermo command. Intensive quantities like temp or press are<br>> not normalized.<br>> <br>> Steve<br>> <br>> # 3d Lennard-Jones melt<br>> <br>> units lj<br>> atom_style atomic<br>> <br>> lattice fcc 0.8442<br>> region box block 0 10 0 10 0 10<br>> create_box 1 box<br>> create_atoms 1 box<br>> mass 1 1.0<br>> <br>> velocity all create 1.44 87287 loop geom<br>> <br>> pair_style lj/cut 2.5<br>> pair_coeff 1 1 1.0 1.0 2.5<br>> #pair_modify tail yes<br>> <br>> neighbor 0.3 bin<br>> neigh_modify delay 0 every 20 check no<br>> <br>> fix 1 all nve<br>> <br>> compute stpa all stress/atom<br>> compute stgb all reduce sum c_stpa[1] c_stpa[2] c_stpa[3]<br>> variable pr equal -(c_stgb[1]+c_stgb[2]+c_stgb[3])/(3*vol)<br>> <br>> thermo_style custom step temp press v_pr c_stgb[1]<br>> #thermo_modify norm no<br>> <br>> thermo 10<br>> run 100<br>> <br>> On Sat, Jan 24, 2009 at 9:25 PM, Gaurav Pranami <[email protected]><br>> wrote:<br>> > Dear LAMMPS users,<br>> ><br>> > I am using the serial version of LAMMPS (Jan 23, 2009) on cygwin on<br>> Windows<br>> > XP with additional packages: opt, molecule, kspace, class2, manybody.<br>> ><br>> > I am simulating 125 Lennard Jones particles (epsilon = sigma = 1) in LJ<br>> > units at the number density of 0.85 at reduced temperature of 1.2 in NVE<br>> > ensemble. The volume of my simulation box is 147.059.<br>> ><br>> > I'd appreciate if you can help me resolve the the following<br>> unexpected<br>> > observations:<br>> ><br>> > 1. I used compute stress/atom command to calculate the pressure as<br>> described in<br>> > the documentation. However, the pressure calculated by LAMMPS is not same<br>> as the<br>> > pressure calculated using the 'compute' command, see column #3 and<br>> #4 in the<br>> > output. As mentioned in the documentation, these two values should match.<br>> Here<br>> > is the link to this documentation page:<br>> > http://lammps.sandia.gov/doc/compute_stress_atom.html<br>> ><br>> > 2. The 'sum' mode of 'compute reduce' outputs the sum<br>> divided by the number of<br>> > particles for the global stress components, see the column #4, #5 and #6<br>> in the<br>> > output. This is not the expected behavior as explained the manual. The<br>> manual<br>> > states that LAMMPS should output the extensive value for 'sum'<br>> mode, i.e. #4 =<br>> > -(#5+#6+#7)/(3*vol), but this is not true in the output. Here is the link<br>> to<br>> > this documentation page:<br>> > http://lammps.sandia.gov/doc/compute_reduce.html<br>> ><br>> > Here is the thermo output:<br>> > ------------------------------------------------------<br>> > Step Temp Press pr stgb[1] stgb[2] stgb[3]<br>> > 3000 0.19959828 -3.6026013 -2.8299618 3.542873 2.9886061 <br>> 3.4566444<br>> > 4000 0.21972125 -3.5906188 -2.8179793 3.6414372 3.027412 <br>> 3.2769829<br>> > 5000 0.25928035 -3.3888346 -2.6161951 3.3519174 3.0632664 <br>> 2.8184672<br>> > 6000 0.24798621 -3.1076225 -2.334983 2.939114 2.7244319 <br>> 2.5775896<br>> > 7000 0.26337174 -3.6106924 -2.8380529 3.1305292 3.6123963 <br>> 3.2737548<br>> > 8000 0.28416182 -3.3500865 -2.577447 3.1591088 2.9036388 <br>> 3.0341449<br>> > -------------------------------------------------------<br>> ><br>> ><br>> > Here is the input file:<br>> > ------------------------------------------------------<br>> > # LJ Particles<br>> ><br>> > echo both<br>> ><br>> > variable p index LJ<br>> > variable s equal step<br>> ><br>> > units lj<br>> > atom_style atomic<br>> > read_data data.$p<br>> ><br>> > mass * 1.0<br>> > pair_style lj/cut 2.5<br>> > pair_coeff * * 1.0 1.0 2.5<br>> > pair_modify tail yes<br>> ><br>> > timestep 0.005<br>> > velocity all create 1.2 32554 dist gaussian<br>> ><br>> > neighbor 1.0 bin<br>> > neigh_modify every 5 delay 0 check yes<br>> > fix 1 all nve/limit 0.05<br>> > run 1000<br>> ><br>> > unfix 1<br>> > fix 1 all nvt 1.2 1.2 1<br>> > run 1000<br>> ><br>> > unfix 1<br>> > fix 1 all nve<br>> > run 1000<br>> ><br>> > compute stpa all stress/atom<br>> > compute stgb all reduce sum c_stpa[1] c_stpa[2] c_stpa[3]<br>> > variable pr equal -(c_stgb[1]+c_stgb[2]+c_stgb[3])/(3*vol)<br>> > thermo_style custom step temp press v_pr c_stgb[1] c_stgb[2] c_stgb[3]<br>> > dump D1 all custom 1000 dump.$p id c_stpa[1] c_stpa[2]<br>> c_stpa[3]<br>> > log log.$p<br>> > thermo 1000<br>> > run 5000<br>> > ---------------------------------------------------------------<br>> ><br>> ><br>> > Here is the data file to reproduce my result:<br>> > ---------------------------------------------------------------<br>> > Created by create_lj<br>> > 125 atoms<br>> > 0 bonds<br>> > 1 atom types<br>> > -2.63917 2.63917 xlo xhi<br>> > -2.63917 2.63917 ylo yhi<br>> > -2.63917 2.63917 zlo zhi<br>> ><br>> > Masses<br>> ><br>> > 1 1.0<br>> ><br>> > Atoms<br>> ><br>> > 1 1 -2.59786 0.199459 0.555926<br>> > 2 1 0.792447 1.41057 2.42374<br>> > 3 1 -2.40367 1.9251 -1.07464<br>> > 4 1 1.01817 0.0109657 -0.441416<br>> > 5 1 2.45625 0.380624 -0.202503<br>> > 6 1 1.05669 -1.85067 1.04609<br>> > 7 1 -0.445224 1.80644 -0.0740315<br>> > 8 1 1.43947 2.51588 -0.335202<br>> > 9 1 -1.75826 2.26323 2.45385<br>> > 10 1 2.21142 2.63577 -1.63315<br>> > 11 1 -0.945717 -1.59385 -0.248115<br>> > 12 1 -0.187309 -2.20695 -1.40284<br>> > 13 1 0.731408 -0.472485 -2.44183<br>> > 14 1 -0.85155 -2.43392 0.265428<br>> > 15 1 0.846649 -0.760951 0.0980438<br>> > 16 1 0.981153 0.711087 1.09329<br>> > 17 1 1.10828 -0.467631 -0.0275641<br>> > 18 1 1.22333 1.44855 2.14744<br>> > 19 1 -1.24052 0.0380062 0.0917534<br>> > 20 1 0.824933 -1.54074 0.339542<br>> > 21 1 0.808073 0.120846 -1.09809<br>> > 22 1 -2.46529 0.750115 2.5161<br>> > 23 1 -1.87641 1.2293 1.3948<br>> > 24 1 1.3147 1.09312 -1.88886<br>> > 25 1 -2.2074 1.67557 1.30583<br>> > 26 1 -0.285954 2.53336 -2.19587<br>> > 27 1 0.0752806 -1.5595 1.67482<br>> > 28 1 -0.710593 1.94085 -0.235935<br>> > 29 1 -1.33472 0.229174 -1.45411<br>> > 30 1 -0.464502 -0.222329 0.381168<br>> > 31 1 -1.61053 -0.940435 -2.55868<br>> > 32 1 -1.19448 -2.03964 2.54184<br>> > 33 1 -2.21283 0.0561586 -0.964498<br>> > 34 1 -0.556254 -1.03468 2.20301<br>> > 35 1 -1.5182 -0.909437 1.16111<br>> > 36 1 0.817144 -0.497605 -2.35543<br>> > 37 1 -0.264755 -0.104938 -0.734956<br>> > 38 1 -1.09446 0.442579 1.25351<br>> > 39 1 1.84368 -2.43008 1.41207<br>> > 40 1 1.32758 1.10828 -0.383936<br>> > 41 1 2.58816 0.465274 2.63706<br>> > 42 1 -1.09123 1.98619 1.68692<br>> > 43 1 2.09708 2.16837 2.08974<br>> > 44 1 0.208687 2.58988 -2.3294<br>> > 45 1 -0.870611 -0.811735 1.66111<br>> > 46 1 1.18941 1.27225 0.174203<br>> > 47 1 -1.65411 0.399356 -2.06589<br>> > 48 1 -0.481245 -1.8678 -1.83917<br>> > 49 1 -1.02876 1.4077 1.68786<br>> > 50 1 2.10437 -1.97195 0.0767962<br>> > 51 1 -2.47803 -2.13698 -2.47656<br>> > 52 1 1.35758 -1.32131 -1.21847<br>> > 53 1 1.11985 -1.29983 0.707434<br>> > 54 1 -2.25387 1.80392 -0.359966<br>> > 55 1 -0.980875 -1.31782 -0.658835<br>> > 56 1 0.915786 -0.0136548 -2.52815<br>> > 57 1 -0.0697791 -0.986861 -1.64404<br>> > 58 1 0.783153 -1.72269 -1.59114<br>> > 59 1 -2.30365 -0.84966 -2.33638<br>> > 60 1 -2.06189 -1.83069 -1.01722<br>> > 61 1 0.127444 -1.05477 2.34668<br>> > 62 1 0.920543 0.770928 -1.32811<br>> > 63 1 0.487547 2.22685 -1.97624<br>> > 64 1 1.89933 -1.25451 2.40626<br>> > 65 1 -0.560884 0.324528 1.81328<br>> > 66 1 -1.34608 -0.699641 1.25994<br>> > 67 1 -0.895625 1.04187 2.53842<br>> > 68 1 -1.54841 -1.87117 -0.449172<br>> > 69 1 -1.21577 -0.970142 -0.391962<br>> > 70 1 -0.344854 -0.34875 -2.48882<br>> > 71 1 1.1435 0.346887 -2.43511<br>> > 72 1 1.30734 -1.24707 0.751291<br>> > 73 1 1.16296 0.187245 1.13958<br>> > 74 1 -2.15143 -2.47492 2.57269<br>> > 75 1 -0.935668 -1.61584 -0.410018<br>> > 76 1 2.33914 0.945166 -2.3799<br>> > 77 1 0.288973 0.706746 2.01986<br>> > 78 1 -2.54057 2.36631 -1.6099<br>> > 79 1 -0.805282 -0.725773 0.168812<br>> > 80 1 -2.51551 1.22675 0.841671<br>> > 81 1 0.0217407 1.1906 0.167753<br>> > 82 1 0.791313 -1.80487 0.100063<br>> > 83 1 -2.02343 0.551478 -0.061916<br>> > 84 1 -0.789821 0.501666 2.00049<br>> > 85 1 -0.781109 -0.870978 -1.7018<br>> > 86 1 1.18085 -0.0304439 0.327171<br>> > 87 1 -1.25688 -0.422901 2.22013<br>> > 88 1 1.09764 0.2576 1.25418<br>> > 89 1 -2.61355 0.379176 1.85891<br>> > 90 1 0.247024 -2.31826 1.70616<br>> > 91 1 -1.79639 0.237851 1.86634<br>> > 92 1 -1.50569 -1.74724 -2.45423<br>> > 93 1 1.93093 1.92766 -0.212096<br>> > 94 1 -1.81635 2.46748 -0.970017<br>> > 95 1 1.70932 -1.39455 -2.35284<br>> > 96 1 1.1934 -0.237852 -1.88072<br>> > 97 1 -2.58582 2.00771 -0.766852<br>> > 98 1 1.22024 2.30664 -1.74895<br>> > 99 1 0.523574 0.725127 -0.471644<br>> > 100 1 1.14772 -2.60061 1.42416<br>> > 101 1 -1.35752 2.32465 0.108955<br>> > 102 1 -0.369976 -0.313203 -1.49569<br>> > 103 1 -2.59841 1.46675 1.76529<br>> > 104 1 -0.332877 0.373294 -1.98847<br>> > 105 1 2.17122 2.58065 0.878254<br>> > 106 1 2.58328 -2.40027 0.990791<br>> > 107 1 -0.922782 -1.44787 -1.23665<br>> > 108 1 1.77237 2.62127 -2.60043<br>> > 109 1 -0.885622 0.254774 1.26081<br>> > 110 1 -2.0104 -2.19797 1.83576<br>> > 111 1 1.80919 -1.44481 -2.54625<br>> > 112 1 1.93157 2.0914 1.74828<br>> > 113 1 -1.09236 -1.24987 1.2774<br>> > 114 1 2.22894 1.49985 -1.38862<br>> > 115 1 2.30332 0.57198 1.41364<br>> > 116 1 1.33449 1.04162 -1.77817<br>> > 117 1 0.317176 -0.347457 -1.87213<br>> > 118 1 -0.762737 1.75719 0.737404<br>> > 119 1 0.0140992 -0.560088 -2.11978<br>> > 120 1 1.67618 1.10934 1.62421<br>> > 121 1 -1.37919 2.37825 -1.53213<br>> > 122 1 2.52772 -1.91814 1.83538<br>> > 123 1 0.598147 -2.18167 1.23062<br>> > 124 1 2.50916 -2.51425 1.32802<br>> > 125 1 -2.1043 -2.19737 1.31384<br>> > --------------------------------------------------------<br>> ><br>> > Thanks,<br>> ><br>> > Gaurav Pranami<br>> ><br>> > Graduate Student (Ph.D.)<br>> > (515) 230 7005<br>> > [email protected]<br>> ><br>> > Office:<br>> > 1014 Sweeney Hall<br>> > Department of Chemical and Biological Engineering<br>> > Iowa State University<br>> > Ames, IA – 50011<br>> ><br>> > Residence:<br>> > 137 N Hyland, Apt 12<br>> > Ames, IA – 50014<br>> > Iowa State University<br>> ><br>> ><br>> ><br>> ><br>> ><br>> ><br>> ><br>> ------------------------------------------------------------------------------<br>> > This SF.net email is sponsored by:<br>> > SourcForge Community<br>> > SourceForge wants to tell your story.<br>> > http://p.sf.net/sfu/sf-spreadtheword<br>> > _______________________________________________<br>> > lammps-users mailing list<br>> > [email protected]<br>> > https://lists.sourceforge.net/lists/listinfo/lammps-users<br>> ><br>> ><br>> <br>> ------------------------------------------------------------------------------<br>> This SF.net email is sponsored by:<br>> SourcForge Community<br>> SourceForge wants to tell your story.<br>> http://p.sf.net/sfu/sf-spreadtheword<br>> _______________________________________________<br>> lammps-users mailing list<br>> [email protected]<br>> https://lists.sourceforge.net/lists/listinfo/lammps-users<br>> <br>>


|

You cannot use NPT on dimensions that are shearing.
If you shear in xy, then you could apply NPT in z only.
Ditto for other pairings, i.e. you can use NPT on non-sheared
dimensions.

Steve

I think I lied. You can't do NPT on z and fix deform on xy.
I think the code could allow this, but I'd have to think
about it a bit.

Steve