Giter Club home page Giter Club logo

molmod's Introduction

image

image

image

MolMod is a collection of molecular modelling tools for python. It is used by other software developed at the CMM, including Yaff, TAMkin and Zeobuilder.

More information about MolMod can be found on the CMM Code website: http://molmod.ugent.be/software

MolMod is distributed as open source software under the conditions of the GPL license version 3. Read the file COPYING for more details, or visit http://www.gnu.org/licenses/

Installation

MolMod can be installed with pip (system wide or in a virtual environment):

pip install Cython numpy
pip install molmod

Alternatively, you can install MolMod in your home directory:

pip install Cython numpy --user
pip install molmod --user

Lastly, you can also install MolMod with conda. (See https://www.continuum.io/downloads)

# Using the builds from Travis-CI ...
conda install -c molmod molmod
# ... or using the packages on conda-force
conda install -c conda-forge molmod

Testing

The tests can be executed as follows:

pytest molmod

molmod's People

Contributors

annekegh avatar jan-janssen avatar lvduyfhu avatar ondrejmarsalek avatar tovrstra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

molmod's Issues

parse multiple molecules

Hello, we are new to both Python and MolMod, we would like to parse the molecules
in a xyz trajectory file using MolMod and calculated related proproperties. We found
that the Molecule.from_file only reads the first structure, is it possible to read in
multiple structures?

thank you

Tests fail: No module named ext

Tests fail in the FreeBSD port:

$ nosetests molmod
E
======================================================================
ERROR: Failure: ImportError (No module named ext)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/local/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/local/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/ports/science/py-molmod/work-py27/molmod-1.4.4/molmod/__init__.py", line 67, in <module>
    from molmod.similarity import *
  File "/usr/ports/science/py-molmod/work-py27/molmod-1.4.4/molmod/similarity.py", line 45, in <module>
    from molmod.ext import similarity_table_labels, similarity_table_distances, \
ImportError: No module named ext

----------------------------------------------------------------------
Ran 1 test in 0.002s

molmod 1.4.8: Failing tests

I'm using Python 3.8.6 and matplot lib 3.3.3.
GCC is 10.2.0.

The compilation is done with:
export MATPLOTLIBRC=$PWD; echo 'backend: agg' > $MATPLOTLIBRC/matplotlibrc;python setup.py build_ext -i; nosetests -v

While building MolMod 1.4.8 with Python 3.8.6, I get the following error:

======================================================================
ERROR: test_fingerprint_collisions (molmod.test.test_molecular_graphs.MolecularGraphTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/dev/shm/build/molmod/1.4.8/foss-2020b/molmod-1.4.8/molmod/test/test_molecular_graphs.py", line 387, in test_fingerprint_collisions
    g0 = Molecule.from_file(pkg_resources.resource_filename("../data/test/" + fn0))
TypeError: resource_filename() missing 1 required positional argument: 'resource_name'

======================================================================
FAIL: test_check_anagrad_full_prec (molmod.test.test_minimizer.MinimizerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/dev/shm/build/molmod/1.4.8/foss-2020b/molmod-1.4.8/molmod/test/test_minimizer.py", line 243, in test_check_anagrad_full_prec
    check_anagrad(prec_fun, x_init, 1e-5, 1e-4)
  File "/dev/shm/build/molmod/1.4.8/foss-2020b/molmod-1.4.8/molmod/minimizer.py", line 1608, in check_anagrad
    raise AssertionError("Error in the analytical gradient, component %i, got %s, should be about %s" % (i, ana_grad[i], num_grad_comp))
AssertionError: Error in the analytical gradient, component 1, got 0.3081499243346107, should be about -0.3733645133952023

======================================================================
FAIL: test_shortest_vector (molmod.test.test_unit_cells.UnitCellTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/dev/shm/build/molmod/1.4.8/foss-2020b/molmod-1.4.8/molmod/test/test_unit_cells.py", line 175, in test_shortest_vector
    assert np.dot(change, r0) <= 0
AssertionError

----------------------------------------------------------------------

Get atom order

Hello,

First of all, great tool thanks for sharing!

I am parsing some SDF files downloaded from RCSB PDB using SDFReader.

I would like to be able to access the numbering of the atoms found in the original SDF e.g. (N1, C3, O3, etc).
Looking at the attributes of the graph and molecule classes I haven't found anything that seems to do the job.

Could it be that the ordering of the nodes can be used to retrieve the atom ordering in the original file?

Thanks!

version.py not available

The file version.py is listed in .gitignore, so it is not available, but it is needed to build the docs.

$ make html
mkdir -p _build/html _static
sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v1.6.3

Exception occurred:
  File "conf.py", line 62, in <module>
    with open('../molmod/version.py', 'r') as fh:
IOError: [Errno 2] No such file or directory: '../molmod/version.py'

nosetests 1 test failed

I downloaded and installed molmod using pip install molmod -user. After installation when i run nosetests -v molmod, i get the following error. Please help me to solve this:

======================================================================
FAIL: test_example_001 (molmod.test.test_meta.MetaTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/molmod/test/test_meta.py", line 49, in test_example_001
    self.check_example("001_molecules", "a_convert.py")
  File "/usr/local/lib/python2.7/dist-packages/molmod/test/test_meta.py", line 41, in check_example
    self.assertEqual(retcode, 0)
AssertionError: 256 != 0
-------------------- >> begin captured stdout << ---------------------
cd /usr/local/share/molmod/examples/001_molecules; PYTHONPATH=/home/minhaj/[email protected]/Temp_TAMUQ_Working_folder/NPRP-EP/DFT_Studies/CALCULATIONS/RAAD2/111Cu_FullML/Coadsorption/CplusO/AfterGeoms-3/004_DymMat_TS:${PYTHONPATH} ./a_convert.py 1> /dev/null 2> /dev/null

--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------
Ran 277 tests in 40.623s

FAILED (SKIP=3, failures=1)

incompatibel to newer python versions?

Hi,

installing molmod in anaconda using conda install -c molmod molmod gives some errors

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  • molmod -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0']

Your python: python=3.10

molmod not work with newer python versions?

Creating complete graph

Hi,

I'd like to create a complete graph. I have tried, for example,
MolecularGraph.from_geometry(mol, scaling=1.5)
and even
MolecularGraph.from_geometry(mol, scaling=150000.).
Can you please explain how to create a complete graph in your system?

Thanks!

Missing version.py

Trying to get the version from git describe
fatal: No names found, cannot describe anything.
Trying to get the version from molmod/version.py
Could not determine version. Giving up.

when launching python setup.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.