From school course of physics it is known that atoms in solid body are arranged in periodically repeating structural units about a nanometer in size forming crystal grid. The solid state physics
CIF is created in the 90th in the international union of crystallography (IUCR). The basis of CIF is made by the text container under the name STAR (Self-Defining Text Archive and Retrieval) where the physical properties received as a result of diffractometry or theoretical calculations are marked by standard tags. Standard tags determine the parameters of low-level cell, its symmetry which are its part atoms, metadata of the corresponding scientific publication and other. These tags are set in the external CIF dictionaries similar to XSD schemes of XML documents so validation of the CIF document according to the CIF dictionary and even output of new physical properties on the basis of the available is possible. Differences that CIF resolves any tags which are ignored by the CIF parser (certainly, later they can become part of the standard and to be included in new dictionaries on solution of the IUCR union). Besides, CIF supports relational data model when, for example, it is possible to refer to certain atoms in crystal structure on their identifiers. The lack of lack of convenient support of multi-level hierarchies, here the STAR container loses XML. By the way, for this reason CIF have XML the competitor under the name CML (Chemical Markup Language).
Shortly about four models from the data folder:
- adsorption.cif — model of above-mentioned adsorption of water on perovskite (see the picture), low-level cell, is by default loaded into each of engines,
- fullerene.cif — fulleren C60,
- lfp.cif — phosphate of LiFePO4 lithium-iron, material of the cathode of lities - the ion battery. Pay attention to lithium ion: it very easy and mobile (and all because lithium — the third in Mendeleyev's table). The third electron of lithium comes or goes to external chain as a result of discharging or battery charging while the ion of lithium travels through electrolyte.
- mdma.cif — 3,4-metilendioksi-N-methamphetamine hydrochloride. Its functional groups can be replaced with saving of the corresponding effect, thus is formed new and therefore legal substance. In it the problem of synthetic analogs also consists.
Now, actually, results of comparison of engines.
||The total amount of code (in GZip brackets)
||Technology of drawing
||2,1 MB (700 KB)
||rich, programmatically and in UI
|ChemDoodle Web Components
||354 KB (121 KB)
||1,1 MB (462 KB)
||canvas, SDL, asm.js
||265 KB (83 KB)
||limited, in UI
The solution on the basis of Java-applets, Flash-and other plug-ins was not considered
ChemDoodle Web Components is based on proprietary product. It has advantages (fine documentation, high quality as code, and product in general) and shortcomings (restrictions on use, not disconnected sending data on users). It is also possible to refer lack of support of canvas in favor of WebGL to shortcomings, so, nonserviceability on slightly obsolete equipment. If shortcomings do not represent problem, it is possible to call this engine the winner.
Player.html is written by me with use of Three.js and Math.js. Emphasis is put on minimalism and speed, and also support of wider row of the equipment so the engine works even at ancient laptops. Development is begun relatively recently, and the functionality is still not really rich. Therefore I appreciate any criticism and I am eager.
This article is a translation of the original post at habrahabr.ru/post/265673/
If you have any questions regarding the material covered in the article above, please, contact the original author of the post.
If you have any complaints about this article or you want this article to be deleted, please, drop an email here: firstname.lastname@example.org.
We believe that the knowledge, which is available at the most popular Russian IT blog habrahabr.ru, should be accessed by everyone, even though it is poorly translated.
Shared knowledge makes the world better.