import{p as a}from"./index-Bkuhln3H.js";function c(t){const e=a(t);if(!e?.sites?.length)return null;let r=!1;const o=e.sites.map(n=>{const s=n.properties?.selective_dynamics;return s&&(r=!0),s?s[0]||s[1]||s[2]:!0});return r?o:null}function f(t,e){const r=t.frames?.[0]?.structure?.sites?.length;if(!r||r!==e.length)return!1;for(const o of t.frames){const n=o.structure?.sites;!n||n.length!==e.length||n.forEach((s,i)=>{s.properties={...s.properties,move_mask:e[i],selective_dynamics:e[i]?[!0,!0,!0]:[!1,!1,!1]}})}return!0}function l(t){const e=t.frames?.[0]?.structure?.sites?.[0]?.properties;return!!(e&&(e.selective_dynamics||e.move_mask!==void 0))}export{f as apply_move_mask,l as has_constraints,c as move_mask_from_poscar};
