Temperature fluctuating wildly for ellipsoidal simulations

I recently ran an ellipsoidal simulation using Andrew Jewett’s files he has posted here: Re: [lammps-users] Ellipsoidal shaped particles.

After running these simulations, I see that temperature seems to be fluctuating very wildly. Looking at in.ellipsoid, I see that temperature has been set to 300. However, looking at the output, temperature seems to be fluctuating pretty wildly.
This is what the output file looks like:

Per MPI rank memory allocation (min/avg/max) = 7.212 | 7.218 | 7.223 Mbytes
Step TotEng E_vdwl KinEng PotEng Temp Press Volume Density c_myMSD[1] c_myMSD[2] c_myMSD[3] c_myMSD[4] CPU 
   10001   -536.09776   -680.68848    144.59072   -680.68848    391.18702    137.96442        42875   0.37816456    167.94042     164.7865    153.07636    485.80328            0   
   10100   -563.95441   -699.39147    135.43706   -699.39147    366.42198   -264.21147    42827.766   0.37858163    169.17051    168.92188    153.55888    491.65127  0.033846967 
   10200   -584.85761    -715.4313    130.57369    -715.4313    353.26424    249.63825    41635.932   0.38941858    168.82629    173.23006    154.33077    496.38712  0.064700434 
   10300   -582.52893   -706.83945    124.31052   -706.83945    336.31939   -100.17286    40460.364   0.40073306    169.08896    173.89867    153.92462    496.91224  0.096393363 
   10400   -601.20266   -739.94099    138.73833   -739.94099     375.3535    53.995843    38085.544   0.42572072    162.07677     166.0262    150.19752    478.30048   0.12887378 
   10500   -602.08292   -744.19695    142.11403   -744.19695    384.48639    23.171651    35890.499    0.4517576    156.47373    159.55029    145.40003    461.42406   0.16595446 
   10600     -621.227   -763.26956    142.04256   -763.26956    384.29303    296.98003    33945.889   0.47763679    152.23829    160.65117    143.04711    455.93657    0.1998236 
   10700    -638.9341   -767.84478    128.91068   -767.84478      348.765     27.53908     32685.14   0.49606045    149.96392    162.49717    141.33107    453.79215   0.23558312 
   10800   -651.34014   -777.70488    126.36474   -777.70488    341.87703    138.12048     31644.93    0.5123666    149.32336    156.20217    140.93012    446.45564    0.2692906 
   10900   -630.28681   -756.86234    126.57553   -756.86234    342.44732    189.12609    30700.105   0.52813518    147.00541    155.46482    142.56635    445.03657   0.30282975 
   11000   -615.49138   -746.52475    131.03337   -746.52475     354.5079    202.63822    29515.057   0.54934014    146.11017    153.35455    144.12823    443.59295   0.33772418 
   11100   -609.67225   -745.42471    135.75246   -745.42471    367.27531    9.3874346    28431.588   0.57027435    141.50007    152.00082    144.86496    438.36586   0.37430851 
   11200   -632.44634   -764.46888    132.02254   -764.46888    357.18408   -185.28881    27058.277   0.59921794    138.04519      150.504    146.94529    435.49449   0.41007423 
   11300   -645.99076    -776.2288    130.23803    -776.2288    352.35614   -102.06659    25282.905   0.64129519    130.52618    148.45093    149.64399     428.6211   0.45182443 
   11400    -676.9142   -797.66093    120.74673   -797.66093    326.67763    245.22667    23431.615   0.69196277    126.53993    143.00287    150.45232    419.99513   0.49226191 
   11500   -714.50823      -856.37    141.86177      -856.37     383.8039    554.41808    21738.385    0.7458606    123.31399    141.21764    151.91941    416.45104   0.53288856 
   11600   -745.56548   -889.12031    143.55483   -889.12031    388.38443   -64.097838    20994.165   0.77230055    124.14814    140.05888    154.21463    418.42165   0.57541558 
   11700   -767.50455   -894.11095     126.6064   -894.11095    342.53083     373.7951    20523.209   0.79002293    120.89433    142.44477    156.04965    419.38874   0.61946833 
   11800    -793.2583    -934.5442     141.2859    -934.5442    382.24589    105.00605    20083.877   0.80730455    121.71911    139.75582    156.83447     418.3094   0.67213113 
   11900   -803.19751   -930.67548    127.47797   -930.67548    344.88884    105.71882    19827.972   0.81772385    119.05389    140.47636    156.06449    415.59474   0.76971748 
   12000   -816.18286   -943.03423    126.85137   -943.03423    343.19359    497.37053    19470.019   0.83275757    121.59508    137.10536    156.49395    415.19439   0.81784908 
   12100   -807.48734   -940.83896    133.35162   -940.83896    360.77987    398.19339    19339.703   0.83836888    121.67978    135.25933    160.93935    417.87846   0.86683213 
   12200   -820.85801   -956.05245    135.19444   -956.05245    365.76558   -367.99926    19413.327   0.83518943    122.91243    135.36034    159.04774    417.32051   0.91652634 
   12300   -797.06481   -938.47419    141.40938   -938.47419    382.57998    364.98297    19563.568   0.82877547    124.53287    133.88813     158.9908    417.41181   0.95894957 
   12400    -799.0323   -926.82107    127.78877   -926.82107    345.72971    -38.25008      19852.5   0.81671352    125.78148    136.73208    160.76847    423.28203    1.0086499 
   12500   -797.33636   -911.74453    114.40818   -911.74453    309.52881    888.95383    19783.703    0.8195536    124.78851    136.87354    157.98545    419.64751    1.0508723 
   12600   -769.68665   -922.66988    152.98323   -922.66988    413.89276    368.79021    19845.569   0.81699876    125.70412    138.28599    155.78941    419.77952    1.0926172 
   12700    -789.9595   -930.14198    140.18248   -930.14198    379.26063    90.720723    19896.275   0.81491663    127.19676    139.03091    157.67858    423.90624    1.1352759 
   12800   -808.92205   -940.31112    131.38907   -940.31112    355.47025    438.07979    19688.768   0.82350535    124.41132    139.10693     156.9755    420.49376    1.1820702 
   12900   -821.17898   -960.28295    139.10397   -960.28295    376.34272   -135.93131    19510.073    0.8310479    127.60852    138.43465    154.68505    420.72822    1.2302307 
   13000   -814.21822   -957.63083     143.4126   -957.63083    387.99965    167.77043    19467.701   0.83285669    128.51322    137.42856    153.91709    419.85888    1.2767645 
   13100   -823.24366   -953.21569    129.97203   -953.21569    351.63646   -187.26113     19674.12   0.82411846    132.78104    137.78042     155.7228    426.28425    1.3227989 
   13200   -820.15016   -937.16344    117.01328   -937.16344    316.57685   -127.86929    19843.235   0.81709488    134.51798    141.12021    157.04915    432.68734    1.3677308 
   13300   -791.71355   -927.96332    136.24976   -927.96332    368.62074     619.3765    19699.021   0.82307671    138.83469    140.80067    157.19686    436.83221    1.4119633 
   13400   -801.74759    -942.7794    141.03182    -942.7794    381.55848   -289.07311    19826.578   0.81778131    143.92069    146.34538    157.44025    447.70632    1.4594508 
   13500   -792.99585   -921.83491    128.83907   -921.83491    348.57127    343.99446    19705.926   0.82278831    142.50968    145.36403    159.93444    447.80815    1.5114387 
   13600   -814.55214   -940.15424     125.6021   -940.15424    339.81372    579.09237    19356.998   0.83761984     143.2012    145.83833    159.77227     448.8118    1.5569707 
   13700   -835.30276   -959.23027    123.92751   -959.23027    335.28316    307.79901    19404.819   0.83555559    145.32879    149.81815    162.17507    457.32202     1.603076 
   13800   -843.17991   -961.43604    118.25613   -961.43604    319.93935   -73.733807    19458.215   0.83326274    146.96153    152.37928    165.75642    465.09723    1.6462407 
   13900   -846.25631   -980.93788    134.68156   -980.93788    364.37801    477.43792    19084.373   0.84958542    142.42321    155.52014    165.19745    463.14079    1.6885454 
   14000   -833.43221   -953.50624    120.07403   -953.50624    324.85764     847.7199    19172.747   0.84566941    144.26812    155.79073    168.65128    468.71012    1.7355234 
   14100   -805.58433   -948.73211    143.14778   -948.73211    387.28317    86.892954    19800.834   0.81884458    148.81436     156.8705    169.68425    475.36911    1.7832857 
   14200   -783.02916   -923.22959    140.20042   -923.22959    379.30917    46.434534    20038.586   0.80912919    149.34135    160.78404    174.38559    484.51097    1.8279781 
   14300   -775.41649   -920.00705    144.59056   -920.00705    391.18658    120.48625     19880.35    0.8155694     147.5528    164.14626    175.00367    486.70273    1.8748812 
   14400   -796.26639   -932.88191    136.61552   -932.88191    369.61029    115.17743    19788.027   0.81937455    148.89325    166.70214    178.62267    494.21806    1.9199365 
   14500   -785.78833   -933.51513     147.7268   -933.51513    399.67161    213.78698    19893.496   0.81503047    150.27852    168.97109    175.35096    494.60058    1.9635043 
   14600    -822.4175    -943.1138     120.6963    -943.1138    326.54119   -260.57667     19934.01   0.81337398    147.40788    169.04241    171.67302    488.12331    2.0082085 
   14700   -825.15101   -945.96544    120.81444   -945.96544     326.8608    148.28109     19678.74   0.82392498    146.23528    169.53499    173.24814    489.01842    2.0536337 
   14800   -822.02205   -961.54343    139.52138   -961.54343    377.47203     362.1987    19260.965   0.84179611    144.04586    170.07697    172.82666     486.9495    2.1008665 
   14900   -833.26025   -960.96578    127.70553   -960.96578    345.50449    365.25984    19277.908   0.84105626    143.02721    168.07347    175.78617    486.88685    2.1452045 
   15000   -827.80999   -954.78052    126.97053   -954.78052    343.51597    119.00994    19648.256   0.82520326    143.92328    166.93777    179.05541    489.91646    2.1911456 
   15001   -827.33197   -953.16122    125.82925   -953.16122    340.42827     161.0244    19650.644   0.82510301    143.87758    166.89974    179.06305    489.84037    2.1917255 
Loop time of 2.19175 on 96 procs for 5000 steps with 125 atoms

Usually, temperature fluctuates somewhat around the thermostatted value in a regular MD simulation. Does having ellipsoids lead to wilder fluctuations in temperature?

Any advice you have would be appreciated!

Not really “wildly”, or at least not unexpectedly so. You have only 125 ellipsoids in your system, that is not a lot, so some significant fluctuations are to be expected since the degree of fluctuation depends on the number of degrees of freedom.
Consider the most extreme example of a single harmonic oscillator. If you have a “temperature” of 300K (on average), the instantaneous temperature will oscillate between 0K and 600K. With 125 ellipsoids you have 750 degrees of freedom instead of one so there is some cancellation happening because the interactions are not strictly harmonic and not in phase.

Moreover, when looking at the input, you can see that the temperature is not computed correctly. Since ellipsoids have more degrees of freedom than point particles, the default temperature compute is not suitable for computing the temperature. Instead you have to use compute temp/asphere. e.g. by inserting:

compute  mytemp all temp/asphere
thermo_modify temp mytemp

after the thermo_style command. A more meaningful monitoring of the temperature would be possible with some time averaging, e.g. with:

fix avgtemp all ave/time 1 100 100 c_mytemp ave window 50

That will use a sliding window with the time average over 5000 MD steps which will look like this:

Per MPI rank memory allocation (min/avg/max) = 7.392 | 7.392 | 7.393 Mbytes
   Step         TotEng         E_vdwl         KinEng         PotEng          Temp        f_avgtemp        Press          Volume        Density       c_myMSD[1]     c_myMSD[2]     c_myMSD[3]     c_myMSD[4]        CPU      
     10000  -721.3052      -943.67509      222.36989     -943.67509      299.60036      299.88644      394.01397      19421.856      0.83482264     91.64227       85.535855      74.778917      251.95704      0            
     10100  -723.77124     -945.7688       221.99757     -945.7688       299.09873      300.04266      1015.0079      19421.856      0.83482264     91.078856      83.402773      76.075538      250.55717      0.33574104   
     10200  -749.92532     -977.09288      227.16756     -977.09288      306.06429      300.2353      -146.71112      19421.856      0.83482264     90.981146      83.805786      76.571193      251.35812      0.67387852   
     10300  -760.65857     -970.31371      209.65514     -970.31371      282.4697       300.00587     -305.30386      19421.856      0.83482264     92.507682      88.88538       76.141122      257.53418      1.002698     
     10400  -746.60188     -950.15196      203.55008     -950.15196      274.24431      300.17598      151.47635      19421.856      0.83482264     94.048399      90.340512      77.972         262.36091      1.3338015    
     10500  -734.68193     -960.14866      225.46672     -960.14866      303.77274      300.07491      483.2454       19421.856      0.83482264     92.391867      91.788154      80.968993      265.14901      1.6746574    
     10600  -733.33828     -953.58684      220.24856     -953.58684      296.74227      299.81833      704.33945      19421.856      0.83482264     93.162135      93.81855       82.315059      269.29574      2.0878193    
     10700  -737.67235     -957.43483      219.76248     -957.43483      296.08738      299.56208     -78.540991      19421.856      0.83482264     96.321976      93.46315       81.087128      270.87225      2.4702665    
     10800  -731.16988     -951.02646      219.85658     -951.02646      296.21417      299.60862      202.15157      19421.856      0.83482264     100.66856      92.910869      80.317751      273.89718      2.8114962    
     10900  -708.46153     -958.14339      249.68186     -958.14339      336.39795      299.82312      119.49106      19421.856      0.83482264     99.602681      93.416303      80.464232      273.48322      3.1486991    
     11000  -714.98273     -952.69911      237.71638     -952.69911      320.27678      300.02561      751.40891      19421.856      0.83482264     99.763677      93.785195      81.491239      275.04011      3.4789092    
     11100  -735.67213     -957.45109      221.77896     -957.45109      298.80419      299.9497      -63.929552      19421.856      0.83482264     99.120649      95.341256      82.87431       277.33622      3.8024509    
     11200  -734.83705     -962.28186      227.44482     -962.28186      306.43784      300.018       -12.345756      19421.856      0.83482264     100.33413      94.601373      83.647423      278.58293      4.1352199    

@akohlmey thank you for your response. I am seeing temperatures that are closer to the average. Is the change in temperature calculation a feature of the fact that the ellipsoids have rotational degrees of freedom?

Specific to asphere, I see that the temp, nvt, npt, nph have an asphere variant. Looking at nph, does this mean that pressure also needs to have some sort of correction in the event nonspherical particles are being used?

I have already explained this.

Please see the documentation of compute pressure.

Understood. Thank you again!