Skip to content

Commit f7de4be

Browse files
committed
Fix unused variable and cp failure for CI
1 parent f9b928d commit f7de4be

2 files changed

Lines changed: 2 additions & 45 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Convert PET-MAD
6161
run: |
6262
uv run scripts/convert_pet_mad.py --output pet-mad.gguf
63-
cp pet-mad.gguf build/tests/
63+
cp -f pet-mad.gguf build/tests/
6464
6565
- name: Run tests
6666
working-directory: build

website/src/workers/mdWorker.ts

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -199,49 +199,6 @@ function calculateKineticEnergy(velocities: Float64Array, masses: Float64Array,
199199
return { ke, temp }
200200
}
201201

202-
// Velocity Verlet position update
203-
function velocityVerletPositions(
204-
positions: Float64Array,
205-
velocities: Float64Array,
206-
forces: Float64Array,
207-
masses: Float64Array,
208-
numAtoms: number,
209-
dt: number
210-
): void {
211-
// r(t+dt) = r(t) + v(t)*dt + 0.5*a(t)*dt^2
212-
// a = F/m with conversion factor
213-
for (let i = 0; i < numAtoms; i++) {
214-
const mass = masses[i]
215-
const accelFactor = EV_A_AMU_TO_A_FS2 / mass
216-
for (let j = 0; j < 3; j++) {
217-
const idx = i * 3 + j
218-
const accel = forces[idx] * accelFactor // A/fs^2
219-
positions[idx] += velocities[idx] * dt + 0.5 * accel * dt * dt
220-
}
221-
}
222-
}
223-
224-
// Velocity Verlet velocity update
225-
function velocityVerletVelocities(
226-
velocities: Float64Array,
227-
forcesOld: Float64Array,
228-
forcesNew: Float64Array,
229-
masses: Float64Array,
230-
numAtoms: number,
231-
dt: number
232-
): void {
233-
// v(t+dt) = v(t) + 0.5*(a(t) + a(t+dt))*dt
234-
for (let i = 0; i < numAtoms; i++) {
235-
const mass = masses[i]
236-
const accelFactor = EV_A_AMU_TO_A_FS2 / mass
237-
for (let j = 0; j < 3; j++) {
238-
const idx = i * 3 + j
239-
const accelOld = forcesOld[idx] * accelFactor
240-
const accelNew = forcesNew[idx] * accelFactor
241-
velocities[idx] += 0.5 * (accelOld + accelNew) * dt
242-
}
243-
}
244-
}
245202

246203
// Berendsen thermostat velocity scaling
247204
function berendsenThermostat(
@@ -494,7 +451,7 @@ function calculateMaxStress(stress: Float64Array): number {
494451
// The cell gradient is: dE/dh = -V * stress * (h^-T) where h is the cell matrix
495452
// For simplicity, we use: cell_force = -V * stress (works for orthogonal cells)
496453
// Stress in eV/A^3, cell in A, so cell_force is in eV/A^2
497-
function stressToCellForce(stress: Float64Array, cell: Float64Array, volume: number): Float64Array {
454+
function stressToCellForce(stress: Float64Array, _cell: Float64Array, volume: number): Float64Array {
498455
// Convert Voigt [xx, yy, zz, yz, xz, xy] to 3x3 symmetric tensor
499456
// Then multiply by -volume to get the "force" on the cell
500457
// For a general cell, the gradient is more complex, but this approximation works

0 commit comments

Comments
 (0)