Skip to content

Commit cbc684e

Browse files
committed
updated avatar
1 parent ae6f6e6 commit cbc684e

File tree

10 files changed

+3393
-3259
lines changed

10 files changed

+3393
-3259
lines changed

tutorial1/avatar/avatar.gro

Lines changed: 3242 additions & 3242 deletions
Large diffs are not rendered by default.

tutorial1/avatar/avatar.mdp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; File 'avatar.mdp' was generated
33
; By user: simon (1000)
44
; On host: laptop
5-
; At date: Thu Apr 17 11:46:50 2025
5+
; At date: Fri Apr 18 16:28:41 2025
66
;
77
; Created by:
88
; :-) GROMACS - gmx grompp, 2025.1 (-:
@@ -25,7 +25,7 @@ integrator = md
2525
; Start time and timestep in ps
2626
tinit = 0
2727
dt = 0.001
28-
nsteps = 4000
28+
nsteps = 2000
2929
; For exact run continuation or redoing part of a run
3030
init-step = 0
3131
; Part index is updated automatically on checkpointing (keeps files separate)
@@ -71,7 +71,7 @@ nstlog = 100
7171
nstcalcenergy = 100
7272
nstenergy = 100
7373
; Output frequency and precision for .xtc file
74-
nstxout-compressed = 2
74+
nstxout-compressed = 4
7575
compressed-x-precision = 1000
7676
; This selects the subset of atoms for the compressed
7777
; trajectory file. You can select multiple groups. By
@@ -175,7 +175,7 @@ annealing-temp =
175175
; GENERATE VELOCITIES FOR STARTUP RUN
176176
gen-vel = no
177177
gen-temp = 300
178-
gen-seed = -675160514
178+
gen-seed = -1611165825
179179

180180
; OPTIONS FOR BONDS
181181
constraints = hbonds

tutorial1/avatar/avatar.vmd

Lines changed: 81 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ atomselect macro qwikmd_hetero {(not name QWIKMDDELETE and hetero and not qwikmd
276276
# Display settings
277277
display eyesep 0.065000
278278
display focallength 2.000000
279-
display height 6.000000
279+
display height 1.000000
280280
display distance -2.000000
281281
display projection Orthographic
282282
display nearclip set 0.500000
@@ -300,13 +300,13 @@ mol addfile avatar.xtc type xtc first 0 last -1 step 1 filebonds 1 autobonds 1 w
300300
mol delrep 0 top
301301
mol representation VDW 0.900000 47.000000
302302
mol color Name
303-
mol selection {resid 2 14 18}
303+
mol selection {resid 2 18 }
304304
mol material Opaque
305305
mol addrep top
306306
mol selupdate 0 top 0
307307
mol colupdate 0 top 0
308308
mol scaleminmax top 0 0.000000 0.000000
309-
mol smoothrep top 0 0
309+
mol smoothrep top 0 1
310310
mol drawframes top 0 {now}
311311
mol clipplane center 0 0 top {0.0 0.0 0.0}
312312
mol clipplane color 0 0 top {0.5 0.5 0.5 }
@@ -332,15 +332,15 @@ mol clipplane center 5 0 top {0.0 0.0 0.0}
332332
mol clipplane color 5 0 top {0.5 0.5 0.5 }
333333
mol clipplane normal 5 0 top {0.0 0.0 1.0}
334334
mol clipplane status 5 0 top {0}
335-
mol representation DynamicBonds 1.600000 0.100000 42.000000
335+
mol representation DynamicBonds 1.300000 0.100000 42.000000
336336
mol color Name
337-
mol selection {type OW1 HW2 HW1 and same residue as (resname SOL and within 5 of resid 2 14 18)}
337+
mol selection {type OW1 HW2 HW1 and same residue as (resname SOL and within 5 of resid 2 18)}
338338
mol material Opaque
339339
mol addrep top
340340
mol selupdate 1 top 0
341341
mol colupdate 1 top 0
342342
mol scaleminmax top 1 0.000000 0.000000
343-
mol smoothrep top 1 0
343+
mol smoothrep top 1 1
344344
mol drawframes top 1 {now}
345345
mol clipplane center 0 1 top {0.0 0.0 0.0}
346346
mol clipplane color 0 1 top {0.5 0.5 0.5 }
@@ -374,7 +374,7 @@ mol addrep top
374374
mol selupdate 2 top 0
375375
mol colupdate 2 top 0
376376
mol scaleminmax top 2 0.000000 0.000000
377-
mol smoothrep top 2 0
377+
mol smoothrep top 2 1
378378
mol drawframes top 2 {now}
379379
mol clipplane center 0 2 top {0.0 0.0 0.0}
380380
mol clipplane color 0 2 top {0.5 0.5 0.5 }
@@ -400,11 +400,82 @@ mol clipplane center 5 2 top {0.0 0.0 0.0}
400400
mol clipplane color 5 2 top {0.5 0.5 0.5 }
401401
mol clipplane normal 5 2 top {0.0 0.0 1.0}
402402
mol clipplane status 5 2 top {0}
403+
mol showrep top 2 0
404+
mol representation VDW 0.900000 47.000000
405+
mol color Name
406+
mol selection {resname SO4 Na}
407+
mol material Opaque
408+
mol addrep top
409+
mol selupdate 3 top 0
410+
mol colupdate 3 top 0
411+
mol scaleminmax top 3 0.000000 0.000000
412+
mol smoothrep top 3 1
413+
mol drawframes top 3 {now}
414+
mol clipplane center 0 3 top {0.0 0.0 0.0}
415+
mol clipplane color 0 3 top {0.5 0.5 0.5 }
416+
mol clipplane normal 0 3 top {0.0 0.0 1.0}
417+
mol clipplane status 0 3 top {0}
418+
mol clipplane center 1 3 top {0.0 0.0 0.0}
419+
mol clipplane color 1 3 top {0.5 0.5 0.5 }
420+
mol clipplane normal 1 3 top {0.0 0.0 1.0}
421+
mol clipplane status 1 3 top {0}
422+
mol clipplane center 2 3 top {0.0 0.0 0.0}
423+
mol clipplane color 2 3 top {0.5 0.5 0.5 }
424+
mol clipplane normal 2 3 top {0.0 0.0 1.0}
425+
mol clipplane status 2 3 top {0}
426+
mol clipplane center 3 3 top {0.0 0.0 0.0}
427+
mol clipplane color 3 3 top {0.5 0.5 0.5 }
428+
mol clipplane normal 3 3 top {0.0 0.0 1.0}
429+
mol clipplane status 3 3 top {0}
430+
mol clipplane center 4 3 top {0.0 0.0 0.0}
431+
mol clipplane color 4 3 top {0.5 0.5 0.5 }
432+
mol clipplane normal 4 3 top {0.0 0.0 1.0}
433+
mol clipplane status 4 3 top {0}
434+
mol clipplane center 5 3 top {0.0 0.0 0.0}
435+
mol clipplane color 5 3 top {0.5 0.5 0.5 }
436+
mol clipplane normal 5 3 top {0.0 0.0 1.0}
437+
mol clipplane status 5 3 top {0}
438+
mol showrep top 3 0
439+
mol representation DynamicBonds 1.600000 0.100000 42.000000
440+
mol color Name
441+
mol selection {type OW1 HW2 HW1}
442+
mol material Opaque
443+
mol addrep top
444+
mol selupdate 4 top 0
445+
mol colupdate 4 top 0
446+
mol scaleminmax top 4 0.000000 0.000000
447+
mol smoothrep top 4 1
448+
mol drawframes top 4 {now}
449+
mol clipplane center 0 4 top {0.0 0.0 0.0}
450+
mol clipplane color 0 4 top {0.5 0.5 0.5 }
451+
mol clipplane normal 0 4 top {0.0 0.0 1.0}
452+
mol clipplane status 0 4 top {0}
453+
mol clipplane center 1 4 top {0.0 0.0 0.0}
454+
mol clipplane color 1 4 top {0.5 0.5 0.5 }
455+
mol clipplane normal 1 4 top {0.0 0.0 1.0}
456+
mol clipplane status 1 4 top {0}
457+
mol clipplane center 2 4 top {0.0 0.0 0.0}
458+
mol clipplane color 2 4 top {0.5 0.5 0.5 }
459+
mol clipplane normal 2 4 top {0.0 0.0 1.0}
460+
mol clipplane status 2 4 top {0}
461+
mol clipplane center 3 4 top {0.0 0.0 0.0}
462+
mol clipplane color 3 4 top {0.5 0.5 0.5 }
463+
mol clipplane normal 3 4 top {0.0 0.0 1.0}
464+
mol clipplane status 3 4 top {0}
465+
mol clipplane center 4 4 top {0.0 0.0 0.0}
466+
mol clipplane color 4 4 top {0.5 0.5 0.5 }
467+
mol clipplane normal 4 4 top {0.0 0.0 1.0}
468+
mol clipplane status 4 4 top {0}
469+
mol clipplane center 5 4 top {0.0 0.0 0.0}
470+
mol clipplane color 5 4 top {0.5 0.5 0.5 }
471+
mol clipplane normal 5 4 top {0.0 0.0 1.0}
472+
mol clipplane status 5 4 top {0}
473+
mol showrep top 4 0
403474
mol rename top avatar.gro
404-
set viewpoints([molinfo top]) {{{1 0 0 -14.8435} {0 1 0 -14.7803} {0 0 1 -14.6804} {0 0 0 1}} {{1 0 0 0} {0 1 0 0} {0 0 1 0} {0 0 0 1}} {{0.0704042 0 0 0} {0 0.0704042 0 0} {0 0 0.0704042 0} {0 0 0 1}} {{1 0 0 0} {0 1 0 0} {0 0 1 0} {0 0 0 1}}}
475+
set viewpoints([molinfo top]) {{{1 0 0 -22.1718} {0 1 0 -13.848} {0 0 1 -7.05399} {0 0 0 1}} {{0.969714 0.0937538 -0.225535 0} {-0.12632 0.982819 -0.134576 0} {0.209044 0.15899 0.964896 0} {0 0 0 1}} {{0.0258014 0 0 0} {0 0.0258014 0 0} {0 0 0.0258014 0} {0 0 0 1}} {{1 0 0 0.02} {0 1 0 0} {0 0 1 0} {0 0 0 1}}}
405476
lappend viewplist [molinfo top]
406477
set topmol [molinfo top]
407-
# done with molecule 1
478+
# done with molecule 0
408479
foreach v $viewplist {
409480
molinfo $v set {center_matrix rotate_matrix scale_matrix global_matrix} $viewpoints($v)
410481
}
@@ -574,7 +645,6 @@ color scale colors CET_R2 {0.0 0.0 0.0} {0.0 0.0 0.0} {0.0 0.0 0.0}
574645
{color Segname {} blue}
575646
{color Conformation {all} blue}
576647
{color Molecule {0} blue}
577-
{color Molecule {1} red}
578648
{color Molecule {avatar.gro} red}
579649
{color Structure {3_10_Helix} blue}
580650
{color Surface {Grasp} gray}
@@ -593,7 +663,7 @@ color scale colors CET_R2 {0.0 0.0 0.0} {0.0 0.0 0.0} {0.0 0.0 0.0}
593663
color change rgb 6 0.6000000238418579 0.6000000238418579 0.6000000238418579
594664
color change rgb 7 0.0 1.0 0.0
595665
color change rgb 9 1.0 0.6000000238418579 0.6000000238418579
596-
color change rgb 10 0.0 1.0 1.0
666+
color change rgb 10 0.0 0.5273631811141968 0.5273631811141968
597667
color change rgb 11 0.6499999761581421 0.0 0.6499999761581421
598668
color change rgb 12 0.5 0.8999999761581421 0.4000000059604645
599669
color change rgb 13 0.8999999761581421 0.4000000059604645 0.699999988079071

tutorial1/avatar/dark.par

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
PATTERN IBBPBBPBBPBBPBB
2+
FORCE_ENCODE_LAST_FRAME
3+
OUTPUT /home/simon/Git/GROMACS/inputs/tutorial1/avatar/dark.mpg
4+
INPUT_DIR /home/simon/Git/GROMACS/inputs/tutorial1/avatar
5+
INPUT
6+
dark.*.ppm [00000-00501]
7+
END_INPUT
8+
BASE_FILE_FORMAT PPM
9+
INPUT_CONVERT *
10+
GOP_SIZE 15
11+
SLICES_PER_FRAME 1
12+
PIXEL HALF
13+
RANGE 32
14+
PSEARCH_ALG LOGARITHMIC
15+
BSEARCH_ALG CROSS2
16+
IQSCALE 8
17+
PQSCALE 10
18+
BQSCALE 25
19+
REFERENCE_FRAME DECODED

tutorial1/avatar/dark.png

83.4 KB
Loading

tutorial1/avatar/dark.webp

3.1 MB
Loading

tutorial1/avatar/light.png

131 KB
Loading

tutorial1/avatar/light.webp

3.22 MB
Loading

tutorial1/avatar/make-video.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
set -e # Stop on error
3+
4+
# Function to process a sequence (dark or light)
5+
process_sequence() {
6+
prefix="$1"
7+
8+
echo "Processing: $prefix"
9+
10+
# Convert PPM to PNG
11+
for f in ${prefix}.*.ppm; do
12+
convert "$f" "${f%.ppm}.png"
13+
done
14+
15+
# Detect background color
16+
bg_color="black"
17+
if [[ "$prefix" == "light" ]]; then
18+
bg_color="white"
19+
fi
20+
21+
# Remove background & add alpha
22+
for f in ${prefix}.*.png; do
23+
convert "$f" -transparent "$bg_color" -fuzz 10% "${f%.png}_transparent.png"
24+
done
25+
26+
# Resize
27+
for f in ${prefix}.*_transparent.png; do
28+
convert "$f" -resize 50% "$f"
29+
done
30+
31+
# Create movie
32+
[ -f "${prefix}.webp" ] && rm "${prefix}.webp"
33+
34+
ffmpeg -framerate 20 -i "${prefix}.%05d_transparent.png" \
35+
-loop 0 -lossless 0 -qscale 5 -g 1 "${prefix}.webp"
36+
37+
# Cleanup PNGs
38+
rm ${prefix}.*.png
39+
convert ${prefix}.00000.ppm ${prefix}.png
40+
}
41+
42+
# Run for both dark and light sequences
43+
process_sequence "dark"
44+
process_sequence "light"
45+

tutorial1/inputs/avatar.mdp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
integrator = md
2-
nsteps = 4000
2+
nsteps = 2000
33
dt = 0.001
44

55
comm_mode = linear
@@ -11,7 +11,7 @@ ns_type = grid
1111

1212
nstlog = 100
1313
nstenergy = 100
14-
nstxout-compressed = 2
14+
nstxout-compressed = 4
1515

1616
vdw-type = Cut-off
1717
rvdw = 1.0

0 commit comments

Comments
 (0)