From ceac9a7eaf24ced7a974604be5afcdddbed589c1 Mon Sep 17 00:00:00 2001 From: jrudz Date: Thu, 28 Mar 2024 10:51:11 +0100 Subject: [PATCH 1/2] added initialization parameters to gromacs --- atomisticparsers/gromacs/parser.py | 26 ++++++++++++++++++++++++++ tests/test_gromacsparser.py | 14 ++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/atomisticparsers/gromacs/parser.py b/atomisticparsers/gromacs/parser.py index 9be1bf08..cb81dfc8 100644 --- a/atomisticparsers/gromacs/parser.py +++ b/atomisticparsers/gromacs/parser.py @@ -71,6 +71,14 @@ def to_float(string): return value +def to_int(string): + try: + value = int(string) + except ValueError: + value = None + return value + + class GromacsLogParser(TextParser): def __init__(self): super().__init__(None) @@ -1106,6 +1114,22 @@ def parse_method(self): rcoulomb = input_parameters.get("rcoulomb", None) sec_force_calculations.coulomb_cutoff = to_float(rcoulomb) + def get_initialization_parameters(self): + initialization_parameters = {"velocity_distribution": "gaussian"} + gen_vel = self.input_parameters.get("gen-vel", "no").lower() + if gen_vel == "no": + return {} + gen_temp = self.input_parameters.get("gen-temp", None) + if isinstance(gen_temp, str): + gen_temp = to_float(gen_temp) + initialization_parameters["temperature"] = gen_temp + gen_seed = self.input_parameters.get("gen-seed", None) + if isinstance(gen_seed, str): + gen_seed = to_int(gen_seed) + initialization_parameters["velocity_distribution_seed"] = gen_seed + + return initialization_parameters + def get_thermostat_parameters(self, integrator: str = ""): thermostat = self.input_parameters.get("tcoupl", "no").lower() thermostat_map = { @@ -1389,6 +1413,8 @@ def parse_workflow(self): timestep * ureg.picosecond if timestep else None ) + initialization_parameters = self.get_initialization_parameters() + method["initialization_parameters"] = [initialization_parameters] thermostat_parameters = self.get_thermostat_parameters(integrator) method["thermostat_parameters"] = [thermostat_parameters] barostat_parameters = self.get_barostat_parameters() diff --git a/tests/test_gromacsparser.py b/tests/test_gromacsparser.py index a2927d85..129ec0a0 100644 --- a/tests/test_gromacsparser.py +++ b/tests/test_gromacsparser.py @@ -330,6 +330,20 @@ def test_geometry_optimization(parser): assert sec_workflow.results.steps[4] == 5000 +def test_initialization_parameters(parser): + archive = EntryArchive() + parser.parse( + "tests/data/gromacs/water_AA_ENUM_tests/integrator-sd/md.log", archive, None + ) + + sec_workflow = archive.workflow2 + sec_init = sec_workflow.method.initialization_parameters[0] + + assert sec_init.temperature.magnitude == approx(298.0) + assert sec_init.velocity_distribution == "gaussian" + assert sec_init.velocity_distribution_seed == 173529 + + def test_integrator_sd(parser): archive = EntryArchive() parser.parse( From a958b59ea7eda3b7054cb1259357f375e8be4e33 Mon Sep 17 00:00:00 2001 From: jrudz Date: Thu, 28 Mar 2024 13:02:17 +0100 Subject: [PATCH 2/2] added vel init and tests to lammps --- atomisticparsers/lammps/parser.py | 54 ++++ .../test_init_velocity/exponential/log.lammps | 228 +++++++++++++++ .../test_init_velocity/gaussian/log.lammps | 228 +++++++++++++++ .../test_init_velocity/uniform/log.lammps | 228 +++++++++++++++ tests/test_lammpsparser.py | 271 ++++++++++++++---- 5 files changed, 952 insertions(+), 57 deletions(-) create mode 100644 tests/data/lammps/test_init_velocity/exponential/log.lammps create mode 100644 tests/data/lammps/test_init_velocity/gaussian/log.lammps create mode 100644 tests/data/lammps/test_init_velocity/uniform/log.lammps diff --git a/atomisticparsers/lammps/parser.py b/atomisticparsers/lammps/parser.py index 3896d2c1..2d030e26 100644 --- a/atomisticparsers/lammps/parser.py +++ b/atomisticparsers/lammps/parser.py @@ -949,6 +949,12 @@ def __init__(self): "poteng": "potential", } + def apply_unit(self, value, unit): + units = self.log_parser.units + if not hasattr(value, "units"): + value = value * units.get(unit, 1) + return value + def get_time_step(self): time_unit = self.log_parser.units.get("time", None) time_step = self.log_parser.get("timestep", [0], unit=time_unit)[0] @@ -1162,6 +1168,54 @@ def parse_workflow(self): integration_timestep = self.get_time_step() method["integration_timestep"] = integration_timestep + val = self.log_parser.get("velocity", None) + try: + val = ( + [val_i for val_i in val if val_i[1] == "create"] + if val is not None + else None + ) + val = val[len(val) - 1] if val is not None else None + except Exception: + self.logger.warning("Velocity command/s missing expected parameters.") + val = None + + if val is not None: + initialization_parameters = {} + if val[0] != "all": + self.logger.warning( + "Velocity generation was not performed for all particles, details not stored." + ) + initialization_parameters["temperature"] = ( + val[2] if len(val) > 1 else None + ) + initialization_parameters["velocity_distribution_seed"] = ( + val[3] if len(val) > 2 and isinstance(val[3], int) else None + ) + for i_val in range(3, len(val)): + if val[i_val] == "dist": + initialization_parameters["velocity_distribution"] = val[ + i_val + 1 + ] + if val[i_val + 1] == "uniform": + initialization_parameters["velocity_distribution_min"] = ( + self.apply_unit(val[i_val + 2], "velocity") + if len(val) > i_val + 2 + else None + ) + initialization_parameters["velocity_distribution_max"] = ( + self.apply_unit(val[i_val + 3], "velocity") + if len(val) > i_val + 3 + else None + ) + elif val[i_val + 1] == "exponential": + initialization_parameters["velocity_distribution_decay"] = ( + val[i_val + 2] / self.apply_unit(1.0, "velocity") + if len(val) > i_val + 2 + else None + ) + method["initialization_parameters"] = initialization_parameters + thermostat_parameters, barostat_parameters = {}, {} val = self.log_parser.get("fix", None) if val is not None: diff --git a/tests/data/lammps/test_init_velocity/exponential/log.lammps b/tests/data/lammps/test_init_velocity/exponential/log.lammps new file mode 100644 index 00000000..3bdec449 --- /dev/null +++ b/tests/data/lammps/test_init_velocity/exponential/log.lammps @@ -0,0 +1,228 @@ +LAMMPS (21 Nov 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +units real +dimension 3 +boundary p p p +atom_style full +read_data structure.inp +Reading data file ... + orthogonal box = (0 0 0) to (9.312845 9.312845 9.312845) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + scanning bonds ... + 2 = max bonds/atom + scanning angles ... + 1 = max angles/atom + reading bonds ... + 54 bonds + reading angles ... + 27 angles +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.000 seconds + read_data CPU = 0.005 seconds +include potential.inp +# @potential_species H_O ### species in potentia +# W.L. Jorgensen et.al., The Journal of Chemical Physics 79, 926 (1983); https://doi.org/10.1063/1.44586 + + + +# create groups ## +group O type 2 +27 atoms in group O +group H type 1 +54 atoms in group H + +## set charges - beside manually ## +set group O charge -0.830 +Setting atom values ... + 27 settings made for charge +set group H charge 0.415 +Setting atom values ... + 54 settings made for charge + +### TIP3P Potential Parameters ## +pair_style lj/cut/coul/long 10.0 +pair_coeff * * 0.0 0.0 +pair_coeff 2 2 0.102 3.188 +bond_style harmonic +bond_coeff 1 450 0.9572 +angle_style harmonic +angle_coeff 1 55 104.52 +kspace_style pppm 1.0e-5 + +fix ensemble all nvt temp 300.0 300.0 100.0 +variable dumptime equal 100 +variable thermotime equal 100 +timestep 0.01 +velocity all create 298.0 mom yes dist exponential 5.0 +dump 1 all custom ${dumptime} dump.out id type xsu ysu zsu fx fy fz vx vy vz +dump 1 all custom 100 dump.out id type xsu ysu zsu fx fy fz vx vy vz +dump_modify 1 sort id format line "%d %d %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g" +thermo_style custom step temp pe etotal pxx pxy pxz pyy pyz pzz vol +thermo_modify format float %20.15g +thermo ${thermotime} +thermo 100 +run 10000 +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.31267543 + grid = 9 9 9 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0018389131 + estimated relative force accuracy = 5.5378322e-06 + using double precision FFTW3 + 3d grid and FFT values/proc = 4096 729 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 2 2 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 7.29 | 7.29 | 7.29 Mbytes + Step Temp PotEng TotEng Pxx Pxy Pxz Pyy Pyz Pzz Volume + 0 600 -9.95297403140808 133.125908368592 20165.6570625658 354.890948312657 289.557331240064 -144856.180216441 -1234.54262542923 25299.4082350641 807.69449195738 + 100 549.424475004357 2.09539886203993 133.113798606757 10417.9687311007 -8245.59337864054 -0.641007306396413 -148264.452446805 -856.562951138488 25211.8571798006 807.69449195738 + 200 558.966220490545 -0.221671700051729 133.072098511847 21859.6586284075 -12856.1769747728 -258.5503663201 -117734.814984681 -229.577898977633 24656.9359444122 807.69449195738 + 300 636.59362085172 -18.7991895453406 133.005983478715 50947.3019575378 -11098.7413975581 -108.65867201564 -65311.011568295 213.445859381379 24081.0475537943 807.69449195738 + 400 702.427594183817 -34.6078708507443 132.896387720491 83743.8426080122 -4574.59282114155 604.223765152657 -12884.7112825304 143.531581751225 24023.7272817512 807.69449195738 + 500 690.835913461244 -32.0028213925057 132.737229307191 102766.667505357 3127.91221433384 1672.36658525722 21079.2854589999 -502.798414405993 24676.739146653 807.69449195738 + 600 633.709277238861 -18.5673955173975 132.549963072349 96513.9830308545 9256.23395458673 2569.50644728368 30772.3672445559 -1483.78746202764 25704.2843450587 807.69449195738 + 700 611.311314156295 -13.4353498049027 132.340882908361 64364.7142080545 12488.3886768091 2643.49416786443 21646.8225017792 -2280.64635984826 26369.5617716242 807.69449195738 + 800 642.063473730102 -21.0116852452807 132.097855173327 15477.6875913388 11766.3727107676 1428.59732001239 2869.16552555661 -2295.97788818753 25841.4670104362 807.69449195738 + 900 666.173126838146 -27.0507355743052 131.80810854722 -34406.3086933884 6196.59000988096 -992.051045515432 -17839.5375064128 -1267.40903397791 23620.7453443176 807.69449195738 + 1000 642.852386343694 -21.8190444260647 131.478623884317 -66589.9250521509 -3255.10648269727 -3813.54072383737 -34346.122093855 423.095551217745 20147.8040674292 807.69449195738 + 1100 618.050590969481 -16.2525093224754 131.130803715146 -66166.5780815557 -12794.0446028342 -5798.75171412935 -41220.7540101255 1921.24332300042 17113.9647488387 807.69449195738 + 1200 662.008442364135 -27.1175956264522 130.748117828257 -31379.5578366597 -17806.3752214524 -5971.1770976048 -35537.0688436992 2451.80695498787 16700.4338606829 807.69449195738 + 1300 765.032428857505 -52.1557662936091 130.27754190754 22477.7633168915 -16282.9313193746 -4212.41555691826 -20018.316571434 1672.10652214791 19945.764677908 807.69449195738 + 1400 841.419750038618 -70.9700275968794 129.678968177809 71145.8485118461 -10044.3832683949 -1271.90886867315 -3376.42298445358 -428.339411005042 25630.0978826252 807.69449195738 + 1500 837.912940951369 -70.8270469213553 128.985698311676 96060.9946303843 -2654.44927523298 1708.6059678105 3888.49397659331 -3652.25510053612 30849.3968043667 807.69449195738 + 1600 798.233121032663 -62.1009694181225 128.24953533524 92881.6389097194 3313.03997193766 3692.01912763655 -4642.94428843754 -7246.32005156667 32756.2322373313 807.69449195738 + 1700 798.124394765975 -62.8504492350614 127.474128130425 68537.6996442604 6934.64979925849 4022.63025136177 -28034.1585742593 -9576.17325349982 29893.0427159383 807.69449195738 + 1800 844.160107506743 -74.6918695648794 126.610605016335 33534.2971647343 7952.98495326469 2673.71689263551 -58649.7153326471 -8799.00456953756 22352.1563764909 807.69449195738 + 1900 876.711856671294 -83.4368497281453 125.628071337451 -1880.01435312597 6346.83199165818 482.262955942094 -85008.5547396707 -4416.52091980284 11748.4524683879 807.69449195738 + 2000 866.902383125492 -82.1647504434925 124.560956435661 -27633.4746597711 2960.83303768928 -1078.82158402717 -95555.1014375772 1840.90968169567 1620.58093383669 807.69449195738 + 2100 863.757591145525 -82.5381026004231 123.437682075606 -35401.0730786223 -339.70719158148 -775.153905548272 -83438.8445391716 7018.55322378328 -3211.1368546681 807.69449195738 + 2200 922.042508850789 -97.6658570901118 122.20882906266 -23399.044886854 -1854.87215435732 1471.95262843092 -50805.5155077011 9062.70612104965 500.254374014074 807.69449195738 + 2300 1013.50795387003 -120.896236288138 120.789739283919 675.114863778618 -1436.75670890858 4426.46124197053 -8953.89792589724 7991.30115313481 11299.3895738465 807.69449195738 + 2400 1050.29471341616 -131.288338383377 119.169984593644 23262.5085667981 -533.892499651063 6255.63933093302 27164.8464061343 5205.21044902687 23164.9397014355 807.69449195738 + 2500 994.96247053786 -119.791546012919 117.471984511247 33086.6892776804 -891.833980304868 5609.22923036495 46514.1786110448 2096.43822469286 29478.8715840268 807.69449195738 + 2600 909.14931006487 -100.971137759652 115.828974271703 26988.2024908358 -3194.47628586829 2460.50699493354 45809.689720942 -522.242513539705 27091.1199201804 807.69449195738 + 2700 873.336171305155 -94.0143203357761 114.245618580618 9547.01130733323 -6601.00394905176 -1830.28604981318 27991.0763777706 -2122.68440033087 16968.1510592554 807.69449195738 + 2800 886.971564328324 -98.8773474780137 112.634152763113 -11130.1024615092 -9254.37214269831 -5364.38173445364 -957.921800273292 -2336.65066833551 2388.0645152333 807.69449195738 + 2900 884.569484200259 -99.9707656436433 110.967923030553 -27089.7780750018 -9356.8982565523 -6780.57600718068 -32803.6857050629 -1355.01071712088 -12147.0482578912 807.69449195738 + 3000 839.913718825206 -90.9682435902666 109.321616746297 -32454.1207805645 -6344.40212635755 -5697.71273928087 -56626.9056121771 -90.1029541214089 -20997.8358157315 807.69449195738 + 3100 807.334467552589 -84.7756783406837 107.745177226689 -24923.1931224192 -1477.57619783194 -2489.44476862579 -61590.3147008916 458.822164814247 -19024.7880789863 807.69449195738 + 3200 839.930784841749 -94.1299207412069 106.164009239647 -7231.61436690889 2821.92796051567 2017.3570824056 -43613.2987763451 14.3824207328152 -5199.66346951412 807.69449195738 + 3300 901.335245498503 -110.460128130558 104.476604525534 13144.3332900884 4629.17269009913 6698.49366874871 -9917.00679483691 -936.802493126593 15400.1750926676 807.69449195738 + 3400 901.793524655352 -112.330976186067 102.71503991934 27229.6199833518 3910.21615248228 10400.6771208402 24402.4059216976 -1819.46314961378 34250.1185311269 807.69449195738 + 3500 815.493379375424 -93.4248474952149 101.041621380843 29083.691340998 2450.40918536051 12365.293301818 45723.4026951678 -2410.01574628624 44511.9442998141 807.69449195738 + 3600 717.693090903879 -71.5645037282759 99.5800385262717 18183.7592255055 2368.86774235798 12419.7090403585 48841.0982899841 -2629.48707886775 43885.4440119067 807.69449195738 + 3700 689.835862878935 -66.2263614575631 98.275212376033 -1672.673090553 4522.20419325959 10730.9290445951 36575.9888033273 -2246.69825192096 33723.7340011661 807.69449195738 + 3800 722.580027067057 -75.3215087961214 96.9883957327391 -24626.3224726006 8012.70085707958 7563.60889072937 15379.8098419377 -1088.31181685109 17228.8722479177 807.69449195738 + 3900 744.705918930297 -81.9103450356799 95.6758059596733 -43863.5450012529 10863.1258472953 3440.59285104059 -7276.55573097216 615.437739022703 -836.596161932647 807.69449195738 + 4000 729.007202434246 -79.45300125985 94.3895583832208 -52445.6460941582 11140.0204545999 -607.63631651437 -23144.2051924238 2326.1801263131 -14193.871422439 807.69449195738 + 4100 725.187771039129 -79.7720224880668 93.1597371959759 -45908.79822611 7981.19035797013 -3314.34315322823 -24783.8677691153 3633.07086862093 -17248.944429612 807.69449195738 + 4200 778.68873064081 -93.7693498286962 91.9205057005732 -25750.8035082646 2167.17615996965 -3952.79782922692 -9900.25275241401 4455.28804393082 -8733.52520264573 807.69449195738 + 4300 853.54599636964 -112.946895706172 90.5937830230984 26.3525310997114 -4125.05982439448 -2879.00515267324 15519.5027443966 4769.32283169458 6788.41222305862 807.69449195738 + 4400 869.599365748863 -118.170723415908 89.1981188959183 21219.0586663245 -8412.63073868276 -1209.19915210363 39673.7856125431 4290.55543292237 21545.1560942985 807.69449195738 + 4500 805.523797599058 -104.228930938378 87.8601435734176 31290.2544502563 -9195.76166976858 78.1644597409674 51827.5471345222 2599.69275393081 29224.0320568666 807.69449195738 + 4600 727.774444048004 -86.886928792761 86.6616613633552 29677.0284686462 -6632.24633003324 747.418216472531 47662.384282908 -334.718243567571 27753.0829490286 807.69449195738 + 4700 706.413498033617 -82.8867377336089 85.5680186179319 19658.6700081631 -2332.77284658848 1156.59432388502 29343.7386872311 -3847.5478837743 18827.6896023319 807.69449195738 + 4800 732.171461793534 -90.1076106955356 84.4895134354529 5469.23875023193 1453.97978676326 1753.46986907182 2736.85860480236 -6844.2435008205 5926.34624334733 807.69449195738 + 4900 744.010610792095 -94.0277682843698 83.3925761920875 -8428.92843195287 2963.1612582777 2769.04390466551 -24078.6611318482 -8405.12173726383 -6895.89786321597 807.69449195738 + 5000 721.880722266159 -89.8228916843955 82.3202532621825 -17149.1032288613 1829.00589405725 4094.52308724686 -41351.2091352699 -8161.31716609191 -15290.9243862931 807.69449195738 + 5100 711.8212001968 -88.4551837371623 81.2891192508123 -16872.3949063516 -857.718399803414 5198.73344706078 -40843.5450805845 -6251.21418482546 -15572.6425910545 807.69449195738 + 5200 750.349233276765 -98.683522979534 80.2483598653601 -7565.8091011188 -3400.13189766955 5309.99720609671 -21412.2484943467 -3139.66947329429 -6797.60248166234 807.69449195738 + 5300 799.280109564023 -111.460050140404 79.1401245278794 6188.54696654024 -4468.68894772586 3961.67237173752 8445.66233333135 502.089059712546 7826.04175846589 807.69449195738 + 5400 788.759072207702 -110.095732163053 77.9955453941785 17854.9813513945 -3564.37844746323 1457.38720162139 35165.5775379486 3954.77707291656 22233.2431715385 807.69449195738 + 5500 713.578852534085 -93.2480446876343 76.9153965204511 22816.8896389448 -1036.90077829898 -1213.68616955452 48396.3518957972 6670.39481980879 30806.4117067305 807.69449195738 + 5600 649.070963598512 -78.8332543829672 75.947325733643 20127.815417323 2094.85406983802 -2921.56847239856 45599.9013870323 8252.4152384986 30796.4786779983 807.69449195738 + 5700 660.210023712646 -82.4095596553336 75.0272942481378 11596.6669006659 4549.96035117116 -2968.6749800027 30226.5818988833 8185.34780818143 22326.8516533217 807.69449195738 + 5800 723.839436194642 -98.5598152929845 74.0504139866413 283.071992091383 5428.38027806148 -1421.54039076554 7732.18434220361 5851.9732135927 7444.17379420226 807.69449195738 + 5900 766.502178408386 -109.798935918736 72.9848558209927 -10081.2880443878 4649.42022596065 779.987786682946 -15677.6032391042 1244.07698283853 -9839.71290064648 807.69449195738 + 6000 762.666937332036 -109.986428063159 71.8827936650055 -15529.0677504544 2834.89526368938 2071.50180942626 -32465.6197981005 -4245.34511520088 -23390.0029406579 807.69449195738 + 6100 758.589647933645 -110.113733485269 70.7831982256561 -13387.8523062955 810.667109735556 1029.11743843541 -35554.169063136 -8116.5936987103 -27081.4546058721 807.69449195738 + 6200 794.180340982533 -119.737037224108 69.6470221289455 -4107.9682686488 -818.601763961975 -2636.19047000581 -23054.466132965 -8367.16086748783 -18835.7764612207 807.69449195738 + 6300 837.310687486501 -131.245580911634 68.4235480669396 8616.03180754489 -1773.69746045773 -7610.05856648747 -1042.80923482986 -5013.06005523785 -2796.44327345114 807.69449195738 + 6400 825.155842632356 -129.626364250982 67.1442620317981 19936.551932651 -1997.92258727665 -11560.1042556231 19733.0821100142 -43.5630828529573 13136.0994865698 807.69449195738 + 6500 755.567157921625 -114.265546476258 65.9106277463593 26233.2542239326 -1567.4980873389 -12471.3176949021 30704.417043487 4045.46360503056 22355.7690813511 807.69449195738 + 6600 699.828870647813 -102.113040947573 64.7715135249992 26011.1488158555 -694.099771745189 -9789.04601168312 29447.578781687 5699.06923766744 22515.0763306323 807.69449195738 + 6700 715.526914127146 -106.971257311487 63.6567280225681 19604.6727073358 208.245057309559 -4562.64692819498 18138.0860877375 4718.08797313052 14552.5216977707 807.69449195738 + 6800 775.615856315579 -122.495837933028 62.4612452225586 9043.55603968005 556.132111028385 1342.23989501651 334.32255628017 1896.35169797745 600.207255748325 807.69449195738 + 6900 807.736486416616 -131.450714180481 61.1660087365064 -1973.16842451348 -54.0894043626737 6120.45455849071 -19624.0554446195 -1484.69465322806 -15951.0144145948 807.69449195738 + 7000 787.975665991316 -128.063558332453 59.8409044149358 -9058.89152697209 -1354.35629888727 8413.72640343375 -35594.356142703 -4104.42424530698 -29230.4617908466 807.69449195738 + 7100 762.514730224787 -123.293842103028 58.5390835871386 -9170.82631752316 -2378.42087301241 7526.95431110271 -40981.7602431774 -5025.11331987672 -32395.3922708718 807.69449195738 + 7200 773.214154394621 -127.148991114166 57.2353706635726 -2205.62984979319 -2235.49649238778 3847.07038137678 -33043.5679494566 -3942.76273007994 -22369.1997453771 807.69449195738 + 7300 794.461474527736 -133.574451577353 55.8766482314542 9107.44089952257 -978.139789039356 -996.347860358423 -15795.3744089339 -1187.34081146432 -3142.32752105399 807.69449195738 + 7400 769.6940061952 -129.048828753337 54.496101573976 20774.2232719109 421.994027875439 -4914.51455005615 2263.45975800271 2371.29732943928 16485.2790719545 807.69449195738 + 7500 695.991571156081 -112.776524648438 53.1929689529484 29164.4422892762 1013.90848054582 -6652.42426363227 13729.106629608 5493.75065492286 28710.0028889388 807.69449195738 + 7600 637.245408738691 -99.9488159713542 52.0117855234176 31794.0837991262 673.472447275985 -6322.20165094015 15849.7251652775 6928.53964147847 30413.3440594108 807.69449195738 + 7700 644.606422393029 -102.836745900786 50.8791982723091 27527.8865046363 -40.5726237603459 -4728.09946223989 9729.99656960309 5938.13683671454 22383.7309705785 807.69449195738 + 7800 691.870209244357 -115.299964276375 49.6867295645193 16937.1007790126 -688.775805615749 -2549.111569721 -2007.29779401824 2676.21446286065 7245.69069279605 807.69449195738 + 7900 713.210024837858 -121.65646176024 48.4190270235551 2860.53154375996 -1386.97060848189 -364.233267912295 -15809.8262726633 -1742.70490439749 -10623.0591446457 807.69449195738 + 8000 689.346775901244 -117.23308991868 47.1518538846422 -9841.86173520548 -2377.5021233421 1010.39754001031 -26667.3761251549 -5527.8626882883 -24608.9052997435 807.69449195738 + 8100 664.283714682476 -112.479620301075 45.9286655210737 -16203.0132940287 -3378.17513741475 898.577120937872 -29337.2551313746 -6939.61739680164 -28119.1468623522 807.69449195738 + 8200 674.907150449886 -116.224040427363 44.7175609228681 -13874.3322908691 -3675.9289187546 -449.198114925217 -21642.9204533745 -5287.00852079334 -18992.1721396049 807.69449195738 + 8300 696.221856272698 -122.558368654279 43.4660398423062 -4487.57729489602 -2957.12733464037 -1840.09942612565 -6669.59387102806 -1520.07356852058 -1554.17161669823 807.69449195738 + 8400 679.107632846304 -119.743126160806 42.2001424007921 7543.09880979063 -1794.95829147575 -2146.02995724669 8956.2072155583 2260.23394928089 16276.8251468725 807.69449195738 + 8500 625.581799580143 -108.176074512087 41.0031667107587 17493.4550941942 -1125.77669195788 -1159.78386484242 19288.381386591 4108.13384425536 27971.4593358697 807.69449195738 + 8600 593.570116794496 -101.650435005655 39.8951465560015 21977.6809752879 -1309.81674540713 608.553103461821 21766.2142174024 3304.36323136722 30763.3380980318 807.69449195738 + 8700 621.808906194853 -109.482818591439 38.7967203497714 19336.1794795739 -1913.95923494622 2621.27798695721 16540.538222086 450.038978402435 24727.2772023994 807.69449195738 + 8800 677.398909137017 -123.920718154782 37.615079942391 9926.90103536176 -2340.09423486233 4440.84057412789 4604.10149110703 -3104.86951635527 11754.5762354151 807.69449195738 + 8900 697.869220836965 -130.064205281399 36.3530416831205 -3293.39113093656 -2369.73035481639 5401.47562006387 -12130.7816148135 -5828.45714934041 -3882.49878078307 807.69449195738 + 9000 670.274583117424 -124.741887685314 35.0950094039639 -15170.8777429249 -2000.86280607589 4778.13159963793 -29155.0312383242 -6509.01123001734 -15590.9482694133 807.69449195738 + 9100 641.301973334005 -119.032968342093 33.8949810338134 -20643.0933737709 -1092.9228742168 2543.54045158536 -39631.190883313 -4801.19935133638 -17436.4291196624 807.69449195738 + 9200 648.551250125388 -121.938753519606 32.7178932254998 -17545.6834346465 407.277892828059 -324.084321424331 -38250.7496938311 -1503.37584356599 -8252.15916435299 807.69449195738 + 9300 669.898881153316 -128.241562833627 31.5057425604181 -7635.40769078997 1936.39572868305 -2589.11663246974 -25458.2196897865 1854.73457994502 7319.64594485082 807.69449195738 + 9400 660.005403375942 -127.115040539148 30.2730186158369 4737.67619171306 2442.86741652824 -3808.33861835158 -7418.82912362333 3880.69051570432 22202.9853499624 807.69449195738 + 9500 620.752432353387 -118.9363392205 29.0912678931734 14702.2766517624 1318.66767168445 -4488.42372304215 8314.94536627479 3977.61738802613 31332.1295122829 807.69449195738 + 9600 605.158022875995 -116.338080557795 27.9708087563563 18148.0700886093 -923.022239356076 -5244.41638702088 16984.314295711 2438.00791808299 33155.8605355592 807.69449195738 + 9700 647.066305676779 -127.473762515629 26.8287772425882 12457.026794319 -3083.77567308496 -5971.37345995289 17293.513879008 174.696501657853 28149.5977998226 807.69449195738 + 9800 712.535977619091 -144.338350947637 25.5764012982478 -2278.66973443734 -4285.86194983082 -5947.66651305406 9955.33079244875 -1657.88451703234 17466.3140499512 807.69449195738 + 9900 739.922195647871 -152.221766426822 24.2236349335976 -21896.3186581002 -4397.60180837024 -4656.92695333642 -2780.83044269569 -2187.88445840626 3508.02364787037 807.69449195738 + 10000 714.670095831422 -147.564508935991 22.8591553911101 -38679.3761374111 -3643.62334230431 -2380.63035178382 -16496.9115982111 -1365.61394601647 -9310.84391174422 807.69449195738 +Loop time of 5.99865 on 1 procs for 10000 steps with 81 atoms + +Performance: 1.440 ns/day, 16.663 hours/ns, 1667.041 timesteps/s, 135.030 katom-step/s +100.1% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 4.7701 | 4.7701 | 4.7701 | 0.0 | 79.52 +Bond | 0.024226 | 0.024226 | 0.024226 | 0.0 | 0.40 +Kspace | 0.91657 | 0.91657 | 0.91657 | 0.0 | 15.28 +Neigh | 0.004786 | 0.004786 | 0.004786 | 0.0 | 0.08 +Comm | 0.19943 | 0.19943 | 0.19943 | 0.0 | 3.32 +Output | 0.046888 | 0.046888 | 0.046888 | 0.0 | 0.78 +Modify | 0.021633 | 0.021633 | 0.021633 | 0.0 | 0.36 +Other | | 0.015 | | | 0.25 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 3299 ave 3299 max 3299 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 29158 ave 29158 max 29158 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 29158 +Ave neighs/atom = 359.97531 +Ave special neighs/atom = 2 +Neighbor list builds = 6 +Dangerous builds = 0 +Total wall time: 0:00:06 diff --git a/tests/data/lammps/test_init_velocity/gaussian/log.lammps b/tests/data/lammps/test_init_velocity/gaussian/log.lammps new file mode 100644 index 00000000..47c2c982 --- /dev/null +++ b/tests/data/lammps/test_init_velocity/gaussian/log.lammps @@ -0,0 +1,228 @@ +LAMMPS (21 Nov 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +units real +dimension 3 +boundary p p p +atom_style full +read_data structure.inp +Reading data file ... + orthogonal box = (0 0 0) to (9.312845 9.312845 9.312845) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + scanning bonds ... + 2 = max bonds/atom + scanning angles ... + 1 = max angles/atom + reading bonds ... + 54 bonds + reading angles ... + 27 angles +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.000 seconds + read_data CPU = 0.005 seconds +include potential.inp +# @potential_species H_O ### species in potentia +# W.L. Jorgensen et.al., The Journal of Chemical Physics 79, 926 (1983); https://doi.org/10.1063/1.44586 + + + +# create groups ## +group O type 2 +27 atoms in group O +group H type 1 +54 atoms in group H + +## set charges - beside manually ## +set group O charge -0.830 +Setting atom values ... + 27 settings made for charge +set group H charge 0.415 +Setting atom values ... + 54 settings made for charge + +### TIP3P Potential Parameters ## +pair_style lj/cut/coul/long 10.0 +pair_coeff * * 0.0 0.0 +pair_coeff 2 2 0.102 3.188 +bond_style harmonic +bond_coeff 1 450 0.9572 +angle_style harmonic +angle_coeff 1 55 104.52 +kspace_style pppm 1.0e-5 + +fix ensemble all nvt temp 300.0 300.0 100.0 +variable dumptime equal 100 +variable thermotime equal 100 +timestep 0.01 +velocity all create 8.00 87287 mom yes rot yes dist gaussian +dump 1 all custom ${dumptime} dump.out id type xsu ysu zsu fx fy fz vx vy vz +dump 1 all custom 100 dump.out id type xsu ysu zsu fx fy fz vx vy vz +dump_modify 1 sort id format line "%d %d %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g" +thermo_style custom step temp pe etotal pxx pxy pxz pyy pyz pzz vol +thermo_modify format float %20.15g +thermo ${thermotime} +thermo 100 +run 10000 +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.31267543 + grid = 9 9 9 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0018389131 + estimated relative force accuracy = 5.5378322e-06 + using double precision FFTW3 + 3d grid and FFT values/proc = 4096 729 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 2 2 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 7.29 | 7.29 | 7.29 Mbytes + Step Temp PotEng TotEng Pxx Pxy Pxz Pyy Pyz Pzz Volume + 0 600 -9.95297403140808 133.125908368592 20165.6570625658 354.890948312657 289.557331240064 -144856.180216441 -1234.54262542923 25299.4082350641 807.69449195738 + 100 549.424475004357 2.09539886203993 133.113798606757 10417.9687311007 -8245.59337864054 -0.641007306396413 -148264.452446805 -856.562951138488 25211.8571798006 807.69449195738 + 200 558.966220490545 -0.221671700051729 133.072098511847 21859.6586284075 -12856.1769747728 -258.5503663201 -117734.814984681 -229.577898977633 24656.9359444122 807.69449195738 + 300 636.59362085172 -18.7991895453406 133.005983478715 50947.3019575378 -11098.7413975581 -108.65867201564 -65311.011568295 213.445859381379 24081.0475537943 807.69449195738 + 400 702.427594183817 -34.6078708507443 132.896387720491 83743.8426080122 -4574.59282114155 604.223765152657 -12884.7112825304 143.531581751225 24023.7272817512 807.69449195738 + 500 690.835913461244 -32.0028213925057 132.737229307191 102766.667505357 3127.91221433384 1672.36658525722 21079.2854589999 -502.798414405993 24676.739146653 807.69449195738 + 600 633.709277238861 -18.5673955173975 132.549963072349 96513.9830308545 9256.23395458673 2569.50644728368 30772.3672445559 -1483.78746202764 25704.2843450587 807.69449195738 + 700 611.311314156295 -13.4353498049027 132.340882908361 64364.7142080545 12488.3886768091 2643.49416786443 21646.8225017792 -2280.64635984826 26369.5617716242 807.69449195738 + 800 642.063473730102 -21.0116852452807 132.097855173327 15477.6875913388 11766.3727107676 1428.59732001239 2869.16552555661 -2295.97788818753 25841.4670104362 807.69449195738 + 900 666.173126838146 -27.0507355743052 131.80810854722 -34406.3086933884 6196.59000988096 -992.051045515432 -17839.5375064128 -1267.40903397791 23620.7453443176 807.69449195738 + 1000 642.852386343694 -21.8190444260647 131.478623884317 -66589.9250521509 -3255.10648269727 -3813.54072383737 -34346.122093855 423.095551217745 20147.8040674292 807.69449195738 + 1100 618.050590969481 -16.2525093224754 131.130803715146 -66166.5780815557 -12794.0446028342 -5798.75171412935 -41220.7540101255 1921.24332300042 17113.9647488387 807.69449195738 + 1200 662.008442364135 -27.1175956264522 130.748117828257 -31379.5578366597 -17806.3752214524 -5971.1770976048 -35537.0688436992 2451.80695498787 16700.4338606829 807.69449195738 + 1300 765.032428857505 -52.1557662936091 130.27754190754 22477.7633168915 -16282.9313193746 -4212.41555691826 -20018.316571434 1672.10652214791 19945.764677908 807.69449195738 + 1400 841.419750038618 -70.9700275968794 129.678968177809 71145.8485118461 -10044.3832683949 -1271.90886867315 -3376.42298445358 -428.339411005042 25630.0978826252 807.69449195738 + 1500 837.912940951369 -70.8270469213553 128.985698311676 96060.9946303843 -2654.44927523298 1708.6059678105 3888.49397659331 -3652.25510053612 30849.3968043667 807.69449195738 + 1600 798.233121032663 -62.1009694181225 128.24953533524 92881.6389097194 3313.03997193766 3692.01912763655 -4642.94428843754 -7246.32005156667 32756.2322373313 807.69449195738 + 1700 798.124394765975 -62.8504492350614 127.474128130425 68537.6996442604 6934.64979925849 4022.63025136177 -28034.1585742593 -9576.17325349982 29893.0427159383 807.69449195738 + 1800 844.160107506743 -74.6918695648794 126.610605016335 33534.2971647343 7952.98495326469 2673.71689263551 -58649.7153326471 -8799.00456953756 22352.1563764909 807.69449195738 + 1900 876.711856671294 -83.4368497281453 125.628071337451 -1880.01435312597 6346.83199165818 482.262955942094 -85008.5547396707 -4416.52091980284 11748.4524683879 807.69449195738 + 2000 866.902383125492 -82.1647504434925 124.560956435661 -27633.4746597711 2960.83303768928 -1078.82158402717 -95555.1014375772 1840.90968169567 1620.58093383669 807.69449195738 + 2100 863.757591145525 -82.5381026004231 123.437682075606 -35401.0730786223 -339.70719158148 -775.153905548272 -83438.8445391716 7018.55322378328 -3211.1368546681 807.69449195738 + 2200 922.042508850789 -97.6658570901118 122.20882906266 -23399.044886854 -1854.87215435732 1471.95262843092 -50805.5155077011 9062.70612104965 500.254374014074 807.69449195738 + 2300 1013.50795387003 -120.896236288138 120.789739283919 675.114863778618 -1436.75670890858 4426.46124197053 -8953.89792589724 7991.30115313481 11299.3895738465 807.69449195738 + 2400 1050.29471341616 -131.288338383377 119.169984593644 23262.5085667981 -533.892499651063 6255.63933093302 27164.8464061343 5205.21044902687 23164.9397014355 807.69449195738 + 2500 994.96247053786 -119.791546012919 117.471984511247 33086.6892776804 -891.833980304868 5609.22923036495 46514.1786110448 2096.43822469286 29478.8715840268 807.69449195738 + 2600 909.14931006487 -100.971137759652 115.828974271703 26988.2024908358 -3194.47628586829 2460.50699493354 45809.689720942 -522.242513539705 27091.1199201804 807.69449195738 + 2700 873.336171305155 -94.0143203357761 114.245618580618 9547.01130733323 -6601.00394905176 -1830.28604981318 27991.0763777706 -2122.68440033087 16968.1510592554 807.69449195738 + 2800 886.971564328324 -98.8773474780137 112.634152763113 -11130.1024615092 -9254.37214269831 -5364.38173445364 -957.921800273292 -2336.65066833551 2388.0645152333 807.69449195738 + 2900 884.569484200259 -99.9707656436433 110.967923030553 -27089.7780750018 -9356.8982565523 -6780.57600718068 -32803.6857050629 -1355.01071712088 -12147.0482578912 807.69449195738 + 3000 839.913718825206 -90.9682435902666 109.321616746297 -32454.1207805645 -6344.40212635755 -5697.71273928087 -56626.9056121771 -90.1029541214089 -20997.8358157315 807.69449195738 + 3100 807.334467552589 -84.7756783406837 107.745177226689 -24923.1931224192 -1477.57619783194 -2489.44476862579 -61590.3147008916 458.822164814247 -19024.7880789863 807.69449195738 + 3200 839.930784841749 -94.1299207412069 106.164009239647 -7231.61436690889 2821.92796051567 2017.3570824056 -43613.2987763451 14.3824207328152 -5199.66346951412 807.69449195738 + 3300 901.335245498503 -110.460128130558 104.476604525534 13144.3332900884 4629.17269009913 6698.49366874871 -9917.00679483691 -936.802493126593 15400.1750926676 807.69449195738 + 3400 901.793524655352 -112.330976186067 102.71503991934 27229.6199833518 3910.21615248228 10400.6771208402 24402.4059216976 -1819.46314961378 34250.1185311269 807.69449195738 + 3500 815.493379375424 -93.4248474952149 101.041621380843 29083.691340998 2450.40918536051 12365.293301818 45723.4026951678 -2410.01574628624 44511.9442998141 807.69449195738 + 3600 717.693090903879 -71.5645037282759 99.5800385262717 18183.7592255055 2368.86774235798 12419.7090403585 48841.0982899841 -2629.48707886775 43885.4440119067 807.69449195738 + 3700 689.835862878935 -66.2263614575631 98.275212376033 -1672.673090553 4522.20419325959 10730.9290445951 36575.9888033273 -2246.69825192096 33723.7340011661 807.69449195738 + 3800 722.580027067057 -75.3215087961214 96.9883957327391 -24626.3224726006 8012.70085707958 7563.60889072937 15379.8098419377 -1088.31181685109 17228.8722479177 807.69449195738 + 3900 744.705918930297 -81.9103450356799 95.6758059596733 -43863.5450012529 10863.1258472953 3440.59285104059 -7276.55573097216 615.437739022703 -836.596161932647 807.69449195738 + 4000 729.007202434246 -79.45300125985 94.3895583832208 -52445.6460941582 11140.0204545999 -607.63631651437 -23144.2051924238 2326.1801263131 -14193.871422439 807.69449195738 + 4100 725.187771039129 -79.7720224880668 93.1597371959759 -45908.79822611 7981.19035797013 -3314.34315322823 -24783.8677691153 3633.07086862093 -17248.944429612 807.69449195738 + 4200 778.68873064081 -93.7693498286962 91.9205057005732 -25750.8035082646 2167.17615996965 -3952.79782922692 -9900.25275241401 4455.28804393082 -8733.52520264573 807.69449195738 + 4300 853.54599636964 -112.946895706172 90.5937830230984 26.3525310997114 -4125.05982439448 -2879.00515267324 15519.5027443966 4769.32283169458 6788.41222305862 807.69449195738 + 4400 869.599365748863 -118.170723415908 89.1981188959183 21219.0586663245 -8412.63073868276 -1209.19915210363 39673.7856125431 4290.55543292237 21545.1560942985 807.69449195738 + 4500 805.523797599058 -104.228930938378 87.8601435734176 31290.2544502563 -9195.76166976858 78.1644597409674 51827.5471345222 2599.69275393081 29224.0320568666 807.69449195738 + 4600 727.774444048004 -86.886928792761 86.6616613633552 29677.0284686462 -6632.24633003324 747.418216472531 47662.384282908 -334.718243567571 27753.0829490286 807.69449195738 + 4700 706.413498033617 -82.8867377336089 85.5680186179319 19658.6700081631 -2332.77284658848 1156.59432388502 29343.7386872311 -3847.5478837743 18827.6896023319 807.69449195738 + 4800 732.171461793534 -90.1076106955356 84.4895134354529 5469.23875023193 1453.97978676326 1753.46986907182 2736.85860480236 -6844.2435008205 5926.34624334733 807.69449195738 + 4900 744.010610792095 -94.0277682843698 83.3925761920875 -8428.92843195287 2963.1612582777 2769.04390466551 -24078.6611318482 -8405.12173726383 -6895.89786321597 807.69449195738 + 5000 721.880722266159 -89.8228916843955 82.3202532621825 -17149.1032288613 1829.00589405725 4094.52308724686 -41351.2091352699 -8161.31716609191 -15290.9243862931 807.69449195738 + 5100 711.8212001968 -88.4551837371623 81.2891192508123 -16872.3949063516 -857.718399803414 5198.73344706078 -40843.5450805845 -6251.21418482546 -15572.6425910545 807.69449195738 + 5200 750.349233276765 -98.683522979534 80.2483598653601 -7565.8091011188 -3400.13189766955 5309.99720609671 -21412.2484943467 -3139.66947329429 -6797.60248166234 807.69449195738 + 5300 799.280109564023 -111.460050140404 79.1401245278794 6188.54696654024 -4468.68894772586 3961.67237173752 8445.66233333135 502.089059712546 7826.04175846589 807.69449195738 + 5400 788.759072207702 -110.095732163053 77.9955453941785 17854.9813513945 -3564.37844746323 1457.38720162139 35165.5775379486 3954.77707291656 22233.2431715385 807.69449195738 + 5500 713.578852534085 -93.2480446876343 76.9153965204511 22816.8896389448 -1036.90077829898 -1213.68616955452 48396.3518957972 6670.39481980879 30806.4117067305 807.69449195738 + 5600 649.070963598512 -78.8332543829672 75.947325733643 20127.815417323 2094.85406983802 -2921.56847239856 45599.9013870323 8252.4152384986 30796.4786779983 807.69449195738 + 5700 660.210023712646 -82.4095596553336 75.0272942481378 11596.6669006659 4549.96035117116 -2968.6749800027 30226.5818988833 8185.34780818143 22326.8516533217 807.69449195738 + 5800 723.839436194642 -98.5598152929845 74.0504139866413 283.071992091383 5428.38027806148 -1421.54039076554 7732.18434220361 5851.9732135927 7444.17379420226 807.69449195738 + 5900 766.502178408386 -109.798935918736 72.9848558209927 -10081.2880443878 4649.42022596065 779.987786682946 -15677.6032391042 1244.07698283853 -9839.71290064648 807.69449195738 + 6000 762.666937332036 -109.986428063159 71.8827936650055 -15529.0677504544 2834.89526368938 2071.50180942626 -32465.6197981005 -4245.34511520088 -23390.0029406579 807.69449195738 + 6100 758.589647933645 -110.113733485269 70.7831982256561 -13387.8523062955 810.667109735556 1029.11743843541 -35554.169063136 -8116.5936987103 -27081.4546058721 807.69449195738 + 6200 794.180340982533 -119.737037224108 69.6470221289455 -4107.9682686488 -818.601763961975 -2636.19047000581 -23054.466132965 -8367.16086748783 -18835.7764612207 807.69449195738 + 6300 837.310687486501 -131.245580911634 68.4235480669396 8616.03180754489 -1773.69746045773 -7610.05856648747 -1042.80923482986 -5013.06005523785 -2796.44327345114 807.69449195738 + 6400 825.155842632356 -129.626364250982 67.1442620317981 19936.551932651 -1997.92258727665 -11560.1042556231 19733.0821100142 -43.5630828529573 13136.0994865698 807.69449195738 + 6500 755.567157921625 -114.265546476258 65.9106277463593 26233.2542239326 -1567.4980873389 -12471.3176949021 30704.417043487 4045.46360503056 22355.7690813511 807.69449195738 + 6600 699.828870647813 -102.113040947573 64.7715135249992 26011.1488158555 -694.099771745189 -9789.04601168312 29447.578781687 5699.06923766744 22515.0763306323 807.69449195738 + 6700 715.526914127146 -106.971257311487 63.6567280225681 19604.6727073358 208.245057309559 -4562.64692819498 18138.0860877375 4718.08797313052 14552.5216977707 807.69449195738 + 6800 775.615856315579 -122.495837933028 62.4612452225586 9043.55603968005 556.132111028385 1342.23989501651 334.32255628017 1896.35169797745 600.207255748325 807.69449195738 + 6900 807.736486416616 -131.450714180481 61.1660087365064 -1973.16842451348 -54.0894043626737 6120.45455849071 -19624.0554446195 -1484.69465322806 -15951.0144145948 807.69449195738 + 7000 787.975665991316 -128.063558332453 59.8409044149358 -9058.89152697209 -1354.35629888727 8413.72640343375 -35594.356142703 -4104.42424530698 -29230.4617908466 807.69449195738 + 7100 762.514730224787 -123.293842103028 58.5390835871386 -9170.82631752316 -2378.42087301241 7526.95431110271 -40981.7602431774 -5025.11331987672 -32395.3922708718 807.69449195738 + 7200 773.214154394621 -127.148991114166 57.2353706635726 -2205.62984979319 -2235.49649238778 3847.07038137678 -33043.5679494566 -3942.76273007994 -22369.1997453771 807.69449195738 + 7300 794.461474527736 -133.574451577353 55.8766482314542 9107.44089952257 -978.139789039356 -996.347860358423 -15795.3744089339 -1187.34081146432 -3142.32752105399 807.69449195738 + 7400 769.6940061952 -129.048828753337 54.496101573976 20774.2232719109 421.994027875439 -4914.51455005615 2263.45975800271 2371.29732943928 16485.2790719545 807.69449195738 + 7500 695.991571156081 -112.776524648438 53.1929689529484 29164.4422892762 1013.90848054582 -6652.42426363227 13729.106629608 5493.75065492286 28710.0028889388 807.69449195738 + 7600 637.245408738691 -99.9488159713542 52.0117855234176 31794.0837991262 673.472447275985 -6322.20165094015 15849.7251652775 6928.53964147847 30413.3440594108 807.69449195738 + 7700 644.606422393029 -102.836745900786 50.8791982723091 27527.8865046363 -40.5726237603459 -4728.09946223989 9729.99656960309 5938.13683671454 22383.7309705785 807.69449195738 + 7800 691.870209244357 -115.299964276375 49.6867295645193 16937.1007790126 -688.775805615749 -2549.111569721 -2007.29779401824 2676.21446286065 7245.69069279605 807.69449195738 + 7900 713.210024837858 -121.65646176024 48.4190270235551 2860.53154375996 -1386.97060848189 -364.233267912295 -15809.8262726633 -1742.70490439749 -10623.0591446457 807.69449195738 + 8000 689.346775901244 -117.23308991868 47.1518538846422 -9841.86173520548 -2377.5021233421 1010.39754001031 -26667.3761251549 -5527.8626882883 -24608.9052997435 807.69449195738 + 8100 664.283714682476 -112.479620301075 45.9286655210737 -16203.0132940287 -3378.17513741475 898.577120937872 -29337.2551313746 -6939.61739680164 -28119.1468623522 807.69449195738 + 8200 674.907150449886 -116.224040427363 44.7175609228681 -13874.3322908691 -3675.9289187546 -449.198114925217 -21642.9204533745 -5287.00852079334 -18992.1721396049 807.69449195738 + 8300 696.221856272698 -122.558368654279 43.4660398423062 -4487.57729489602 -2957.12733464037 -1840.09942612565 -6669.59387102806 -1520.07356852058 -1554.17161669823 807.69449195738 + 8400 679.107632846304 -119.743126160806 42.2001424007921 7543.09880979063 -1794.95829147575 -2146.02995724669 8956.2072155583 2260.23394928089 16276.8251468725 807.69449195738 + 8500 625.581799580143 -108.176074512087 41.0031667107587 17493.4550941942 -1125.77669195788 -1159.78386484242 19288.381386591 4108.13384425536 27971.4593358697 807.69449195738 + 8600 593.570116794496 -101.650435005655 39.8951465560015 21977.6809752879 -1309.81674540713 608.553103461821 21766.2142174024 3304.36323136722 30763.3380980318 807.69449195738 + 8700 621.808906194853 -109.482818591439 38.7967203497714 19336.1794795739 -1913.95923494622 2621.27798695721 16540.538222086 450.038978402435 24727.2772023994 807.69449195738 + 8800 677.398909137017 -123.920718154782 37.615079942391 9926.90103536176 -2340.09423486233 4440.84057412789 4604.10149110703 -3104.86951635527 11754.5762354151 807.69449195738 + 8900 697.869220836965 -130.064205281399 36.3530416831205 -3293.39113093656 -2369.73035481639 5401.47562006387 -12130.7816148135 -5828.45714934041 -3882.49878078307 807.69449195738 + 9000 670.274583117424 -124.741887685314 35.0950094039639 -15170.8777429249 -2000.86280607589 4778.13159963793 -29155.0312383242 -6509.01123001734 -15590.9482694133 807.69449195738 + 9100 641.301973334005 -119.032968342093 33.8949810338134 -20643.0933737709 -1092.9228742168 2543.54045158536 -39631.190883313 -4801.19935133638 -17436.4291196624 807.69449195738 + 9200 648.551250125388 -121.938753519606 32.7178932254998 -17545.6834346465 407.277892828059 -324.084321424331 -38250.7496938311 -1503.37584356599 -8252.15916435299 807.69449195738 + 9300 669.898881153316 -128.241562833627 31.5057425604181 -7635.40769078997 1936.39572868305 -2589.11663246974 -25458.2196897865 1854.73457994502 7319.64594485082 807.69449195738 + 9400 660.005403375942 -127.115040539148 30.2730186158369 4737.67619171306 2442.86741652824 -3808.33861835158 -7418.82912362333 3880.69051570432 22202.9853499624 807.69449195738 + 9500 620.752432353387 -118.9363392205 29.0912678931734 14702.2766517624 1318.66767168445 -4488.42372304215 8314.94536627479 3977.61738802613 31332.1295122829 807.69449195738 + 9600 605.158022875995 -116.338080557795 27.9708087563563 18148.0700886093 -923.022239356076 -5244.41638702088 16984.314295711 2438.00791808299 33155.8605355592 807.69449195738 + 9700 647.066305676779 -127.473762515629 26.8287772425882 12457.026794319 -3083.77567308496 -5971.37345995289 17293.513879008 174.696501657853 28149.5977998226 807.69449195738 + 9800 712.535977619091 -144.338350947637 25.5764012982478 -2278.66973443734 -4285.86194983082 -5947.66651305406 9955.33079244875 -1657.88451703234 17466.3140499512 807.69449195738 + 9900 739.922195647871 -152.221766426822 24.2236349335976 -21896.3186581002 -4397.60180837024 -4656.92695333642 -2780.83044269569 -2187.88445840626 3508.02364787037 807.69449195738 + 10000 714.670095831422 -147.564508935991 22.8591553911101 -38679.3761374111 -3643.62334230431 -2380.63035178382 -16496.9115982111 -1365.61394601647 -9310.84391174422 807.69449195738 +Loop time of 5.99865 on 1 procs for 10000 steps with 81 atoms + +Performance: 1.440 ns/day, 16.663 hours/ns, 1667.041 timesteps/s, 135.030 katom-step/s +100.1% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 4.7701 | 4.7701 | 4.7701 | 0.0 | 79.52 +Bond | 0.024226 | 0.024226 | 0.024226 | 0.0 | 0.40 +Kspace | 0.91657 | 0.91657 | 0.91657 | 0.0 | 15.28 +Neigh | 0.004786 | 0.004786 | 0.004786 | 0.0 | 0.08 +Comm | 0.19943 | 0.19943 | 0.19943 | 0.0 | 3.32 +Output | 0.046888 | 0.046888 | 0.046888 | 0.0 | 0.78 +Modify | 0.021633 | 0.021633 | 0.021633 | 0.0 | 0.36 +Other | | 0.015 | | | 0.25 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 3299 ave 3299 max 3299 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 29158 ave 29158 max 29158 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 29158 +Ave neighs/atom = 359.97531 +Ave special neighs/atom = 2 +Neighbor list builds = 6 +Dangerous builds = 0 +Total wall time: 0:00:06 diff --git a/tests/data/lammps/test_init_velocity/uniform/log.lammps b/tests/data/lammps/test_init_velocity/uniform/log.lammps new file mode 100644 index 00000000..e5dab757 --- /dev/null +++ b/tests/data/lammps/test_init_velocity/uniform/log.lammps @@ -0,0 +1,228 @@ +LAMMPS (21 Nov 2023) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +units real +dimension 3 +boundary p p p +atom_style full +read_data structure.inp +Reading data file ... + orthogonal box = (0 0 0) to (9.312845 9.312845 9.312845) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + scanning bonds ... + 2 = max bonds/atom + scanning angles ... + 1 = max angles/atom + reading bonds ... + 54 bonds + reading angles ... + 27 angles +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.000 seconds + read_data CPU = 0.005 seconds +include potential.inp +# @potential_species H_O ### species in potentia +# W.L. Jorgensen et.al., The Journal of Chemical Physics 79, 926 (1983); https://doi.org/10.1063/1.44586 + + + +# create groups ## +group O type 2 +27 atoms in group O +group H type 1 +54 atoms in group H + +## set charges - beside manually ## +set group O charge -0.830 +Setting atom values ... + 27 settings made for charge +set group H charge 0.415 +Setting atom values ... + 54 settings made for charge + +### TIP3P Potential Parameters ## +pair_style lj/cut/coul/long 10.0 +pair_coeff * * 0.0 0.0 +pair_coeff 2 2 0.102 3.188 +bond_style harmonic +bond_coeff 1 450 0.9572 +angle_style harmonic +angle_coeff 1 55 104.52 +kspace_style pppm 1.0e-5 + +fix ensemble all nvt temp 300.0 300.0 100.0 +variable dumptime equal 100 +variable thermotime equal 100 +timestep 0.01 +velocity all create 600.0 30320 dist uniform -1.0 1.0 +dump 1 all custom ${dumptime} dump.out id type xsu ysu zsu fx fy fz vx vy vz +dump 1 all custom 100 dump.out id type xsu ysu zsu fx fy fz vx vy vz +dump_modify 1 sort id format line "%d %d %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g" +thermo_style custom step temp pe etotal pxx pxy pxz pyy pyz pzz vol +thermo_modify format float %20.15g +thermo ${thermotime} +thermo 100 +run 10000 +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 0.31267543 + grid = 9 9 9 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0018389131 + estimated relative force accuracy = 5.5378322e-06 + using double precision FFTW3 + 3d grid and FFT values/proc = 4096 729 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 2 2 2 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 7.29 | 7.29 | 7.29 Mbytes + Step Temp PotEng TotEng Pxx Pxy Pxz Pyy Pyz Pzz Volume + 0 600 -9.95297403140808 133.125908368592 20165.6570625658 354.890948312657 289.557331240064 -144856.180216441 -1234.54262542923 25299.4082350641 807.69449195738 + 100 549.424475004357 2.09539886203993 133.113798606757 10417.9687311007 -8245.59337864054 -0.641007306396413 -148264.452446805 -856.562951138488 25211.8571798006 807.69449195738 + 200 558.966220490545 -0.221671700051729 133.072098511847 21859.6586284075 -12856.1769747728 -258.5503663201 -117734.814984681 -229.577898977633 24656.9359444122 807.69449195738 + 300 636.59362085172 -18.7991895453406 133.005983478715 50947.3019575378 -11098.7413975581 -108.65867201564 -65311.011568295 213.445859381379 24081.0475537943 807.69449195738 + 400 702.427594183817 -34.6078708507443 132.896387720491 83743.8426080122 -4574.59282114155 604.223765152657 -12884.7112825304 143.531581751225 24023.7272817512 807.69449195738 + 500 690.835913461244 -32.0028213925057 132.737229307191 102766.667505357 3127.91221433384 1672.36658525722 21079.2854589999 -502.798414405993 24676.739146653 807.69449195738 + 600 633.709277238861 -18.5673955173975 132.549963072349 96513.9830308545 9256.23395458673 2569.50644728368 30772.3672445559 -1483.78746202764 25704.2843450587 807.69449195738 + 700 611.311314156295 -13.4353498049027 132.340882908361 64364.7142080545 12488.3886768091 2643.49416786443 21646.8225017792 -2280.64635984826 26369.5617716242 807.69449195738 + 800 642.063473730102 -21.0116852452807 132.097855173327 15477.6875913388 11766.3727107676 1428.59732001239 2869.16552555661 -2295.97788818753 25841.4670104362 807.69449195738 + 900 666.173126838146 -27.0507355743052 131.80810854722 -34406.3086933884 6196.59000988096 -992.051045515432 -17839.5375064128 -1267.40903397791 23620.7453443176 807.69449195738 + 1000 642.852386343694 -21.8190444260647 131.478623884317 -66589.9250521509 -3255.10648269727 -3813.54072383737 -34346.122093855 423.095551217745 20147.8040674292 807.69449195738 + 1100 618.050590969481 -16.2525093224754 131.130803715146 -66166.5780815557 -12794.0446028342 -5798.75171412935 -41220.7540101255 1921.24332300042 17113.9647488387 807.69449195738 + 1200 662.008442364135 -27.1175956264522 130.748117828257 -31379.5578366597 -17806.3752214524 -5971.1770976048 -35537.0688436992 2451.80695498787 16700.4338606829 807.69449195738 + 1300 765.032428857505 -52.1557662936091 130.27754190754 22477.7633168915 -16282.9313193746 -4212.41555691826 -20018.316571434 1672.10652214791 19945.764677908 807.69449195738 + 1400 841.419750038618 -70.9700275968794 129.678968177809 71145.8485118461 -10044.3832683949 -1271.90886867315 -3376.42298445358 -428.339411005042 25630.0978826252 807.69449195738 + 1500 837.912940951369 -70.8270469213553 128.985698311676 96060.9946303843 -2654.44927523298 1708.6059678105 3888.49397659331 -3652.25510053612 30849.3968043667 807.69449195738 + 1600 798.233121032663 -62.1009694181225 128.24953533524 92881.6389097194 3313.03997193766 3692.01912763655 -4642.94428843754 -7246.32005156667 32756.2322373313 807.69449195738 + 1700 798.124394765975 -62.8504492350614 127.474128130425 68537.6996442604 6934.64979925849 4022.63025136177 -28034.1585742593 -9576.17325349982 29893.0427159383 807.69449195738 + 1800 844.160107506743 -74.6918695648794 126.610605016335 33534.2971647343 7952.98495326469 2673.71689263551 -58649.7153326471 -8799.00456953756 22352.1563764909 807.69449195738 + 1900 876.711856671294 -83.4368497281453 125.628071337451 -1880.01435312597 6346.83199165818 482.262955942094 -85008.5547396707 -4416.52091980284 11748.4524683879 807.69449195738 + 2000 866.902383125492 -82.1647504434925 124.560956435661 -27633.4746597711 2960.83303768928 -1078.82158402717 -95555.1014375772 1840.90968169567 1620.58093383669 807.69449195738 + 2100 863.757591145525 -82.5381026004231 123.437682075606 -35401.0730786223 -339.70719158148 -775.153905548272 -83438.8445391716 7018.55322378328 -3211.1368546681 807.69449195738 + 2200 922.042508850789 -97.6658570901118 122.20882906266 -23399.044886854 -1854.87215435732 1471.95262843092 -50805.5155077011 9062.70612104965 500.254374014074 807.69449195738 + 2300 1013.50795387003 -120.896236288138 120.789739283919 675.114863778618 -1436.75670890858 4426.46124197053 -8953.89792589724 7991.30115313481 11299.3895738465 807.69449195738 + 2400 1050.29471341616 -131.288338383377 119.169984593644 23262.5085667981 -533.892499651063 6255.63933093302 27164.8464061343 5205.21044902687 23164.9397014355 807.69449195738 + 2500 994.96247053786 -119.791546012919 117.471984511247 33086.6892776804 -891.833980304868 5609.22923036495 46514.1786110448 2096.43822469286 29478.8715840268 807.69449195738 + 2600 909.14931006487 -100.971137759652 115.828974271703 26988.2024908358 -3194.47628586829 2460.50699493354 45809.689720942 -522.242513539705 27091.1199201804 807.69449195738 + 2700 873.336171305155 -94.0143203357761 114.245618580618 9547.01130733323 -6601.00394905176 -1830.28604981318 27991.0763777706 -2122.68440033087 16968.1510592554 807.69449195738 + 2800 886.971564328324 -98.8773474780137 112.634152763113 -11130.1024615092 -9254.37214269831 -5364.38173445364 -957.921800273292 -2336.65066833551 2388.0645152333 807.69449195738 + 2900 884.569484200259 -99.9707656436433 110.967923030553 -27089.7780750018 -9356.8982565523 -6780.57600718068 -32803.6857050629 -1355.01071712088 -12147.0482578912 807.69449195738 + 3000 839.913718825206 -90.9682435902666 109.321616746297 -32454.1207805645 -6344.40212635755 -5697.71273928087 -56626.9056121771 -90.1029541214089 -20997.8358157315 807.69449195738 + 3100 807.334467552589 -84.7756783406837 107.745177226689 -24923.1931224192 -1477.57619783194 -2489.44476862579 -61590.3147008916 458.822164814247 -19024.7880789863 807.69449195738 + 3200 839.930784841749 -94.1299207412069 106.164009239647 -7231.61436690889 2821.92796051567 2017.3570824056 -43613.2987763451 14.3824207328152 -5199.66346951412 807.69449195738 + 3300 901.335245498503 -110.460128130558 104.476604525534 13144.3332900884 4629.17269009913 6698.49366874871 -9917.00679483691 -936.802493126593 15400.1750926676 807.69449195738 + 3400 901.793524655352 -112.330976186067 102.71503991934 27229.6199833518 3910.21615248228 10400.6771208402 24402.4059216976 -1819.46314961378 34250.1185311269 807.69449195738 + 3500 815.493379375424 -93.4248474952149 101.041621380843 29083.691340998 2450.40918536051 12365.293301818 45723.4026951678 -2410.01574628624 44511.9442998141 807.69449195738 + 3600 717.693090903879 -71.5645037282759 99.5800385262717 18183.7592255055 2368.86774235798 12419.7090403585 48841.0982899841 -2629.48707886775 43885.4440119067 807.69449195738 + 3700 689.835862878935 -66.2263614575631 98.275212376033 -1672.673090553 4522.20419325959 10730.9290445951 36575.9888033273 -2246.69825192096 33723.7340011661 807.69449195738 + 3800 722.580027067057 -75.3215087961214 96.9883957327391 -24626.3224726006 8012.70085707958 7563.60889072937 15379.8098419377 -1088.31181685109 17228.8722479177 807.69449195738 + 3900 744.705918930297 -81.9103450356799 95.6758059596733 -43863.5450012529 10863.1258472953 3440.59285104059 -7276.55573097216 615.437739022703 -836.596161932647 807.69449195738 + 4000 729.007202434246 -79.45300125985 94.3895583832208 -52445.6460941582 11140.0204545999 -607.63631651437 -23144.2051924238 2326.1801263131 -14193.871422439 807.69449195738 + 4100 725.187771039129 -79.7720224880668 93.1597371959759 -45908.79822611 7981.19035797013 -3314.34315322823 -24783.8677691153 3633.07086862093 -17248.944429612 807.69449195738 + 4200 778.68873064081 -93.7693498286962 91.9205057005732 -25750.8035082646 2167.17615996965 -3952.79782922692 -9900.25275241401 4455.28804393082 -8733.52520264573 807.69449195738 + 4300 853.54599636964 -112.946895706172 90.5937830230984 26.3525310997114 -4125.05982439448 -2879.00515267324 15519.5027443966 4769.32283169458 6788.41222305862 807.69449195738 + 4400 869.599365748863 -118.170723415908 89.1981188959183 21219.0586663245 -8412.63073868276 -1209.19915210363 39673.7856125431 4290.55543292237 21545.1560942985 807.69449195738 + 4500 805.523797599058 -104.228930938378 87.8601435734176 31290.2544502563 -9195.76166976858 78.1644597409674 51827.5471345222 2599.69275393081 29224.0320568666 807.69449195738 + 4600 727.774444048004 -86.886928792761 86.6616613633552 29677.0284686462 -6632.24633003324 747.418216472531 47662.384282908 -334.718243567571 27753.0829490286 807.69449195738 + 4700 706.413498033617 -82.8867377336089 85.5680186179319 19658.6700081631 -2332.77284658848 1156.59432388502 29343.7386872311 -3847.5478837743 18827.6896023319 807.69449195738 + 4800 732.171461793534 -90.1076106955356 84.4895134354529 5469.23875023193 1453.97978676326 1753.46986907182 2736.85860480236 -6844.2435008205 5926.34624334733 807.69449195738 + 4900 744.010610792095 -94.0277682843698 83.3925761920875 -8428.92843195287 2963.1612582777 2769.04390466551 -24078.6611318482 -8405.12173726383 -6895.89786321597 807.69449195738 + 5000 721.880722266159 -89.8228916843955 82.3202532621825 -17149.1032288613 1829.00589405725 4094.52308724686 -41351.2091352699 -8161.31716609191 -15290.9243862931 807.69449195738 + 5100 711.8212001968 -88.4551837371623 81.2891192508123 -16872.3949063516 -857.718399803414 5198.73344706078 -40843.5450805845 -6251.21418482546 -15572.6425910545 807.69449195738 + 5200 750.349233276765 -98.683522979534 80.2483598653601 -7565.8091011188 -3400.13189766955 5309.99720609671 -21412.2484943467 -3139.66947329429 -6797.60248166234 807.69449195738 + 5300 799.280109564023 -111.460050140404 79.1401245278794 6188.54696654024 -4468.68894772586 3961.67237173752 8445.66233333135 502.089059712546 7826.04175846589 807.69449195738 + 5400 788.759072207702 -110.095732163053 77.9955453941785 17854.9813513945 -3564.37844746323 1457.38720162139 35165.5775379486 3954.77707291656 22233.2431715385 807.69449195738 + 5500 713.578852534085 -93.2480446876343 76.9153965204511 22816.8896389448 -1036.90077829898 -1213.68616955452 48396.3518957972 6670.39481980879 30806.4117067305 807.69449195738 + 5600 649.070963598512 -78.8332543829672 75.947325733643 20127.815417323 2094.85406983802 -2921.56847239856 45599.9013870323 8252.4152384986 30796.4786779983 807.69449195738 + 5700 660.210023712646 -82.4095596553336 75.0272942481378 11596.6669006659 4549.96035117116 -2968.6749800027 30226.5818988833 8185.34780818143 22326.8516533217 807.69449195738 + 5800 723.839436194642 -98.5598152929845 74.0504139866413 283.071992091383 5428.38027806148 -1421.54039076554 7732.18434220361 5851.9732135927 7444.17379420226 807.69449195738 + 5900 766.502178408386 -109.798935918736 72.9848558209927 -10081.2880443878 4649.42022596065 779.987786682946 -15677.6032391042 1244.07698283853 -9839.71290064648 807.69449195738 + 6000 762.666937332036 -109.986428063159 71.8827936650055 -15529.0677504544 2834.89526368938 2071.50180942626 -32465.6197981005 -4245.34511520088 -23390.0029406579 807.69449195738 + 6100 758.589647933645 -110.113733485269 70.7831982256561 -13387.8523062955 810.667109735556 1029.11743843541 -35554.169063136 -8116.5936987103 -27081.4546058721 807.69449195738 + 6200 794.180340982533 -119.737037224108 69.6470221289455 -4107.9682686488 -818.601763961975 -2636.19047000581 -23054.466132965 -8367.16086748783 -18835.7764612207 807.69449195738 + 6300 837.310687486501 -131.245580911634 68.4235480669396 8616.03180754489 -1773.69746045773 -7610.05856648747 -1042.80923482986 -5013.06005523785 -2796.44327345114 807.69449195738 + 6400 825.155842632356 -129.626364250982 67.1442620317981 19936.551932651 -1997.92258727665 -11560.1042556231 19733.0821100142 -43.5630828529573 13136.0994865698 807.69449195738 + 6500 755.567157921625 -114.265546476258 65.9106277463593 26233.2542239326 -1567.4980873389 -12471.3176949021 30704.417043487 4045.46360503056 22355.7690813511 807.69449195738 + 6600 699.828870647813 -102.113040947573 64.7715135249992 26011.1488158555 -694.099771745189 -9789.04601168312 29447.578781687 5699.06923766744 22515.0763306323 807.69449195738 + 6700 715.526914127146 -106.971257311487 63.6567280225681 19604.6727073358 208.245057309559 -4562.64692819498 18138.0860877375 4718.08797313052 14552.5216977707 807.69449195738 + 6800 775.615856315579 -122.495837933028 62.4612452225586 9043.55603968005 556.132111028385 1342.23989501651 334.32255628017 1896.35169797745 600.207255748325 807.69449195738 + 6900 807.736486416616 -131.450714180481 61.1660087365064 -1973.16842451348 -54.0894043626737 6120.45455849071 -19624.0554446195 -1484.69465322806 -15951.0144145948 807.69449195738 + 7000 787.975665991316 -128.063558332453 59.8409044149358 -9058.89152697209 -1354.35629888727 8413.72640343375 -35594.356142703 -4104.42424530698 -29230.4617908466 807.69449195738 + 7100 762.514730224787 -123.293842103028 58.5390835871386 -9170.82631752316 -2378.42087301241 7526.95431110271 -40981.7602431774 -5025.11331987672 -32395.3922708718 807.69449195738 + 7200 773.214154394621 -127.148991114166 57.2353706635726 -2205.62984979319 -2235.49649238778 3847.07038137678 -33043.5679494566 -3942.76273007994 -22369.1997453771 807.69449195738 + 7300 794.461474527736 -133.574451577353 55.8766482314542 9107.44089952257 -978.139789039356 -996.347860358423 -15795.3744089339 -1187.34081146432 -3142.32752105399 807.69449195738 + 7400 769.6940061952 -129.048828753337 54.496101573976 20774.2232719109 421.994027875439 -4914.51455005615 2263.45975800271 2371.29732943928 16485.2790719545 807.69449195738 + 7500 695.991571156081 -112.776524648438 53.1929689529484 29164.4422892762 1013.90848054582 -6652.42426363227 13729.106629608 5493.75065492286 28710.0028889388 807.69449195738 + 7600 637.245408738691 -99.9488159713542 52.0117855234176 31794.0837991262 673.472447275985 -6322.20165094015 15849.7251652775 6928.53964147847 30413.3440594108 807.69449195738 + 7700 644.606422393029 -102.836745900786 50.8791982723091 27527.8865046363 -40.5726237603459 -4728.09946223989 9729.99656960309 5938.13683671454 22383.7309705785 807.69449195738 + 7800 691.870209244357 -115.299964276375 49.6867295645193 16937.1007790126 -688.775805615749 -2549.111569721 -2007.29779401824 2676.21446286065 7245.69069279605 807.69449195738 + 7900 713.210024837858 -121.65646176024 48.4190270235551 2860.53154375996 -1386.97060848189 -364.233267912295 -15809.8262726633 -1742.70490439749 -10623.0591446457 807.69449195738 + 8000 689.346775901244 -117.23308991868 47.1518538846422 -9841.86173520548 -2377.5021233421 1010.39754001031 -26667.3761251549 -5527.8626882883 -24608.9052997435 807.69449195738 + 8100 664.283714682476 -112.479620301075 45.9286655210737 -16203.0132940287 -3378.17513741475 898.577120937872 -29337.2551313746 -6939.61739680164 -28119.1468623522 807.69449195738 + 8200 674.907150449886 -116.224040427363 44.7175609228681 -13874.3322908691 -3675.9289187546 -449.198114925217 -21642.9204533745 -5287.00852079334 -18992.1721396049 807.69449195738 + 8300 696.221856272698 -122.558368654279 43.4660398423062 -4487.57729489602 -2957.12733464037 -1840.09942612565 -6669.59387102806 -1520.07356852058 -1554.17161669823 807.69449195738 + 8400 679.107632846304 -119.743126160806 42.2001424007921 7543.09880979063 -1794.95829147575 -2146.02995724669 8956.2072155583 2260.23394928089 16276.8251468725 807.69449195738 + 8500 625.581799580143 -108.176074512087 41.0031667107587 17493.4550941942 -1125.77669195788 -1159.78386484242 19288.381386591 4108.13384425536 27971.4593358697 807.69449195738 + 8600 593.570116794496 -101.650435005655 39.8951465560015 21977.6809752879 -1309.81674540713 608.553103461821 21766.2142174024 3304.36323136722 30763.3380980318 807.69449195738 + 8700 621.808906194853 -109.482818591439 38.7967203497714 19336.1794795739 -1913.95923494622 2621.27798695721 16540.538222086 450.038978402435 24727.2772023994 807.69449195738 + 8800 677.398909137017 -123.920718154782 37.615079942391 9926.90103536176 -2340.09423486233 4440.84057412789 4604.10149110703 -3104.86951635527 11754.5762354151 807.69449195738 + 8900 697.869220836965 -130.064205281399 36.3530416831205 -3293.39113093656 -2369.73035481639 5401.47562006387 -12130.7816148135 -5828.45714934041 -3882.49878078307 807.69449195738 + 9000 670.274583117424 -124.741887685314 35.0950094039639 -15170.8777429249 -2000.86280607589 4778.13159963793 -29155.0312383242 -6509.01123001734 -15590.9482694133 807.69449195738 + 9100 641.301973334005 -119.032968342093 33.8949810338134 -20643.0933737709 -1092.9228742168 2543.54045158536 -39631.190883313 -4801.19935133638 -17436.4291196624 807.69449195738 + 9200 648.551250125388 -121.938753519606 32.7178932254998 -17545.6834346465 407.277892828059 -324.084321424331 -38250.7496938311 -1503.37584356599 -8252.15916435299 807.69449195738 + 9300 669.898881153316 -128.241562833627 31.5057425604181 -7635.40769078997 1936.39572868305 -2589.11663246974 -25458.2196897865 1854.73457994502 7319.64594485082 807.69449195738 + 9400 660.005403375942 -127.115040539148 30.2730186158369 4737.67619171306 2442.86741652824 -3808.33861835158 -7418.82912362333 3880.69051570432 22202.9853499624 807.69449195738 + 9500 620.752432353387 -118.9363392205 29.0912678931734 14702.2766517624 1318.66767168445 -4488.42372304215 8314.94536627479 3977.61738802613 31332.1295122829 807.69449195738 + 9600 605.158022875995 -116.338080557795 27.9708087563563 18148.0700886093 -923.022239356076 -5244.41638702088 16984.314295711 2438.00791808299 33155.8605355592 807.69449195738 + 9700 647.066305676779 -127.473762515629 26.8287772425882 12457.026794319 -3083.77567308496 -5971.37345995289 17293.513879008 174.696501657853 28149.5977998226 807.69449195738 + 9800 712.535977619091 -144.338350947637 25.5764012982478 -2278.66973443734 -4285.86194983082 -5947.66651305406 9955.33079244875 -1657.88451703234 17466.3140499512 807.69449195738 + 9900 739.922195647871 -152.221766426822 24.2236349335976 -21896.3186581002 -4397.60180837024 -4656.92695333642 -2780.83044269569 -2187.88445840626 3508.02364787037 807.69449195738 + 10000 714.670095831422 -147.564508935991 22.8591553911101 -38679.3761374111 -3643.62334230431 -2380.63035178382 -16496.9115982111 -1365.61394601647 -9310.84391174422 807.69449195738 +Loop time of 5.99865 on 1 procs for 10000 steps with 81 atoms + +Performance: 1.440 ns/day, 16.663 hours/ns, 1667.041 timesteps/s, 135.030 katom-step/s +100.1% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 4.7701 | 4.7701 | 4.7701 | 0.0 | 79.52 +Bond | 0.024226 | 0.024226 | 0.024226 | 0.0 | 0.40 +Kspace | 0.91657 | 0.91657 | 0.91657 | 0.0 | 15.28 +Neigh | 0.004786 | 0.004786 | 0.004786 | 0.0 | 0.08 +Comm | 0.19943 | 0.19943 | 0.19943 | 0.0 | 3.32 +Output | 0.046888 | 0.046888 | 0.046888 | 0.0 | 0.78 +Modify | 0.021633 | 0.021633 | 0.021633 | 0.0 | 0.36 +Other | | 0.015 | | | 0.25 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 3299 ave 3299 max 3299 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 29158 ave 29158 max 29158 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 29158 +Ave neighs/atom = 359.97531 +Ave special neighs/atom = 2 +Neighbor list builds = 6 +Dangerous builds = 0 +Total wall time: 0:00:06 diff --git a/tests/test_lammpsparser.py b/tests/test_lammpsparser.py index 968ff7f8..68ab75af 100644 --- a/tests/test_lammpsparser.py +++ b/tests/test_lammpsparser.py @@ -27,50 +27,71 @@ def approx(value, abs=0, rel=1e-6): return pytest.approx(value, abs=abs, rel=rel) -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def parser(): return LammpsParser() def test_nvt(parser): archive = EntryArchive() - parser.parse('tests/data/lammps/hexane_cyclohexane/log.hexane_cyclohexane_nvt', archive, None) + parser.parse( + "tests/data/lammps/hexane_cyclohexane/log.hexane_cyclohexane_nvt", archive, None + ) sec_run = archive.run[0] - assert sec_run.program.version == '14 May 2016' + assert sec_run.program.version == "14 May 2016" sec_workflow = archive.workflow2 - assert sec_workflow.m_def.name == 'MolecularDynamics' - assert sec_workflow.method.thermodynamic_ensemble == 'NVT' - assert sec_workflow.method.integrator_type == 'velocity_verlet' + assert sec_workflow.m_def.name == "MolecularDynamics" + assert sec_workflow.method.thermodynamic_ensemble == "NVT" + assert sec_workflow.method.integrator_type == "velocity_verlet" assert sec_workflow.method.integration_timestep.magnitude == 2.5e-16 - assert sec_workflow.method.integration_timestep.units == 'second' + assert sec_workflow.method.integration_timestep.units == "second" assert sec_workflow.method.n_steps == 80000 assert sec_workflow.method.coordinate_save_frequency == 400 assert sec_workflow.method.thermodynamics_save_frequency == 400 - assert sec_workflow.method.thermostat_parameters[0].thermostat_type == 'nose_hoover' - assert sec_workflow.method.thermostat_parameters[0].reference_temperature.magnitude == 300.0 - assert sec_workflow.method.thermostat_parameters[0].reference_temperature.units == 'kelvin' - assert sec_workflow.method.thermostat_parameters[0].coupling_constant.magnitude == 2.5e-14 - assert sec_workflow.method.thermostat_parameters[0].coupling_constant.units == 'second' + assert sec_workflow.method.thermostat_parameters[0].thermostat_type == "nose_hoover" + assert ( + sec_workflow.method.thermostat_parameters[0].reference_temperature.magnitude + == 300.0 + ) + assert ( + sec_workflow.method.thermostat_parameters[0].reference_temperature.units + == "kelvin" + ) + assert ( + sec_workflow.method.thermostat_parameters[0].coupling_constant.magnitude + == 2.5e-14 + ) + assert ( + sec_workflow.method.thermostat_parameters[0].coupling_constant.units == "second" + ) sec_method = sec_run.method[0] assert len(sec_method.force_field.model[0].contributions) == 3 - assert sec_method.force_field.model[0].contributions[1].type == 'bond' + assert sec_method.force_field.model[0].contributions[1].type == "bond" assert sec_method.force_field.model[0].contributions[1].n_interactions == 666 assert sec_method.force_field.model[0].contributions[1].n_atoms == 2 assert sec_method.force_field.model[0].contributions[1].atom_indices[100][1] == 103 - assert sec_method.force_field.model[0].contributions[1].parameters[200] == approx(1.1147454117684314) - assert sec_method.force_field.model[0].contributions[1].atom_labels[350][0] == '2' - assert sec_method.force_field.force_calculations.coulomb_cutoff.magnitude == 1.2000000000000002e-08 - assert sec_method.force_field.force_calculations.coulomb_cutoff.units == 'meter' - assert sec_method.force_field.force_calculations.neighbor_searching.neighbor_update_frequency == 10 + assert sec_method.force_field.model[0].contributions[1].parameters[200] == approx( + 1.1147454117684314 + ) + assert sec_method.force_field.model[0].contributions[1].atom_labels[350][0] == "2" + assert ( + sec_method.force_field.force_calculations.coulomb_cutoff.magnitude + == 1.2000000000000002e-08 + ) + assert sec_method.force_field.force_calculations.coulomb_cutoff.units == "meter" + assert ( + sec_method.force_field.force_calculations.neighbor_searching.neighbor_update_frequency + == 10 + ) sec_system = sec_run.system assert len(sec_system) == 201 assert sec_system[5].atoms.lattice_vectors[1][1].magnitude == approx(2.24235e-09) assert False not in sec_system[0].atoms.periodic - assert sec_system[80].atoms.labels[91:96] == ['H', 'H', 'H', 'C', 'C'] + assert sec_system[80].atoms.labels[91:96] == ["H", "H", "H", "C", "C"] assert sec_system[0].atoms.bond_list[200][0] == 194 sec_scc = sec_run.calculation @@ -80,18 +101,23 @@ def test_nvt(parser): assert sec_scc[103].temperature.magnitude == 291.4591 assert sec_scc[11].step == 4400 assert len(sec_scc[1].energy.contributions) == 9 - assert sec_scc[112].energy.contributions[8].kind == 'kspace long range' + assert sec_scc[112].energy.contributions[8].kind == "kspace long range" assert sec_scc[96].energy.contributions[2].value.magnitude == approx(1.19666271e-18) assert sec_scc[47].energy.contributions[4].value.magnitude == approx(1.42166035e-18) assert sec_scc[75].time_physical.magnitude == approx(83.56332225) assert sec_scc[112].time_calculation.magnitude == approx(1.2351 / 400) - assert sec_run.x_lammps_section_control_parameters[0].x_lammps_inout_control_atomstyle == 'full' + assert ( + sec_run.x_lammps_section_control_parameters[0].x_lammps_inout_control_atomstyle + == "full" + ) def test_thermo_format(parser): archive = EntryArchive() - parser.parse('tests/data/lammps/1_methyl_naphthalene/log.1_methyl_naphthalene', archive, None) + parser.parse( + "tests/data/lammps/1_methyl_naphthalene/log.1_methyl_naphthalene", archive, None + ) sec_sccs = archive.run[0].calculation assert len(sec_sccs) == 301 @@ -102,7 +128,11 @@ def test_thermo_format(parser): def test_traj_xyz(parser): archive = EntryArchive() - parser.parse('tests/data/lammps/methane_xyz/log.methane_nvt_traj_xyz_thermo_style_custom', archive, None) + parser.parse( + "tests/data/lammps/methane_xyz/log.methane_nvt_traj_xyz_thermo_style_custom", + archive, + None, + ) sec_systems = archive.run[0].system assert len(sec_systems) == 201 @@ -111,7 +141,11 @@ def test_traj_xyz(parser): def test_traj_dcd(parser): archive = EntryArchive() - parser.parse('tests/data/lammps/methane_dcd/log.methane_nvt_traj_dcd_thermo_style_custom', archive, None) + parser.parse( + "tests/data/lammps/methane_dcd/log.methane_nvt_traj_dcd_thermo_style_custom", + archive, + None, + ) assert len(archive.run[0].calculation) == 201 sec_systems = archive.run[0].system @@ -121,12 +155,17 @@ def test_traj_dcd(parser): def test_unwrapped_pos(parser): archive = EntryArchive() - parser.parse('tests/data/lammps/1_xyz_files/log.lammps', archive, None) + parser.parse("tests/data/lammps/1_xyz_files/log.lammps", archive, None) assert len(archive.run[0].calculation) == 101 sec_systems = archive.run[0].system - assert sec_systems[1].atoms.positions[452][2].magnitude == approx(5.99898) # JFR - units are incorrect?! - assert sec_systems[2].atoms.velocities[457][-2].magnitude == approx(-0.928553) # JFR - velocities are not being read!! + assert sec_systems[1].atoms.positions[452][2].magnitude == approx( + 5.99898 + ) # JFR - units are incorrect?! + assert sec_systems[2].atoms.velocities[457][-2].magnitude == approx( + -0.928553 + ) # JFR - velocities are not being read!! + # TODO Fix dealing with multiple output files with archive_to_universe function, then add back in this test # def test_multiple_dump(parser): @@ -141,7 +180,9 @@ def test_unwrapped_pos(parser): def test_md_atomsgroup(parser): archive = EntryArchive() - parser.parse('tests/data/lammps/polymer_melt/Emin/log.step4.0_minimization', archive, None) + parser.parse( + "tests/data/lammps/polymer_melt/Emin/log.step4.0_minimization", archive, None + ) sec_run = archive.run[0] sec_systems = sec_run.system @@ -149,63 +190,179 @@ def test_md_atomsgroup(parser): assert len(sec_systems[0].atoms_group) == 1 assert len(sec_systems[0].atoms_group[0].atoms_group) == 100 - assert sec_systems[0].atoms_group[0].label == 'group_0' - assert sec_systems[0].atoms_group[0].type == 'molecule_group' + assert sec_systems[0].atoms_group[0].label == "group_0" + assert sec_systems[0].atoms_group[0].type == "molecule_group" assert sec_systems[0].atoms_group[0].index == 0 - assert sec_systems[0].atoms_group[0].composition_formula == '0(100)' + assert sec_systems[0].atoms_group[0].composition_formula == "0(100)" assert sec_systems[0].atoms_group[0].n_atoms == 7200 assert sec_systems[0].atoms_group[0].atom_indices[5] == 5 assert sec_systems[0].atoms_group[0].is_molecule is False - assert sec_systems[0].atoms_group[0].atoms_group[52].label == '0' - assert sec_systems[0].atoms_group[0].atoms_group[52].type == 'molecule' + assert sec_systems[0].atoms_group[0].atoms_group[52].label == "0" + assert sec_systems[0].atoms_group[0].atoms_group[52].type == "molecule" assert sec_systems[0].atoms_group[0].atoms_group[52].index == 52 - assert sec_systems[0].atoms_group[0].atoms_group[52].composition_formula == '1(1)2(1)3(1)4(1)5(1)6(1)7(1)8(1)9(1)10(1)' + assert ( + sec_systems[0].atoms_group[0].atoms_group[52].composition_formula + == "1(1)2(1)3(1)4(1)5(1)6(1)7(1)8(1)9(1)10(1)" + ) assert sec_systems[0].atoms_group[0].atoms_group[52].n_atoms == 72 assert sec_systems[0].atoms_group[0].atoms_group[52].atom_indices[8] == 3752 assert sec_systems[0].atoms_group[0].atoms_group[52].is_molecule is True - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].label == 'group_8' - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].type == 'monomer_group' + assert ( + sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].label == "group_8" + ) + assert ( + sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].type + == "monomer_group" + ) assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].index == 7 - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].composition_formula == '8(1)' + assert ( + sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].composition_formula + == "8(1)" + ) assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].n_atoms == 7 - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].atom_indices[5] == 5527 - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].is_molecule is False - - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].atoms_group[0].label == '8' - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].atoms_group[0].type == 'monomer' - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].atoms_group[0].index == 0 - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].atoms_group[0].composition_formula == '1(4)4(2)6(1)' - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].atoms_group[0].n_atoms == 7 - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].atoms_group[0].atom_indices[5] == 5527 - assert sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].atoms_group[0].is_molecule is False + assert ( + sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].atom_indices[5] + == 5527 + ) + assert ( + sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].is_molecule + is False + ) + + assert ( + sec_systems[0] + .atoms_group[0] + .atoms_group[76] + .atoms_group[7] + .atoms_group[0] + .label + == "8" + ) + assert ( + sec_systems[0].atoms_group[0].atoms_group[76].atoms_group[7].atoms_group[0].type + == "monomer" + ) + assert ( + sec_systems[0] + .atoms_group[0] + .atoms_group[76] + .atoms_group[7] + .atoms_group[0] + .index + == 0 + ) + assert ( + sec_systems[0] + .atoms_group[0] + .atoms_group[76] + .atoms_group[7] + .atoms_group[0] + .composition_formula + == "1(4)4(2)6(1)" + ) + assert ( + sec_systems[0] + .atoms_group[0] + .atoms_group[76] + .atoms_group[7] + .atoms_group[0] + .n_atoms + == 7 + ) + assert ( + sec_systems[0] + .atoms_group[0] + .atoms_group[76] + .atoms_group[7] + .atoms_group[0] + .atom_indices[5] + == 5527 + ) + assert ( + sec_systems[0] + .atoms_group[0] + .atoms_group[76] + .atoms_group[7] + .atoms_group[0] + .is_molecule + is False + ) def test_geometry_optimization(parser): archive = EntryArchive() - parser.parse('tests/data/lammps/polymer_melt/Emin/log.step4.0_minimization', archive, None) + parser.parse( + "tests/data/lammps/polymer_melt/Emin/log.step4.0_minimization", archive, None + ) sec_workflow = archive.workflow2 - assert sec_workflow.method.type == 'atomic' - assert sec_workflow.method.method == 'polak_ribiere_conjugant_gradient' + assert sec_workflow.method.type == "atomic" + assert sec_workflow.method.method == "polak_ribiere_conjugant_gradient" - assert sec_workflow.method.convergence_tolerance_energy_difference.magnitude == approx(0.0) - assert sec_workflow.method.convergence_tolerance_energy_difference.units == 'joule' + assert ( + sec_workflow.method.convergence_tolerance_energy_difference.magnitude + == approx(0.0) + ) + assert sec_workflow.method.convergence_tolerance_energy_difference.units == "joule" assert sec_workflow.results.final_energy_difference.magnitude == approx(0.0) - assert sec_workflow.results.final_energy_difference.units == 'joule' + assert sec_workflow.results.final_energy_difference.units == "joule" - assert sec_workflow.method.convergence_tolerance_force_maximum.magnitude == approx(100) - assert sec_workflow.method.convergence_tolerance_force_maximum.units == 'newton' + assert sec_workflow.method.convergence_tolerance_force_maximum.magnitude == approx( + 100 + ) + assert sec_workflow.method.convergence_tolerance_force_maximum.units == "newton" assert sec_workflow.results.final_force_maximum.magnitude == approx(5091750000.0) - assert sec_workflow.results.final_force_maximum.units == 'newton' + assert sec_workflow.results.final_force_maximum.units == "newton" assert sec_workflow.method.optimization_steps_maximum == 10000 assert sec_workflow.results.optimization_steps == 160 assert len(sec_workflow.results.energies) == 159 assert sec_workflow.results.energies[14].magnitude == approx(6.931486093999211e-17) - assert sec_workflow.results.energies[14].units == 'joule' + assert sec_workflow.results.energies[14].units == "joule" assert len(sec_workflow.results.steps) == 159 assert sec_workflow.results.steps[22] == 1100 + + +def test_init_velocity(parser): + archive = EntryArchive() + parser.parse( + "tests/data/lammps/test_init_velocity/uniform/log.lammps", archive, None + ) + + sec_workflow = archive.workflow2 + sec_init = sec_workflow.method.initialization_parameters[0] + assert sec_init.temperature.magnitude == approx(600.0) + assert sec_init.velocity_distribution_seed == 30320 + assert sec_init.velocity_distribution == "uniform" + assert sec_init.velocity_distribution_min.to("angstrom/fs").magnitude == approx( + -1.0 + ) + assert sec_init.velocity_distribution_max.to("angstrom/fs").magnitude == approx(1.0) + + archive = EntryArchive() + parser.parse( + "tests/data/lammps/test_init_velocity/gaussian/log.lammps", archive, None + ) + + sec_workflow = archive.workflow2 + sec_init = sec_workflow.method.initialization_parameters[0] + assert sec_init.temperature.magnitude == approx(8.0) + assert sec_init.velocity_distribution_seed == 87287 + assert sec_init.velocity_distribution == "gaussian" + + archive = EntryArchive() + parser.parse( + "tests/data/lammps/test_init_velocity/exponential/log.lammps", archive, None + ) + + sec_workflow = archive.workflow2 + sec_init = sec_workflow.method.initialization_parameters[0] + assert sec_init.temperature.magnitude == approx(298.0) + assert sec_init.velocity_distribution == "exponential" + assert sec_init.velocity_distribution_decay.to("fs/angstrom").magnitude == approx( + 5.0 + )