Skip to content

Commit d31dce3

Browse files
committed
polishing
1 parent 40db070 commit d31dce3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Materials Informatics HTML5 Player
1+
HTML5 Player for Materials Informatics
22
======
33

44
In-browser ultra-fast and lightweight renderer of the [crystallographic information files (CIF)](https://en.wikipedia.org/wiki/Crystallographic_Information_File) and VASP POSCAR structures, written in a pure JavaScript.
@@ -9,4 +9,4 @@ Development layout is inside ```src``` folder. The modular approach based on [re
99

1010
Additionally, CIF and POSCAR files from anywhere on the web can be displayed. A file URL must be then passed via **_document.location.hash_** property (browser's address bar, after sharp symbol). However if the file is served from another domain, PHP or Python proxy for remote requests should be used. There are examples of PHP and Python proxies (not for production use) in ```src``` folder. Obviously, it is safer to serve CIF files from the same domain.
1111

12-
_Let's cooperate on the further development! Your contribution will be very much appreciated._
12+
_Let's cooperate on the further development!_

src/js/libs/matinfio.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var custom_CIF_loop_props = {'_atom_site_occupancy': 'site occupancies', '_atom_
5353

5454
function detect_format(str){
5555
if (str.indexOf("_cell_angle_gamma ") > 0 && str.indexOf("loop_") > 0) return 'CIF';
56-
var lines = str.toString().replace(/(\r\n|\n|\r)/gm, "\n").split("\n");
56+
var lines = str.toString().replace(/(\r\n|\r)/gm, "\n").split("\n");
5757
if (lines.length > 6){
5858
if (lines[6].toLowerCase().substr(0, 6) == 'direct') return 'POSCAR';
5959
}
@@ -179,7 +179,7 @@ function jsobj2flatten(crystal){
179179
}
180180

181181
function cif2jsobj(str){
182-
var structures = [], symops = [], atprop_seq = [], lines = str.toString().replace(/(\r\n|\n|\r)/gm, "\n").split("\n"), cur_structure = {'cell': {}, 'atoms': []};
182+
var structures = [], symops = [], atprop_seq = [], lines = str.toString().replace(/(\r\n|\r)/gm, "\n").split("\n"), cur_structure = {'cell': {}, 'atoms': []};
183183
var loop_active = false, new_structure = false, symops_active = false;
184184
var cur_line = "", line_data = [], symmetry_seq = [];
185185
var cell_props = ['a', 'b', 'c', 'alpha', 'beta', 'gamma'];
@@ -283,7 +283,7 @@ function cif2jsobj(str){
283283
}
284284

285285
function poscar2jsobj(str){
286-
var lines = str.toString().replace(/(\r\n|\n|\r)/gm, "\n").split("\n"), cell = [], atoms = [], factor = 1.0, atindices = [], types = [];
286+
var lines = str.toString().replace(/(\r\n|\r)/gm, "\n").split("\n"), cell = [], atoms = [], factor = 1.0, atindices = [], types = [];
287287
var atom_props = ['x', 'y', 'z', 'symbol'];
288288
var i, j, len = lines.length, line_data = [], atidx = 0;
289289
for (i = 1; i < len; i++){

0 commit comments

Comments
 (0)