initial commit

This commit is contained in:
2017-10-10 14:11:20 +01:00
commit c1641bda46
18 changed files with 1057 additions and 0 deletions

11
xyz.php Normal file
View File

@@ -0,0 +1,11 @@
<pre><?php
$sDir = 'C:\Users\Rik\Google Drive\PhD\Project\Tetrafluoroborate\33\Coordinates';
$aMolecules = [];
foreach (glob(sprintf('%s/*.xyz', $sDir)) as $sFile) {
$sName = substr(basename($sFile, '.xyz'), 3);
$sContents = file_get_contents($sFile);
$sContents = str_replace("\r", null, $sContents);
$sContents = str_replace("\n\n", sprintf("\n%s\n", $sName), $sContents);
$aMolecules[] = $sContents;
}
echo implode("\n", $aMolecules);