Skip to content

Commit

Permalink
Merge pull request #36 from stan-donarise/theme-plugin
Browse files Browse the repository at this point in the history
theme plugin
  • Loading branch information
blokhin authored Jun 25, 2024
2 parents 6274a7e + 3a7d35d commit 8a7b9bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 4 additions & 6 deletions matinfio/cell/cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@ namespace $ {
export function $optimade_cifplayer_matinfio_cell_params_from_matrix( matrix: number[][] ) {
const norms: number[] = matrix.map( vec => math.norm( vec ) )
const angles = []
let j = -1
let k = -2
for( let i = 0; i < 3; i++ ) {
j = i - 1
k = i - 2
const lenmult = norms[ j ] * norms[ k ]
const j = i - 1
const k = i - 2
const lenmult = norms.at(j)! * norms.at(k)!
const tau = lenmult > 1e-16
? 180 / Math.PI * Math.acos( math.dot( matrix[ j ], matrix[ k ] ) / lenmult )
? 180 / Math.PI * Math.acos( math.dot( matrix.at(j), matrix.at(k) ) / lenmult )
: 90.0
angles.push( tau )
}
Expand Down
3 changes: 3 additions & 0 deletions player/player.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ $optimade_cifplayer_player $mol_view
<= spread_c? 1
spread_cells_limit 50
-
plugins /
<= Theme $mol_theme_auto
-
auto /
<= dir_light null
<= ambient_light null
Expand Down

0 comments on commit 8a7b9bc

Please sign in to comment.