예제 #1
0
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

import os

from httk.core import citation
from httk.core.basic import is_sequence
citation.add_ext_citation('Atomic Simulation Environment (ASE)',
                          "S. R. Bahn, K. W. Jacobsen")
import httk.atomistic.data
from httk.core.httkobject import HttkPlugin, HttkPluginWrapper
from httk.atomistic import Cell
from httk.atomistic.spacegrouputils import get_symops_strs, spacegroup_get_number_and_setting

from httk import config
from httk.atomistic import Structure, UnitcellSites
import httk.iface
from httk.iface.ase_if import *
from httk.external.subimport import submodule_import_external

ase_major_version = None
ase_minor_version = None

try:
예제 #2
0
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""
  pyspglib external module
"""

import os, sys

from httk.core import citation
citation.add_ext_citation('spglib / pyspglib', "(Author list to be added)")

from httk import config
from httk.external.command import Command
from httk.external.subimport import submodule_import_external
import httk

try:
    pyspglib_path = config.get('paths', 'pyspglib')
except Exception:
    pyspglib_path = None

try:
    spglib_path = config.get('paths', 'spglib')
except Exception:
    spglib_path = None
예제 #3
0
파일: platon_ext.py 프로젝트: hpleva/httk
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero General Public License as
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

from httk.core import citation
citation.add_ext_citation('Platon', "A. L. Spek, Utrecht University, Padualaan 8, 3584 CH Utrecht, The Netherlands.")

import os, sys, tempfile

from httk import config
from httk.external.command import Command
import httk

if sys.version_info[0] == 3:
    from io import StringIO
else:
    from StringIO import StringIO

platon_path = None

def ensure_has_platon():
예제 #4
0
파일: isotropy_ext.py 프로젝트: hpleva/httk
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

from __future__ import print_function
import sys, os, tempfile

from httk.core import citation, IoAdapterString
citation.add_ext_citation(
    'isotropy',
    "Harold T. Stokes, Dorian M. Hatch, and Branton J. Campbell, Department of Physics and Astronomy, Brigham Young University, Provo, Utah 84606, USA"
)

from httk.core.basic import int_to_anonymous_symbol
from httk import config
from httk.external.command import Command
import httk.httkio
import httk.iface

from httk.atomistic.atomisticio.structure_cif_io import cif_to_struct
from httk.atomistic.data.periodictable import atomic_symbol, atomic_number

isotropy_path = None


def ensure_has_isotropy():
예제 #5
0
파일: jmol.py 프로젝트: hpleva/httk
#    it under the terms of the GNU Affero General Public License as
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

from __future__ import print_function
from httk.core import citation
citation.add_ext_citation(
    'Jmol',
    "An open-source Java viewer for chemical structures in 3D. http://www.jmol.org/"
)

import os, time, threading, subprocess, signal, sys, glob

import httk
from httk.iface.jmol_if import *
import distutils.spawn
from httk import config
from httk.core.basic import create_tmpdir, destroy_tmpdir, micro_pyawk
from httk.external.command import Command, find_executable

jmol_path = None
jmol_version = None
jmol_version_date = None
예제 #6
0
파일: aflow_ext.py 프로젝트: hpleva/httk
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero General Public License as
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

from httk.core import citation
citation.add_ext_citation('aflow', "(Author list to be added)")

from httk import config
from httk.external.command import Command
import httk

try:
    aflow_path = config.get('paths', 'aflow')
except Exception:
    aflow_path = None
    raise Exception("httk.external.aflow imported with no aflow path set in httk.cfg")


def aflow(ioa_in, args, timeout=30):
    ioa_in = httk.IoAdapterString.use(ioa_in)
    #
예제 #7
0
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

import os

from httk.core import citation
from httk.core.basic import is_sequence
citation.add_ext_citation(
    "Pymatgen",
    "Shyue Ping Ong, William Davidson Richards, Anubhav Jain, Geoffroy Hautier, Michael Kocher, \
Shreyas Cholia, Dan Gunter, Vincent Chevrier, Kristin A. Persson, Gerbrand Ceder. \
Python Materials Genomics (pymatgen) : A Robust, Open-Source Python Library for Materials Analysis. \
Computational Materials Science, 2013, 68, 314-319. \
doi:10.1016/j.commatsci.2012.10.028; and others")
import httk.atomistic.data
from httk.core.httkobject import HttkPlugin, HttkPluginWrapper

from httk import config
from httk.atomistic import Structure, UnitcellSites
import httk.iface
from httk.external.subimport import submodule_import_external
try:
    pymatgen_path = config.get('paths', 'pymatgen')
except Exception:
    pymatgen_path = None
예제 #8
0
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
import os, distutils, glob

from httk.core import citation, IoAdapterString
from httk.atomistic.atomisticio.structure_cif_io import struct_to_cif
from httk.atomistic import Structure
citation.add_ext_citation('cif2cell', "Torbjörn Björkman")

from httk import config
from httk.external.command import Command, find_executable
import httk
import httk.iface

cif2cell_path = None


def ensure_has_cif2cell():
    if cif2cell_path is None or cif2cell_path == "" or not os.path.exists(
            cif2cell_path):
        raise ImportError(
            "httk.external.cif2cell_ext imported with no access to cif2cell binary"
        )