Giter Site home page Giter Site logo

molmod / yaff Goto Github PK

View Code? Open in Web Editor NEW
31.0 6.0 18.0 18.91 MB

Yaff is yet another force-field code

Home Page: http://molmod.github.io/yaff

License: GNU General Public License v3.0

Python 78.07% C 13.52% Batchfile 0.11% Shell 0.10% Cython 8.21%

yaff's Introduction

https://travis-ci.org/molmod/yaff.svg?branch=master https://ci.appveyor.com/api/projects/status/bwgl6x2wslkv09so/branch/master?svg=true

Yaff stands for "Yet another force field". It is a pythonic force-field code used by Toon and Louis to test-drive their new models. The original motivation to develop Yaff was to provide a good reference implementation of the force fields developed at the Center for Molecular Modeling (CMM) at Ghent University. In its current version, Yaff is general and flexible enough to handle a large variety of force field models.

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

Yaff 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

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

pip install numpy Cython
pip install yaff

Alternatively, you can install Yaff in your home directory:

pip install numpy Cython --user
pip install yaff --user

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

conda install -c molmod yaff

Testing

The tests can be executed as follows:

nosetests yaff

yaff's People

Contributors

aranlamaire avatar jan-janssen avatar jellewieme avatar lvduyfhu avatar molmod-bot avatar sanderborgmans avatar svandenhaute avatar svenrogge 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

yaff's Issues

HDF5 version > 1.10 not working

Dear maintainers,

I am part of the EasyBuild community and I am trying to build YAFF-1.6.0 with HDF5 version 1.12.x. Due to a change of the API that build is failing.
As we want to use YAFF for testing LAMMPS (see PR #15869 and for dependency reasons we got HDF5-1.12.x in our toolchain, it would be highly desirable to look into that and make the software compatible with newer versions of HDF5.

Please let me know if you require any further information.

Thanks for your help, much appreciated!

Units of MM3 covalent terms

There is some confusion about the implementation of the MM3Quartic and MM3Bend ValenceTerms in Yaff. The expression for the MM3Quartic term for example looks like this:

0.5K(q-q0)^2*(1-2.55*(q-q0)+7/12*(2.55*(q-q0))^2)

The constant 2.55 has a dimension of [1/length] and thus depends on the internal units used. The original paper is not clear whether 2.55 is the value in angstrom^-1 or in bohr^-1. Here it is mentioned that 2.55 is the value in angstrom^-1. This is confirmed by the implementation in pydlpoly.
If this is correct, the Yaff implementation needs to be changed. Because Yaff uses atomic units, 2.55 has to be expressed in bohr^-1.

yaff 1.6.0 tests fail

I'm trying to build yaff 1.6.0 using Python 3.8.6, GCC 10.2.0, h5py 3.1.0.
I believe the error has to do something with my system but wanted to confirm with you and hear your opinion on what might have gone wrong.

I have many tests failing with:

======================================================================
ERROR: yaff.analysis.test.test_basic.test_plot_energies_nve
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/apps/USE/easybuild/staging/2021.1/software/Python/3.8.6-GCCcore-10.2.0/lib/python3.8/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/test/test_basic.py", line 35, in test_plot_energies_nve
    with run_nve_water32(__name__, 'test_plot_energies_nve') as (dn_tmp, nve, f):
  File "/home/apps/USE/easybuild/staging/2021.1/software/Python/3.8.6-GCCcore-10.2.0/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/test/common.py", line 43, in run_nve_water32
    with h5.File('%s/output.h5' % dn_tmp) as f:
  File "/home/apps/USE/easybuild/staging/2021.1/software/h5py/3.1.0-foss-2020b/lib/python3.8/site-packages/h5py/_hl/files.py", line 424, in __init__
    fid = make_fid(name, mode, userblock_size,
  File "/home/apps/USE/easybuild/staging/2021.1/software/h5py/3.1.0-foss-2020b/lib/python3.8/site-packages/h5py/_hl/files.py", line 190, in make_fid
    fid = h5f.open(name, flags, fapl=fapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5f.pyx", line 96, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = '/dev/shm/build/eb-8sh04g0l/test_plot_energies_nveujdetjpqyaff.analysis.test.test_basic/output.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

and the final error:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Standard error
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
analysis.py:79: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  a, b = np.linalg.lstsq(dm, ev)[0]
analysis.py:97: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  a, b, c = np.linalg.lstsq(dm, ev)[0]
/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/blav.py:93: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  error, b = np.linalg.lstsq(dm, ev)[0]
Traceback (most recent call last):
  File "analysis.py", line 68, in <module>
    spectrum = Spectrum(f, start=nskip, path='trajectory/press', bsize=len(press)-nskip)
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/spectrum.py", line 126, in __init__
    AnalysisHook.__init__(self, f, start, end, None, step, analysis_inputs, outpath, True)
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/hook.py", line 104, in __init__
    self.compute_offline()
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/hook.py", line 138, in compute_offline
    self.init_first()
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/spectrum.py", line 179, in init_first
    AnalysisHook.init_first(self)
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/hook.py", line 150, in init_first
    self.outg = self.f.create_group(self.outpath)
  File "/home/apps/USE/easybuild/staging/2021.1/software/h5py/3.1.0-foss-2020b/lib/python3.8/site-packages/h5py/_hl/group.py", line 65, in create_group
    gid = h5g.create(self.id, name, lcpl=lcpl, gcpl=gcpl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5g.pyx", line 162, in h5py.h5g.create
ValueError: Unable to create group (no write intent on file)
Traceback (most recent call last):
  File "runall.py", line 32, in <module>
    subprocess.check_call(["python", "analysis.py", "300", "310", "10"], cwd='nvt')
  File "/home/apps/USE/easybuild/staging/2021.1/software/Python/3.8.6-GCCcore-10.2.0/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', 'analysis.py', '300', '310', '10']' returned non-zero exit status 1.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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.