Skip to content

Action: SIZESHAPE_POSITION_MAHA_DIST

Module sizeshape
Description Usage
Calculates Mahalanobis distance of a current configuration from a given reference configurational distribution in size-and-shape space. used in 0 tutorialsused in 0 eggs
output value type
the Mahalanobis distance between the instantaneous configuration and a given reference distribution in size-and-shape space scalar

Details and examples

Calculates Mahalanobis distance of a current configuration from a given reference configurational distribution in size-and-shape space.

The Mahalanobis distance is given as:

Here is the configuration at time t, is the reference and is the precision matrix.

Size-and-shape Gaussian Mixture Model (shapeGMM) is a probabilistic clustering technique that is used to perform structural clusteing on ensemble of molecular configurations and to obtain reference and precision corresponding to each of the cluster centers. Please chcek out shapeGMMTorch-GitHub and shapeGMMTorch-PyPI for examples and informations on preforming shapeGMM clustering.

Examples

In the following example, a group is defined with atom indices of selected atoms and then Mahalanobis distance is calculated with respect to the given reference and precision. Each file is a space separated list of 3N floating point numbers.

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/sizeshape/rt-mahadist/global_avg.txt
#SETTINGS INPUTFILES=regtest/sizeshape/rt-mahadist/global_precision.txt

UNITSThis command sets the internal units for the code. More details LENGTHthe units of lengths=A TIMEthe units of time=ps ENERGYthe units of energy=kcal/mol GROUPDefine a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms. More details ATOMSthe numerical indexes for the set of atoms in the group=18,20,22,31,33,35,44,46,48,57,59,61,70,72,74,83,85,87,96,98,100,109,111 LABELa label for the action so that its output can be referenced in the input to other actions=ga_list d: SIZESHAPE_POSITION_MAHA_DISTCalculates Mahalanobis distance of a current configuration from a given reference configurational distribution in size-and-shape space. More details ... REFERENCEReference structure=
regtest/sizeshape/rt-mahadist/global_avg.txt
Click here to see an extract from this file.
×

FILE: regtest/sizeshape/rt-mahadist/global_avg.txt

4.265825962982551012e+00 2.336690414907679203e-01 3.662809312682036023e+00
4.214057267340745483e+00 1.072049513718947578e-01 4.314804999781733486e+00
3.671228981308725103e+00 1.274792340073149510e-01 3.977231205572313577e+00
2.343698812761148886e+00 -2.841411661146072132e-01 3.478414401687389024e+00
1.686436487941495699e+00 -8.665088225218358087e-01 4.100811861077803044e+00
4.360230108844224128e-01 -1.347015411672896512e+00 3.844097514796287030e+00
3.117457174800847969e-02 -1.024227536411313366e+00 2.585940217022081988e+00
6.808808862178362675e-01 -5.870202775664047357e-01 2.290245252111865248e+00
4.586351396567848737e-01 -2.433497671270518359e-01 1.192357902655695634e+00
4.931328549364416558e-01 2.515992483355074527e-01 2.956934483804412803e-02
1.406321673638208702e+00 6.682431861735423917e-01 7.908513055476143472e-02
1.646908036369386430e+00 1.186975749838515615e+00 -8.956858825186609918e-01
5.912530303131902087e-01 8.617407774506029572e-01 -1.344660953846545715e+00
8.530666038486142688e-02 2.536604398394486926e-01 -4.506541385680229994e-01
-8.727821507437001358e-01 -1.296438909175296195e-01 -6.398328611456164383e-01
-2.067478377458112249e+00 -3.906550201962756819e-01 -1.401863559473397691e+00
-2.408455843196946056e+00 -6.754022773093291132e-01 -1.106090740276666429e+00
-3.499742687863982127e+00 -9.747491888605476218e-01 -1.653484266030961436e+00
-3.548593077032900389e+00 -4.204563480815317056e-01 -3.070014906890367268e+00
-2.499045339091049645e+00 2.342840846507300567e-01 -3.442979964675248805e+00
-2.331926055743990922e+00 8.142912721692037170e-01 -4.695739761431558357e+00
-2.568879301577981611e+00 1.091951813009595762e+00 -5.625053366993444826e+00
-2.213980543775061705e+00 1.112069908442180788e+00 -5.229306740929514419e+00
PRECISIONPrecision Matrix (inverse of covariance)=
regtest/sizeshape/rt-mahadist/global_precision.txt
Click here to see an extract from this file.
×

FILE: regtest/sizeshape/rt-mahadist/global_precision.txt

1.341060592612849689e+01 -2.432209892648744542e+01 1.533381940780554942e+01 -7.657303908462504083e+00 1.776037152155568455e+00 4.338540983771763671e+00 -3.609963145053606937e+00 2.810411955027056319e+00 -1.043671268084174208e+00 -1.475196332213428052e+00 5.759621172324607130e-01 -8.527089597052168735e-01 9.644241803601940610e-01 -7.723571031369950157e-01 -9.902209008702838045e-01 1.137035356431496114e+00 -7.992059372693161023e-01 -2.078782440990323555e-01 3.883776323509380735e+00 -3.312986073939271581e+00 3.260580287172311076e-01 -2.407079734553001227e-01 7.276273416339069655e-01
-2.432209892648744542e+01 5.224657127170035409e+01 -4.184495643299391787e+01 2.691929890881726450e+01 -1.133485157950145350e+01 -4.581368136551017045e+00 5.418668441607914055e+00 -4.721462749988712737e+00 7.612938084579194686e-02 3.416864986007456029e+00 -1.915387904627712246e+00 1.300900115134859814e+00 -9.304157403410605598e-01 6.940752221505136488e-01 1.446934261540284483e+00 -1.833895730955714232e+00 1.069137481710279447e+00 7.471315977387903429e-01 -5.206532972119772396e+00 4.646086172638097977e+00 -9.512588298321154046e-01 4.764495021104730443e-01 -8.160183386215708046e-01
1.533381940780554942e+01 -4.184495643299391787e+01 1.006909570680676609e+02 -9.001875555992035061e+01 -3.451475916336282523e+01 4.163490105870881308e+01 1.599032505888508560e+01 -1.109541021072212708e+01 5.753834304617886808e+00 -5.207568591756271958e-01 -4.504124622286217239e+00 4.467889138659089987e+00 -1.979451375310257388e+00 1.428207880391368700e+00 2.455983409910902082e-01 -3.661844077828322330e-01 1.301366752271428284e+00 1.865718345450012861e-01 -5.661336629183209013e+00 4.110320821833330029e+00 -4.436445385268852210e-02 -9.273163347354730357e-01 3.336243824700811378e-01
-7.657303908462504083e+00 2.691929890881726450e+01 -9.001875555992035061e+01 1.219943530037234609e+02 -1.755683353726008988e+01 -1.486034955695616766e+01 -3.364530734833785885e+01 1.815403977068739394e+01 5.330083239917091653e+00 -5.787673063672293949e+00 8.949916505352897289e+00 -1.337407792820569874e+01 5.626279540052188999e+00 -3.353587794831017099e+00 -1.939256656091284045e-02 2.049939558614113921e-02 1.365089261756972094e+00 -8.149336646290846531e+00 -1.593034705295243825e+00 2.922427496009236236e+00 2.418471544653607364e+00 1.735086438573440581e+00 5.801075102971581243e-01
1.776037152155568455e+00 -1.133485157950145350e+01 -3.451475916336282523e+01 -1.755683353726008988e+01 1.576310085514577395e+02 -1.169557595696256698e+02 4.104142155819025817e+01 -1.993810599591465405e+01 -9.199632220440848940e+00 5.609782974523333188e+00 -8.606957001656226902e-01 4.352603470334472924e+00 2.000397845332385627e-01 -2.935281317572900339e-01 6.386731800524242386e-01 -5.216545146993613047e-01 -9.531848586959631997e-02 1.488251394396544747e+00 -4.845847551417503118e-01 8.827391178444837783e-01 -2.003420141528640397e-01 -1.571162986767073333e+00 -9.332852800342261723e-02
4.338540983771763671e+00 -4.581368136551017045e+00 4.163490105870881308e+01 -1.486034955695616766e+01 -1.169557595696256698e+02 1.788850067984545547e+02 -1.161726175113718540e+02 -1.824155088149085913e+01 3.722951336234645225e+01 1.822089554504272613e+01 -1.822518186211086544e+01 2.062249842740017414e+01 -2.513081540730243901e+01 1.287044852717752264e+01 5.701441320158269654e+00 -1.053843438992904424e+01 4.429603780088037013e+00 2.474040595293856626e+01 -1.978639881137895529e+01 1.263968084842567130e+01 -1.061985799126625452e+01 -5.387113217480632876e+00 -8.134892698422866442e-01
-3.609963145053606937e+00 5.418668441607914055e+00 1.599032505888508560e+01 -3.364530734833785885e+01 4.104142155819025817e+01 -1.161726175113718540e+02 1.694295840575620389e+02 -5.437639055615947115e+01 2.623850990846575915e+00 -3.516723107832262230e+01 1.435451051172955950e+01 3.222162989559810842e-01 -1.842212594999670827e+01 2.189731127507590713e+01 -1.902181569285956542e+01 3.228461102714651698e+00 -4.863952497098324557e+00 2.030310554237381027e+01 2.060639289458460510e+01 -1.956583996346799736e+01 -6.462280445941964935e+00 -1.842331321362554952e+00 -2.065992221782699811e+00
2.810411955027056319e+00 -4.721462749988712737e+00 -1.109541021072212708e+01 1.815403977068739394e+01 -1.993810599591465405e+01 -1.824155088149085913e+01 -5.437639055615947115e+01 2.012346773701846985e+02 -1.433541271828811432e+02 4.653186371227659635e+01 -1.956748341724615514e+01 -1.634725695145779811e+00 8.039707591790719476e+00 -3.267442313649244756e+00 8.227736047692134846e+00 -3.724004024363516852e+00 5.781830775284857893e+00 -9.284359805331549254e+00 -2.654749576699840574e+01 2.268517800068569201e+01 1.861784076616177952e+00 -1.086057555055923052e+00 1.511386856157765468e+00
-1.043671268084174208e+00 7.612938084579194686e-02 5.753834304617886808e+00 5.330083239917091653e+00 -9.199632220440848940e+00 3.722951336234645225e+01 2.623850990846575915e+00 -1.433541271828811432e+02 1.996795924035413066e+02 -1.309616133199795343e+02 -1.259115312344027870e+01 4.068068951966531444e+01 8.652590509943264507e+00 -7.261756692588662077e+00 1.155589151733675202e+01 -3.228134443858557301e+00 -4.085784906015216933e+00 5.498844145142581574e+00 -1.472529623873179538e+01 1.212553585632562303e+01 -2.619725312876233669e+00 6.554258795806483517e-01 -7.910864037361950984e-01
-1.475196332213428052e+00 3.416864986007456029e+00 -5.207568591756271958e-01 -5.787673063672293949e+00 5.609782974523333188e+00 1.822089554504272613e+01 -3.516723107832262230e+01 4.653186371227659635e+01 -1.309616133199795343e+02 2.050231620923374862e+02 -7.832272719934573502e+01 -1.766817048680164248e+01 -2.523801962490263406e+01 5.604515342927428811e+00 -2.903829488250302848e+00 1.337127124864552741e+01 -9.018253000914876694e+00 -4.537565087179325829e+00 7.267839671918275712e+01 -6.048117285047313629e+01 8.332814408542049689e-01 2.913611038688055821e+00 -2.121436706560488439e+00
5.759621172324607130e-01 -1.915387904627712246e+00 -4.504124622286217239e+00 8.949916505352897289e+00 -8.606957001656226902e-01 -1.822518186211086544e+01 1.435451051172955950e+01 -1.956748341724615514e+01 -1.259115312344027870e+01 -7.832272719934573502e+01 2.255353366533649933e+02 -1.439515471076909705e+02 7.531020566839718811e+01 -4.167059763260684946e+01 -3.788221335436109616e+00 6.749467480930080754e+00 4.450810630543437618e+00 -3.510936740882865337e+01 -2.067928130108034779e+01 2.200436634778799672e+01 1.435784250738115198e+01 5.897940047881299996e+00 2.999410141876153624e+00
-8.527089597052168735e-01 1.300900115134859814e+00 4.467889138659089987e+00 -1.337407792820569874e+01 4.352603470334472924e+00 2.062249842740017414e+01 3.222162989559810842e-01 -1.634725695145779811e+00 4.068068951966531444e+01 -1.766817048680164248e+01 -1.439515471076909705e+02 2.620094439724968538e+02 -2.689027245307896692e+02 1.016191451925127325e+02 4.640171585384572950e+01 -4.830056188387580818e+01 2.830546078080061889e+01 1.267562362513533429e+02 -1.748406454372760663e+02 1.236547165154022565e+02 -5.288020624787915125e+01 -3.703333668761484176e+01 -1.054810568719527941e+00
9.644241803601940610e-01 -9.304157403410605598e-01 -1.979451375310257388e+00 5.626279540052188999e+00 2.000397845332385627e-01 -2.513081540730243901e+01 -1.842212594999670827e+01 8.039707591790719476e+00 8.652590509943264507e+00 -2.523801962490263406e+01 7.531020566839718811e+01 -2.689027245307896692e+02 5.839023592146512556e+02 -3.894294442433576364e+02 -9.173356538671294302e+00 1.081568782887882350e+02 -6.181982179848619552e+01 -3.444185111762555493e+02 3.311311821450776165e+02 -2.214088698492690810e+02 1.412525470264524756e+02 8.807560198206526536e+01 1.554174029562684467e+01
-7.723571031369950157e-01 6.940752221505136488e-01 1.428207880391368700e+00 -3.353587794831017099e+00 -2.935281317572900339e-01 1.287044852717752264e+01 2.189731127507590713e+01 -3.267442313649244756e+00 -7.261756692588662077e+00 5.604515342927428811e+00 -4.167059763260684946e+01 1.016191451925127325e+02 -3.894294442433576364e+02 4.755931108838578325e+02 -1.425057023424922704e+02 -5.886350932625035881e+01 3.452077327022928444e+01 2.741529622474283201e+02 -2.596681594940621380e+02 1.811159982832207618e+02 -1.209752078734303211e+02 -6.791623844252907816e+01 -1.351901672842707747e+01
-9.902209008702838045e-01 1.446934261540284483e+00 2.455983409910902082e-01 -1.939256656091284045e-02 6.386731800524242386e-01 5.701441320158269654e+00 -1.902181569285956542e+01 8.227736047692134846e+00 1.155589151733675202e+01 -2.903829488250302848e+00 -3.788221335436109616e+00 4.640171585384572950e+01 -9.173356538671294302e+00 -1.425057023424922704e+02 2.400794701823535888e+02 -1.792956792626917490e+02 3.138582984045448754e+01 2.515489335475258414e+01 -6.417006226891290055e+01 5.501930999130374289e+01 2.834210966776290253e+00 -5.661727157052321324e+00 -1.161697304761181604e+00
1.137035356431496114e+00 -1.833895730955714232e+00 -3.661844077828322330e-01 2.049939558614113921e-02 -5.216545146993613047e-01 -1.053843438992904424e+01 3.228461102714651698e+00 -3.724004024363516852e+00 -3.228134443858557301e+00 1.337127124864552741e+01 6.749467480930080754e+00 -4.830056188387580818e+01 1.081568782887882350e+02 -5.886350932625035881e+01 -1.792956792626917490e+02 2.983596837029729727e+02 -1.505787385408951025e+02 -1.007539282739960811e+02 1.817399408509938894e+02 -1.524500322663519967e+02 6.872035320031325512e+01 3.215537051004270808e+01 -3.184204072141046726e+00
-7.992059372693161023e-01 1.069137481710279447e+00 1.301366752271428284e+00 1.365089261756972094e+00 -9.531848586959631997e-02 4.429603780088037013e+00 -4.863952497098324557e+00 5.781830775284857893e+00 -4.085784906015216933e+00 -9.018253000914876694e+00 4.450810630543437618e+00 2.830546078080061889e+01 -6.181982179848619552e+01 3.452077327022928444e+01 3.138582984045448754e+01 -1.505787385408951025e+02 2.834361801812467547e+02 -1.103742556523487934e+02 -1.133915422380968607e+02 1.084268925701416748e+02 -3.713437396884358321e+01 -1.732989764142075018e+01 5.018169342462520000e+00
-2.078782440990323555e-01 7.471315977387903429e-01 1.865718345450012861e-01 -8.149336646290846531e+00 1.488251394396544747e+00 2.474040595293856626e+01 2.030310554237381027e+01 -9.284359805331549254e+00 5.498844145142581574e+00 -4.537565087179325829e+00 -3.510936740882865337e+01 1.267562362513533429e+02 -3.444185111762555493e+02 2.741529622474283201e+02 2.515489335475258414e+01 -1.007539282739960811e+02 -1.103742556523487934e+02 5.533027818891989682e+02 -3.612519277674758769e+02 1.456607310201988810e+02 -1.200889435095781153e+02 -6.822817263798721399e+01 -1.558766901584039388e+01
3.883776323509380735e+00 -5.206532972119772396e+00 -5.661336629183209013e+00 -1.593034705295243825e+00 -4.845847551417503118e-01 -1.978639881137895529e+01 2.060639289458460510e+01 -2.654749576699840574e+01 -1.472529623873179538e+01 7.267839671918275712e+01 -2.067928130108034779e+01 -1.748406454372760663e+02 3.311311821450776165e+02 -2.596681594940621380e+02 -6.417006226891290055e+01 1.817399408509938894e+02 -1.133915422380968607e+02 -3.612519277674758769e+02 8.227661540145846857e+02 -5.889251881384034277e+02 1.505009903985806829e+02 7.459360068624346241e+01 -9.689475113469024903e-01
-3.312986073939271581e+00 4.646086172638097977e+00 4.110320821833330029e+00 2.922427496009236236e+00 8.827391178444837783e-01 1.263968084842567130e+01 -1.956583996346799736e+01 2.268517800068569201e+01 1.212553585632562303e+01 -6.048117285047313629e+01 2.200436634778799672e+01 1.236547165154022565e+02 -2.214088698492690810e+02 1.811159982832207618e+02 5.501930999130374289e+01 -1.524500322663519967e+02 1.084268925701416748e+02 1.456607310201988810e+02 -5.889251881384034277e+02 6.281297406866601705e+02 -2.360284378048359315e+02 -3.788478747503720001e+01 -3.966409304890950338e+00
3.260580287172311076e-01 -9.512588298321154046e-01 -4.436445385268852210e-02 2.418471544653607364e+00 -2.003420141528640397e-01 -1.061985799126625452e+01 -6.462280445941964935e+00 1.861784076616177952e+00 -2.619725312876233669e+00 8.332814408542049689e-01 1.435784250738115198e+01 -5.288020624787915125e+01 1.412525470264524756e+02 -1.209752078734303211e+02 2.834210966776290253e+00 6.872035320031325512e+01 -3.713437396884358321e+01 -1.200889435095781153e+02 1.505009903985806829e+02 -2.360284378048359315e+02 1.984952390410417138e+02 -1.726639859088383133e+01 2.367061880986858213e+01
-2.407079734553001227e-01 4.764495021104730443e-01 -9.273163347354730357e-01 1.735086438573440581e+00 -1.571162986767073333e+00 -5.387113217480632876e+00 -1.842331321362554952e+00 -1.086057555055923052e+00 6.554258795806483517e-01 2.913611038688055821e+00 5.897940047881299996e+00 -3.703333668761484176e+01 8.807560198206526536e+01 -6.791623844252907816e+01 -5.661727157052321324e+00 3.215537051004270808e+01 -1.732989764142075018e+01 -6.822817263798721399e+01 7.459360068624346241e+01 -3.788478747503720001e+01 -1.726639859088383133e+01 8.664655681400094522e+01 -3.077439487873002122e+01
7.276273416339069655e-01 -8.160183386215708046e-01 3.336243824700811378e-01 5.801075102971581243e-01 -9.332852800342261723e-02 -8.134892698422866442e-01 -2.065992221782699811e+00 1.511386856157765468e+00 -7.910864037361950984e-01 -2.121436706560488439e+00 2.999410141876153624e+00 -1.054810568719527941e+00 1.554174029562684467e+01 -1.351901672842707747e+01 -1.161697304761181604e+00 -3.184204072141046726e+00 5.018169342462520000e+00 -1.558766901584039388e+01 -9.689475113469024903e-01 -3.966409304890950338e+00 2.367061880986858213e+01 -3.077439487873002122e+01 2.653581617274004500e+01
GROUPThe group of atoms being used=ga_list ... PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=d STRIDE the frequency with which the quantities of interest should be output=1 FILEthe name of the file on which to output these quantities=output FMT the format that should be used to output real numbers=%8.8f

Input

The atoms that serve as the input for this action are specified using one or more of the keywords in the following table.

Keyword Type Description
GROUP atoms The group of atoms being used

Full list of keywords

The following table describes the keywords and options that can be used with this action

Keyword Type Default Description
GROUP input none The group of atoms being used
PRECISION compulsory none Precision Matrix (inverse of covariance)
REFERENCE compulsory none Reference structure
NUMERICAL_DERIVATIVESThis keyword do not have examples optional false calculate the derivatives for these quantities numerically
NOPBCThis keyword do not have examples optional false ignore the periodic boundary conditions when calculating distances
SQUAREDThis keyword do not have examples optional false Returns the square of distance