Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ITPParser doesn't like some relative paths #3037

Closed
richardjgowers opened this issue Nov 21, 2020 · 3 comments · Fixed by #3108
Closed

ITPParser doesn't like some relative paths #3037

richardjgowers opened this issue Nov 21, 2020 · 3 comments · Fixed by #3108

Comments

@richardjgowers
Copy link
Member

Actual behavior

Relative paths (when going "upwards"/../) in the ITPParser seem to fail.

I think that all is needed is for find_path to have an abspath call early on, as absolute paths seem to work fine.

Code to reproduce the behavior

cp file.itp ./
mkdir something
cd something
import MDAnalysis as mda
from MDAnalysis.tests.datafiles import PSF, DCD,  GRO, PDB, TPR, XTC, TRR,  PRMncdf, NCDF

u = mda.Universe('../file.itp', format='ITP')

....

Current version of MDAnalysis

  • Which version are you using? (run python -c "import MDAnalysis as mda; print(mda.__version__)")
  • Which version of Python (python -V)?
  • Which operating system?
@aditya-kamath
Copy link
Contributor

Hi @richardjgowers , I am student just learning how to develop code. In this situation, I found find_path in the ITPParser file, but I am unable to locate where the abspath function is at? Sorry, this might seem like a trivial question.

@tylerjereddy
Copy link
Member

@aditya-kamath
Copy link
Contributor

Thanks @tylerjereddy !

lilyminium added a commit that referenced this issue Apr 23, 2021
Fixes #3037

Co-authored-by: Lily Wang <31115101+lilyminium@users.noreply.github.com>
lilyminium added a commit to lilyminium/mdanalysis that referenced this issue Apr 28, 2021
Fixes MDAnalysis#3037

Co-authored-by: Lily Wang <31115101+lilyminium@users.noreply.github.com>
jbarnoud added a commit that referenced this issue May 3, 2021
* added get_connections

* modified tests for atoms.bonds/angles/dihedrals etc

* modified parsers and things to use get_connections or bonds

* updated CHANGELOG

* pep8

* undo half of PR 3160

* add intra stuff

* Update package/MDAnalysis/core/groups.py

Co-authored-by: Jonathan Barnoud <jonathan@barnoud.net>

* tighten up base class checking

* update docstring

* suppres warnings

* Use absolute file paths in ITPParser (#3108)

Fixes #3037

Co-authored-by: Lily Wang <31115101+lilyminium@users.noreply.github.com>

* Adds aromaticity and Gasteiger charges guessers (#2926)

Towards #2468 

## Work done in this PR
* Add aromaticity and Gasteiger charges guessers which work via the RDKIT converter.

* BLD: handle gcc on MacOS (#3234)

Fixes #3109 

## Work done in this PR
* gracefully handle the case where `gcc` toolchain
in use on MacOS has been built from source using `clang`
by `spack` (so it really is `gcc` in use, not `clang`)

## Notes
* we could try to add regression testing, but a few problems:
- `using_clang()` is inside `setup.py`, which probably
can't be safely imported because it has unguarded statements/
code blocks that run right away
- testing build issues is typically tricky with mocking, etc.
(though in this case, probably just need to move `using_clang()`
somewhere else and then test it against a variety of compiler
metadata strings

* Remove ParmEd Timestep writing "support" (#3240)

Fixes #3031

* Adding py3.9 to gh actions CI matrix (#3245)

* Fixes #2974
* Python 3.9 officially supported
* Add  Python 3.9 to testing matrix
* Adds macOS CI entry, formalises 3.9 support

* fix changelog

* special metaclass

* move function down

* tidy code

Co-authored-by: Jonathan Barnoud <jonathan@barnoud.net>
Co-authored-by: Aditya Kamath <48089312+aditya-kamath@users.noreply.github.com>
Co-authored-by: Cédric Bouysset <bouysset.cedric@gmail.com>
Co-authored-by: Tyler Reddy <tyler.je.reddy@gmail.com>
Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants