Skip to content

Commit

Permalink
Remove functionality unused by Biotite
Browse files Browse the repository at this point in the history
  • Loading branch information
padix-key committed Aug 13, 2024
1 parent 1ade317 commit 94071d6
Show file tree
Hide file tree
Showing 75 changed files with 53 additions and 22,206 deletions.
63 changes: 22 additions & 41 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
"""MDTraj: A modern, open library for the analysis of molecular dynamics trajectories
MDTraj is a python library that allows users to manipulate molecular dynamics
(MD) trajectories and perform a variety of analyses, including fast RMSD,
solvent accessible surface area, hydrogen bonding, etc. A highlight of MDTraj
is the wide variety of molecular dynamics trajectory file formats which are
supported, including RCSB pdb, GROMACS xtc, and trr, CHARMM / NAMD dcd, AMBER
AMBER NetCDF, AMBER mdcrd, TINKER arc and MDTraj HDF5.
"""

import sys

from setuptools import Extension, find_packages, setup
Expand Down Expand Up @@ -75,31 +65,31 @@ def format_extensions():
compiler_args = compiler.compiler_args_warn

xtc = Extension(
"biotraj.formats.xtc",
"biotraj.xtc",
sources=[
"src/biotraj/formats/src/xdrfile.c",
"src/biotraj/formats/src/xdr_seek.c",
"src/biotraj/formats/src/xdrfile_xtc.c",
"src/biotraj/formats/xtc.pyx",
"src/biotraj/src/xdrfile.c",
"src/biotraj/src/xdr_seek.c",
"src/biotraj/src/xdrfile_xtc.c",
"src/biotraj/xtc.pyx",
],
include_dirs=[
"src/biotraj/formats/include/",
"src/biotraj/formats/",
"src/biotraj/include/",
"src/biotraj/",
],
extra_compile_args=compiler_args,
)

trr = Extension(
"biotraj.formats.trr",
"biotraj.trr",
sources=[
"src/biotraj/formats/src/xdrfile.c",
"src/biotraj/formats/src/xdr_seek.c",
"src/biotraj/formats/src/xdrfile_trr.c",
"src/biotraj/formats/trr.pyx",
"src/biotraj/src/xdrfile.c",
"src/biotraj/src/xdr_seek.c",
"src/biotraj/src/xdrfile_trr.c",
"src/biotraj/trr.pyx",
],
include_dirs=[
"src/biotraj/formats/include/",
"src/biotraj/formats/",
"src/biotraj/include/",
"src/biotraj/",
],
extra_compile_args=compiler_args,
)
Expand All @@ -118,14 +108,14 @@ def format_extensions():
zlib_library_dirs += [f"{sys.prefix}/lib"]

dcd = Extension(
"biotraj.formats.dcd",
"biotraj.dcd",
sources=[
"src/biotraj/formats/src/dcdplugin.c",
"src/biotraj/formats/dcd.pyx",
"src/biotraj/src/dcdplugin.c",
"src/biotraj/dcd.pyx",
],
include_dirs=[
"src/biotraj/formats/include/",
"src/biotraj/formats/",
"src/biotraj/include/",
"src/biotraj/",
],
extra_compile_args=compiler_args,
)
Expand All @@ -137,32 +127,23 @@ def format_extensions():

metadata = dict(
name="biotraj",
author="Robert McGibbon",
author_email="rmcgibbo@gmail.com",
author="Robert McGibbon, Patrick Kunzmann, Jan Krumbach",
author_email="padix.key@gmail.com",
description=DOCLINES[0],
long_description="\n".join(DOCLINES[2:]),
version=__version__,
license="LGPLv2.1+",
# url="http://biotraj.org",
# download_url="https://github.com/rmcgibbo/src/biotraj/releases/latest",
platforms=["Linux", "Mac OS-X", "Unix", "Windows"],
python_requires=">=3.9",
python_requires=">=3.10",
classifiers=CLASSIFIERS.splitlines(),
cmdclass={"build_ext": build_ext},
install_requires=[
"numpy>=2.0",
"scipy>=1.14",
"pyparsing",
"packaging",
],
package_data={"biotraj.formats.pdb": ["data/*"]},
zip_safe=False,
entry_points={
"console_scripts": [
"mdconvert = biotraj.scripts.mdconvert:entry_point",
"mdinspect = biotraj.scripts.mdinspect:entry_point",
],
},
packages=find_packages(where="src"),
package_dir={"": "src"},
)
Expand Down
File renamed without changes.
99 changes: 8 additions & 91 deletions src/biotraj/__init__.py
Original file line number Diff line number Diff line change
@@ -1,94 +1,11 @@
##############################################################################
### Original MDTraj disclaimer below:
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 2.1
# of the License, or (at your option) any later version.
#
# This library 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with biotraj. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
from .dcd import DCDTrajectoryFile
from .netcdf import NetCDFTrajectoryFile
from .trr import TRRTrajectoryFile
from .xtc import XTCTrajectoryFile

"""
The biotraj package contains tools for loading and saving MD trajectories
in different formats, forked from MDTraj.
The mdtraj package contains tools for loading and saving molecular dynamics
trajectories in a variety of formats, including Gromacs XTC & TRR, CHARMM/NAMD
DCD, PDB, and HDF5.
"""

# silence cython related numpy warnings, see github.com/numpy/numpy/pull/432
import numpy as _ # noqa
from .core import element
from .core.topology import Amide, Aromatic, Double, Single, Topology, Triple
from .core.trajectory import (
Trajectory,
iterload,
join,
load,
load_frame,
load_topology,
open,
)
from .formats.dcd import load_dcd
from .formats.netcdf import load_netcdf
from .formats.pdb import load_pdb
from .formats.prmtop import load_prmtop
from .formats.psf import load_psf
from .formats.registry import FormatRegistry
from .formats.trr import load_trr
from .formats.xtc import load_xtc
from .formats.xyzfile import load_xyz

from .core.trajectory import *

__name__ = "biotraj"
__all__ = (
"element",
"Amide",
"Aromatic",
"Double",
"Single",
"Topology",
"Triple",
"load_dcd",
"load_lammpstrj",
"load_netcdf",
"load_pdb",
"load_prmtop",
"load_psf",
"load_trr",
"load_xtc",
"load_xyz",
"FormatRegistry",
"open",
"load",
"iterload",
"load_frame",
"load_topology",
"join",
"Trajectory",
"DCDTrajectoryFile",
"NetCDFTrajectoryFile",
"TRRTrajectoryFile",
"XTCTrajectoryFile",
)


def capi():
import os
import sys

module_path = sys.modules["biotraj"].__path__[0]
return {
"lib_dir": os.path.join(module_path, "core", "lib"),
"include_dir": os.path.join(module_path, "core", "lib"),
}
Empty file removed src/biotraj/core/__init__.py
Empty file.
Loading

0 comments on commit 94071d6

Please sign in to comment.