[Documentation] Benchmark lammpsparser
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Documentazione
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- documentation
Direzione di ricerca
L’issue fornisce codice e risultati di benchmark Python per la creazione di strutture ase e la scrittura con lammpsparser, ma non indica alcun file di documentazione né alcun punto di ingresso. Individua innanzitutto l’area della documentazione del repository, quindi determina dove devono essere inseriti questi benchmark e verifica che i risultati documentati e l’avvertenza sull’hardware siano inclusi correttamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
LAMMPS simulation can typically have multiple million atoms, while the ase package was initially designed for quantum mechanical simulations with thousand or less atoms. So here we present some simple benchmarks to check the performance of the ase package and the lammpsparser package.
Here is the code I used for benchmarking:
import sys
from time import time
from ase.build import bulk
from pickle import dumps
from tqdm import tqdm
def create(size):
structure = bulk("Al", cubic=True)
t1 = time()
structure = structure.repeat([size, size, size])
t2 = time()
size_in_mb = sys.getsizeof(dumps(structure)) / 1024/ 1024
size_in_number_of_atoms = len(structure)
time_in_seconds = t2-t1
return size_in_number_of_atoms, size_in_mb, time_in_seconds
if __name__ == "__main__":
print([create(size=i) for i in tqdm(range(10,150,10))])
The results are:
[
(4000, 0.12269783020019531, 0.003361940383911133),
(32000, 0.977198600769043, 0.025606155395507812),
(108000, 3.2965383529663086, 0.08634591102600098),
(256000, 7.813139915466309, 0.2064661979675293),
(500000, 15.259428977966309, 0.398144006729126),
(864000, 26.36782741546631, 0.6865091323852539),
(1372000, 41.87075710296631, 1.0926802158355713),
(2048000, 62.50063991546631, 1.6208710670471191),
(2916000, 88.98989772796631, 2.3232688903808594),
(4000000, 122.07095241546631, 3.1425390243530273),
(5324000, 162.4762258529663, 4.220289707183838),
(6912000, 210.9381399154663, 5.514358997344971),
(8788000, 268.1891164779663, 6.996487855911255),
(10976000, 334.9615774154663, 8.698269128799438)
]
I then adjusted the test to benchmark the write performance of the lammpsparser package:
import os
from time import time
from ase.build import bulk
from pickle import dumps
from tqdm import tqdm
from lammpsparser import write_lammps_structure
def create(size):
structure = bulk("Al", cubic=True)
structure = structure.repeat([size, size, size])
file_name = "lammps.data"
t1 = time()
write_lammps_structure(
structure=structure,
potential_elements=["Al"],
units="metal",
file_name=file_name,
working_directory=".",
)
t2 = time()
size_in_mb = os.path.getsize(file_name) / 1024/ 1024
size_in_number_of_atoms = len(structure)
time_in_seconds = t2-t1
return size_in_number_of_atoms, size_in_mb, time_in_seconds
if __name__ == "__main__":
print([create(size=i) for i in tqdm(range(10,150,10))])
The results are:
[
(4000, 0.24039363861083984, 0.034101009368896484),
(32000, 1.961777687072754, 0.27594637870788574),
(108000, 6.7177534103393555, 0.8314297199249268),
(256000, 16.236376762390137, 1.995485782623291),
(500000, 32.009196281433105, 3.9114339351654053),
(864000, 55.61549663543701, 6.88223123550415),
(1372000, 88.98933124542236, 11.129390001296997),
(2048000, 133.64513111114502, 16.53383994102478),
(2916000, 191.05537128448486, 23.77317786216736),
(4000000, 262.8222246170044, 32.67567992210388),
(5324000, 350.5478639602661, 42.83903193473816),
(6912000, 455.8344621658325, 54.94189381599426),
(8788000, 580.2841920852661, 71.13963007926941),
(10976000, 726.4300146102905, 88.48472595214844)
]
All the benchmarks were done on an MacBook Pro with an Apple M2 Max processor and 32GB of memory. So your results may vary depending on your hardware.
- Lingua principale
- Python
- Stelle
- 6
- Fork
- 5
- Merge medio
- 1h 39m
- PR unite (30g)
- 7
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pyiron/lammpsparser
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
pyiron/lammpsparser#367 ·
-
documentation
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
pyiron/lammpsparser#364 ·
Tutte le issue di pyiron/lammpsparser
Issue simili
-
bug server
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sportsdataverse/sportsdataverse-py#641 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
googleapis/google-cloud-python#18532 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno