Giter VIP home page Giter VIP logo

michellab / biosimspace Goto Github PK

View Code? Open in Web Editor NEW
76.0 12.0 19.0 36.88 MB

Code and resources for the EPSRC BioSimSpace project.

Home Page: https://biosimspace.org

License: GNU General Public License v3.0

Python 94.16% Shell 0.03% Jupyter Notebook 5.28% TeX 0.21% C++ 0.31% Batchfile 0.01%
biomolecular-simulation interoperability ccpbiosim computational-chemistry computational-physics computational-biology molecular-dynamics reproducibility reproducible-research

biosimspace's Introduction

Build status

Conda Downloads

License

Paper

Note

BioSimSpace is now supported and maintained by OpenBioSim and is available through their GitHub organisation. This repository will only be maintained for legacy development work, with bug-fixes back-ported periodically. Developers can update their remote to point to the new location.

About

BioSimSpace is an interoperable Python framework for biomolecular simulation. With it you can:

  • Write robust and portable biomolecular workflow components that work on different hardware, with different software packages, and that can be run in different ways, e.g. command-line, Jupyter.
  • Interact with molecular-simulation processes in real time.

Citation DOI for Citing BioSimSpace

If you use BioSimSpace in any scientific software, please cite the following paper: :

@article{Hedges2019,
  doi = {10.21105/joss.01831},
  url = {https://doi.org/10.21105/joss.01831},
  year = {2019},
  publisher = {The Open Journal},
  volume = {4},
  number = {43},
  pages = {1831},
  author = {Lester Hedges and Antonia Mey and Charles Laughton and Francesco Gervasio and Adrian Mulholland and Christopher Woods and Julien Michel},
  title = {BioSimSpace: An interoperable Python framework for biomolecular simulation},
  journal = {Journal of Open Source Software}
}

Documentation

Full documentation can be found here.

Installation

Conda package

The easiest way to install BioSimSpace is using our conda channel. BioSimSpace is built using dependencies from conda-forge, so please ensure that the channel takes strict priority. We recommend using Mambaforge.

To create a new environment:

mamba create -n openbiosim -c conda-forge -c openbiosim biosimspace
mamba activate openbiosim

To install the latest development version you can use:

mamba create -n openbiosim-dev -c conda-forge -c openbiosim/label/dev biosimspace
mamba activate openbiosim-dev

When updating the development version it is generally advised to update Sire at the same time:

mamba update -c conda-forge -c openbiosim/label/dev biosimspace sire

Unless you add the required channels to your Conda configuration, then you'll need to add them when updating, e.g., for the development package:

mamba update -c conda-forge -c openbiosim/label/dev biosimspace

Installing from source

Alternatively, to install BioSimSpace from source:

(Before starting, you'll need a working Git installation.)

BioSimSpace is built on top of the Sire molecular simulation framework. To download and install Sire, follow the instructions here, making sure that BioSimSpace's dependencies are installed into the Sire conda environment at the point at which Sire is installed.

Next you will need to download BioSimSpace and install it into your Sire Conda environment.

git clone https://github.com/openbiosim/biosimspace
cd biosimspace/python
python setup.py install

Once finished, you can test the installation by running:

python

Then try importing the BioSimSpace package:

import BioSimSpace as BSS

Developers

Please follow the developer's guide.

Issues

Please report bugs and other issues using the GitHub issue tracker. When reporting issues please try to include a minimal code snippet that reproduces the problem. Additional files can be also be uploaded as an archive, e.g. a zip file. Please also report the branch on which you are experiencing the issue, along with the BioSimSpace version number. This can be found by running:

import BioSimSpace as BSS
print(BSS.__version__)

biosimspace's People

Contributors

adelehardie avatar annamherz avatar chryswoods avatar fjclark avatar jenkescheen avatar jmichel80 avatar kexul avatar lohedges avatar msuruzhon avatar ppxasjsm avatar ptosco avatar xiki-tempula 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  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  avatar  avatar  avatar

biosimspace's Issues

Adding space property to a system

Another question for @lohedges

The following instruction currently adds a BioSimSpace molecule to a list of BioSimSpace molecules. and this returns a BioSimSpace system.

In [31]: total = merged+remainderA
In [32]: merged.__class__
Out[32]: BioSimSpace._SireWrappers._molecule.Molecule
In [33]: remainderA.__class__
Out[33]: list
In [34]: total.__class__
Out[34]: BioSimSpace._SireWrappers._system.System

Q1) This is not the most logical behavior, I would expect that adding one molecule to a list of molecules would return another list of molecules
Q2) How can I set the space property of the resulting system ? This is necessary to get later

process = BSS.Process.Somd(system, protocol)

to create a somd input using a periodic box.

Rigid water conversion

BioSimSpace uses gmx solvate to add water molecules. Since GROMACS uses the -DFLEXIBLE include directive to specify flexibility, all of the added water molecules have 2 bonds. In contrast, in order to use the fast 3-point water model (rigid water) in AMBER, we need an explicit bond between the two hydrogen atoms, i.e. there should be 3 bonds per water molecule. This means that we currently cannot solvate with BioSimSpace, then convert and run an AMBER simulation with rigid bonds. In this case, the following error is thrown:

Error: A residue defined as a "fast 3-point water"
        is not defined by a triangle of three bonds.
        Residue      227 contains        2 bonds.

If we do want flexible water with AMBER, then we can work around this problem by changing the water residue name to something other than WAT.

This is a pain, since it means that I currently can't use AMBER to pre-equilibrate configurations for use in SOMD free energy simulations unless I don't use rigid water. It also shows how we need to be careful when converting between water models due to the different way they handle constraints.

import BioSimSpace should not import matplotlib implicitly

When I run "import BioSimSpace" in a python shell I get a failure because it is importing matplotlib and falling over

import BioSimSpace
### stuff ###
ImportError: Matplotlib is not installed. Please install matplotlib in order to use BioSimSpace.

This is because matplotlib from conda is broken if libGL.so.1 is not available, e.g.

import matplotlib.pyplot
### stuff ###
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

The solution is to set the matplotlib backend to a null drawer before importing, e.g. see here

matplotlib/matplotlib#9954

However, I feel that we shouldn't even be pulling in matplotlib unless we are running within a notebook. Could we set a flag or similar to say that matplotlib is not importable, and hence plotting is not available? Otherwise people will export to Python for batch usage and will break because matplotlib is not available.

Poor MCS mapping behaviour

From discussions with @ppxasjsm it is apparent that BioSimSpace is failing to obtain good mappings and alignments for ligands with markedly different binding poses. An example set of Cathespin ligands can be found here, along with a description of the issue.

The problem arises when you don't have a crystal structure for a ligand, then dock to achieve a binding pose. If the binding pose is markedly different to the reference ligand (the one which you want to map and align to) then the mapping and alignment is bad, even if the ligands are structurally very similar.

As an example, consider the Cat_4 and Cat_5 ligands shown below. From the 2D representation of the molecules it is clear that there is a large overlap in the molecular structure, which should be picked up by the maximum common substructure (MCS) mapping.

cathespin2d

There is a known binding pose for Cat_5, whereas the pose for Cat_4 has been obtained via docking. The VMD representations below show the 3D structure for the two poses, which are clearly very different.

cats_montage

We want to map atoms from the docked Cat_4 pose to those in Cat_5, then align Cat_4 to Cat_5 based on this mapping. Despite the similarity in the structure, BioSImSpace struggles to find a good mapping, matching only 11 atoms if run for the default timeout, and 31 if this is extended to 5 minutes. (Cat_4 has 97 atoms, Cat_5 has 95.) Aligning the molecules based on this mapping gives a poor result. (Since the alignment only performs translations and rotations of the entire ligand, this is perhaps not too surprising given the large difference in binding pose.)

An alternative solution is the use of a mapping scheme that allows the flexible transformation of a target molecule onto a reference molecule. This can be achieved, for example, by using the FKCOMBU command-line utility. (This works by performing a pair-wise MCS mapping but allowing deformations of the target structure.) Using this tool with the default options gives an excellent alignment in around 3 seconds! A comparison of the alignments obtained by BioSimSpace and FKCOMBU is show below.

alignment_montage

Do we want to support flexible transformations such as this? If so, it might be possible to wrap FKCOMBU as part of BioSimSpace.Align. (It's unlicensed as far as I can tell. You just need to fill in a simple form to get a download link.) One wrinkle is that FKCOMBU does the mapping and alignment in one go, whereas they can be decoupled in BioSimSpace. (You can get the mapping by itself, then align based on this mapping using an alignment protocol, which could allow for flexibility.) However, it should be easy enough to infer the mapping based upon the alignment (by coordinate matching) if we do want to decouple them.

Perhaps all of this is beyond the scope of BioSImSpace and we would assume that the user has already prepared their ligand as best as they can before attempting a mapping, e.g. by using FKCOMBU themselves. That said, I'm interested as to why we are struggling to get a good MCS mapping in the first place. I'll try to investigate further and post an update.

Issue when perturbing molecule

Hi,

I think I have found a bug in BioSimSpace - when you try to merge two molecules, the unique atom LJ parameters from the second molecule are set to zero. Consequently, if one tries to run simulations, they crash due to "naked" charges.

I have attached the input ligands, and the output morph, generated with BioSimSpace.Align.merge() :
files.zip

Python packaging

This thread is for discussing issues regarding packaging BioSimSpace and all of its dependencies into a robust and portable Python environment.

At present, BioSimSpace is built on top of the Sire molecular simulation framework. Sire comes as a miniconda Python installation, into which it is compiled and deployed (together with its dependencies). BioSimSpace is then installed into this miniconda enviroment, along with any additonal dependencies. (See the setup.py for details of the BioSimSpace installation process.)

(An automatic installation script simplifies this process, wrapping the installation inside a BioSimSpace application directory and setting some useful environment variables.)

Unfortunately there are several issues with this approach:

  • Many of the external Python packages do not correctly list their own dependencies. This is likely because the package owner hasn't tested the install using a clean build enviroment.

  • External packages often have outdated requirements, i.e. they haven't been tested against newer versions of their dependencies, against which they actually work. For example, on macOS, one of the dependencies of MDTraj supposedly requires an outdated version of NetCDF, which breaks the Sire installation (for 2018.1.0). However, when tested, mdtraj works fine with the latest NetCDF.

  • Related to the above, conda can sneakily upgrade/downgrade packages during the installation process. This makes it hard to simply install an additional dependency, since you then need to check that it hasn't broken anything else.

  • Some of our dependencies are fairly bleeding edge and have required patching in order for them to work correctly. For example, an older version of NGLView had an issue with not displaying molecules (rendering an empty view). MDTraj relies on SciPy for reading/writing NetCDF files. This had an issue with null byte padding which broke compatability with the latest NetCDF. Although this has been fixed with latest version of SciPy (1.1.0), MDTraj still pulls the outdated version as a dependency, even though it puts no constraints on the SciPy version in its conda recipe. This means that SciPy needs to be upgraded/patched after the install.

Unexpected AtomEditor exception in custom BSS script

Hi @lohedges

I'm working on a python script that reads in a a pair of solvated ligands from prm7/rst7 inputs, extract the ligands, create a merge ligand, and a new system by using the other unperturbed molecules from one of the two inputs.

inputA_top = "1a.parm7"
inputA_rst = "1a_equilibrated.rst7"
inputB_top = "5.parm7"
inputB_rst = "5_equilibrated.rst7"
# Load system A
systemA = BSS.IO.readMolecules([inputA_top, inputA_rst])
# Extract ligand (assumed first molecule) and unperturbed molecules
moleculesA = systemA.getMolecules()
ligA = moleculesA[0]
remainderA = moleculesA[1:]
# Load system B
systemB = BSS.IO.readMolecules([inputB_top, inputB_rst])
moleculesB = systemB.getMolecules()
ligB = moleculesB[0]
remainderB = moleculesB[1:]
# Perform mapping between ligA and ligB
mapping = BSS.Align.matchAtoms(ligA, ligB)

# @ Optimisation. Retain box with largest number of atoms for consistency between A->B and B->A mappings
# Align ligB to ligA based on the mapping.
ligB = BSS.Align.rmsdAlign(ligB, ligA, mapping)
# Merge the two ligands based on the mapping.
merged = BSS.Align.merge(ligB, ligA, mapping)
# Create a composite system
system = merged + remainderA

protocol = BSS.Protocol.FreeEnergy(runtime = 2*BSS.Units.Time.femtosecond, num_lam=1)
process = BSS.Process.Somd(system, protocol)
files = process.inputFiles()

In my hands the script fails at the BSS.Align.merge step with the following error

AttributeError                            Traceback (most recent call last)
/mnt/vmshared/Cresset/setup-bss/prepSOMD.py in <module>()
     31 ligB = BSS.Align.rmsdAlign(ligB, ligA, mapping)
     32 # Merge the two ligands based on the mapping.
---> 33 merged = BSS.Align.merge(ligB, ligA, mapping)
     34 # Create a composite system
     35 system = merged + remainderA

~/sire.app/lib/python3.5/site-packages/BioSimSpace-2018.1.1+574.gf3d18bc-py3.5.egg/BioSimSpace/Align/__init__.py in merge(molecule0, molecule1, mapping, property_map0, property_map1)
    361 
    362     # Create and return the merged molecule.
--> 363     return molecule0._merge(molecule1, mapping, property_map0=property_map0, property_map1=property_map1)
    364 
    365 def _score_rmsd(molecule0, molecule1, mappings, is_align=False):

~/sire.app/lib/python3.5/site-packages/BioSimSpace-2018.1.1+574.gf3d18bc-py3.5.egg/BioSimSpace/_SireWrappers/_molecule.py in _merge(self, other, mapping, property_map0, property_map1)
   1588 
   1589                 # Add the property to the atom in the merged molecule.
-> 1590                 edit_mol = edit_mol.atom(atom.index()).setProperty(name, atom.property(prop)).molecule()
   1591 
   1592         # Add the atom properties from molecule1.

~/sire.app/lib/python3.5/site-packages/Sire/Mol/__init__.py in __set_property__(molview, key, property)
     52     (typename, property) = __get_typename__(property)
     53 
---> 54     return getattr(molview, "_set_property_%s" % typename)(key, property)
     55 
     56 def __set_metadata__(molview, *args):

AttributeError: 'AtomEditor' object has no attribute '_set_property_SireMol_Velocity3D'

This is run using
Sire version: 2018.2.0 (32a7d62b566908cae3704f077a0501c4c7713a9b/Lester Hedges/2019-01-11T12:33:55+00:00 | **UNCLEAN**)

and a recent BioSimSpace devel

commit f3d18bcb87cc2b0294d5930a6c8bbda16ca75faa (HEAD -> devel, origin/feature-process-gromacs, origin/devel, origin/HEAD)
Author: Lester Hedges <[email protected]>
Date:   Fri Jan 18 12:19:50 2019 +0000

    Minor fixes for production protocol. [ci skip]

I have attached the script and input in the tarball below

mergeerror.tar.gz

Align Module Issues

Hello,

I have been trying to use BioSimSpace for the past several days to obtain good ligand-ligand mapping and merging and I have run into several issues in the Align module:

  1. When calling matchAtoms(), I run into the following error:
    AttributeError: 'Evaluator' object has no attribute 'findMCSmatches'
    However, when I try to manually call findMCS() instead, the molecules are aligned, but the alignment is much worse than it should be, even if one of the molecules is practically a substructure of the other one (note that I run into the same problem using RDkit with ConstrainedEmbed())

  2. After alignment, manual creation of a merged structure using merge() (and the mapping obtained by manually calling findMCS()) results in a molecule which has no atoms and results in a blank screen when one tries do visualise it. Additionally, saving this to a mol2 file results in a file full of dummy atoms with coordinates of 0, 0, 0. Perhaps not surprisingly, attempting to save this object to an AMBER format fails as well. (the original molecules have already been parametrised in AMBER so the parameters should be loaded)

Note that I am running the latest commits of both BioSimSpace(2018.1.1+385.g077abfd) and Sire (2018.2.0) on a MacOS High Sierra build.

Best wishes,
Miroslav

Latest devel does not run setup demo

I am trying to run a slightly modified version of: https://github.com/michellab/BioSimSpace/blob/devel/demo/molecular_setup.ipynb

This is run on a fresh devel_latest binary.
The input molecule used is attached.

The following line:

system = BSS.Solvent.solvate(node.getInput("water"), molecule=molecule,
                                                     box=3 * [node.getInput("box_size")],
                                                     ion_conc=node.getInput("ion_conc"))

Generates the following error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-23-a6abde39c84c> in <module>
      1 system = BSS.Solvent.solvate(node.getInput("water"), molecule=molecule,
      2                                                      box=3 * [node.getInput("box_size")],
----> 3                                                      ion_conc=node.getInput("ion_conc"))

~/biosimspace.app/lib/python3.7/site-packages/BioSimSpace-2018.1.1+712.g23cf502-py3.7.egg/BioSimSpace/Solvent/_solvent.py in solvate(model, molecule, box, shell, ion_conc, is_neutral, work_dir, property_map)
     97             raise ValueError("Supported water models are: %s" % waterModels())
     98 
---> 99     return _model_dict[model](molecule, box, shell, ion_conc, is_neutral, work_dir, property_map)
    100 
    101 def spc(molecule=None, box=None, shell=None, ion_conc=0,

~/biosimspace.app/lib/python3.7/site-packages/BioSimSpace-2018.1.1+712.g23cf502-py3.7.egg/BioSimSpace/Solvent/_solvent.py in tip3p(molecule, box, shell, ion_conc, is_neutral, work_dir, property_map)
    246     # Create the solvated system.
    247     return _solvate(molecule, box, shell, "tip3p", 3, ion_conc,
--> 248             is_neutral, work_dir=work_dir, property_map=property_map)
    249 
    250 def tip4p(molecule=None, box=None, shell=None, ion_conc=0,

~/biosimspace.app/lib/python3.7/site-packages/BioSimSpace-2018.1.1+712.g23cf502-py3.7.egg/BioSimSpace/Solvent/_solvent.py in _solvate(molecule, box, shell, model, num_point, ion_conc, is_neutral, work_dir, property_map)
    655 
    656                 # Add the space property from the water system.
--> 657                 system._sire_system.setProperty(prop, water._sire_system.property(prop))
    658         else:
    659             system = water

AttributeError: 'list' object has no attribute '_sire_system'

2-cyclopentanylindole.txt

Ligand charge differs between BioSimSpace and FESetup

Using the data from the D3R2018 repository, all of the ligands parameterised by FESetup have a charge of +2 |e|, e.g.

import BioSimSpace as BSS

s = BSS.IO.readMolecules(BSS.IO.glob("CatS/BSS/FESetup/_ligands/CatS_155/vacuum.*"))
print(s.charge())
2.0000 |e|

In constrast, all ligands parameterised by BioSimSpace (also using GAFF2) have a charge of zero, e.g.

import BioSimSpace as BSS

s = BSS.IO.readMolecules(BSS.IO.glob("CatS/BSS/ligands_aligned/parameterised/CatS_.*"))
print(s.charge())
3.9402e-08 |e|

Both FESetup and BioSimSpace are using the same PDB files as input (where the charge is zero) and both make the overall molecular charge integer valued after parameterisation by redistributing the charge between the atoms.

For the protein, which is paramterised using FF14SB, I get the same charge as FESetup, +3 |e|. Again, this is using the same input PDB file with zero molecular charge. This means that with FESetup the total charge of the complex is +5 |e|, whereas for BioSimSpace it's +3|e|. For both codes the solvated system is neutralised correctly, i.e. 5 chlorine atoms for FESetup and 3 chlorine atoms for BIoSimSpace.

Does FESetup do something else during the ligand parameterisation step that we're missing? I've had a quick look through the code but I can't see anything obvious.

Solvating a system containing a merged molecule

In relation to this, I am having problems when trying to solvate a BioSimSpace system containing a merged molecule. The GROMACS parser writes the mass of the dummy atoms at lambda 0 and 1 to the topology file, then grompp complains about a non-zero virtual atom mass (grompp is needed before running genion in order to neutralise the system). (The mass of a dummy atom at lambda = 0 is the mass of the atom at lambda = 1, and vice-versa.)

Perhaps this can be fixed by detecting merged molecules and only writing the values corresponding to lambda = 0. I'll experiment in order to see what's possible.

OpenMM CUDA device bug

The version of OpenMM bundled with BioSimSpace (through Sire) has an annoying bug that breaks SOMD simulations on multi-GPU nodes if the user doesn't request all of the GPUs (or exclusive use of the node).

On BlueCrystal 4 here at Bristol, Slurm correctly handles the setting of CUDA environment variables, such as CUDA_VISIBLE_DEVICES. On a GPU node, the value of this variable will be 0,1 if both GPUs are requested, or alternatively it will be set to 0 or 1 if a single GPU is requested (the ID being dependent on what else is already running on the node).

When launched, OpenMM checks that the GPU device ID is less than the number of visible devices. Unsurprisingly, this fails when the user requests a single GPU and the ID assigned is 1, i.e. 1 < 1 == False. Essentially, it seems that OpenMM is assuming that you are requesting all GPUs, or have exclusive node access.

At the moment I can't quite figure out where this is being triggered in the code, but it should be easy enough to fix if I do. (Although it's possible that it might be in one of the compiled shared libraries.) A short term hack could be to reset the CUDA_VISIBLE_DEVICES variable in my Slurm submit script so that it always has two entries, regardless of whether 1 or 2 GPUs are requested, e.g.

GPU_ID = $CUDA_VISIBLE_DEVICES

if [ "$GPU_ID" == "0" ]; then
    export CUDA_VISIBLE_DEVICES=0,1
elif [ "$GPU_ID" == "1" ]; then
    export CUDA_VISIBLE_DEVICES=1,0
fi

(BioSimSpace queries this environment variable and grabs the first available ID if one GPU is selected.)

Missing hydrogens

Just checking whether we expect the PDB file to contain all hydrogens for the molecule in question. These will be added automatically by tLEaP, but then the resulting molecular layout will be inconsistent with the original molecule, i.e. there will be bonds with hydrogen atoms that didn't previously exist.

At the moment it seems like @ppxasjsm might need to use tLEaP in order to add the required hydrogens, i.e. doing a full parameterisation, then loading this into BioSimSpace to be parameterised again. I understand that this is a hard problem in general, but perhaps there could be an option to allow hydrogens to be added (while still preserving atom names, etc, for the other atoms).

Cannot find an MD package that supports format: Gro87

(Creating this issue on behalf of David Woodlock)

I have been delving through some of these today but I have hit a snag. Every time I try to run the MD.run with a gromacs file it flags the error that it โ€œCannot find an MD package that supports format: Gro87โ€, running the individual lines found in the file flagging the error, _md.py, it can find my gromacs root directory but it is still flagging this error. I have loaded the file using BSS.IO. I have tried feeding it a file made from IO or pdb2gmx and the results ends up the same.

I am sure it is something trivial I am missing, any help would be appreciated.

Parametrization fail for CathS ligands in seperate PDBs

We tried to naively parametrise 8 CatS ligands in separate pdb files. FESetup successfully parametrises them and if needed I can add the output as well, or make a test case on BioSimSpace examples.

The code used for the parametrisation attempt was:

import BioSimSpace as BSS
import os
import glob
ligs = ['108', '52', '67', '72', '71', '73', '20', '63']
for l in ligs:
    lig = BSS.IO.readMolecules('/home/jscheen/projects/D3R/data/FESetup/poses/'+l+'/ligand.pdb')
    mol_lig = lig.getMolecules()[0]
    lig_param = BSS.Parameters.parameterise(mol_lig, 'gaff2' ).getMolecule()
    failed = glob.glob('*.zip')
    if failed is not None:
        os.rename(failed[0], 'failed/'+l+'.zip')

The output generated was the essentially that every parametrisation failed. The failed zip files are attached as a whole zip archive and each ligand can be identified individually.

Let me know if you need any more information, or you also require the FESetup output.

BSS version is:
'2018.1.1+346.gdb8dc06'

failed.zip

BSS read/write molecules woes

Not getting the expected behaviour from this script

import BioSimSpace as BSS
input_top = "1a.parm7"
input_rst = "1a_equilibrated.rst7"
# Load system 
system = BSS.IO.readMolecules([input_top, input_rst])
print (system)
# Write system
BSS.IO.saveMolecules("testme",system, system.fileFormat())
# Read system
system2 = BSS.IO.readMolecules(["testme.prm7", "testme.rst7"])
print (system2)

Upon execution

julien@ubuntu:/mnt/vmshared/Cresset/setup-bss/test-parser$ ~/sire.app/bin/python parser.py 
/home/julien/sire.app/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/home/julien/sire.app/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/home/julien/sire.app/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)

==============================================================
Sending anonymous Sire usage statistics to http://siremol.org.
For more information, see http://siremol.org/analytics
To disable, set the environment variable 'SIRE_DONT_PHONEHOME' to 1
To see the information sent, set the environment variable 
SIRE_VERBOSE_PHONEHOME equal to 1. To silence this message, set
the environment variable SIRE_SILENT_PHONEHOME to 1.
==============================================================

<BioSimSpace.System: nMolecules=1347>
Traceback (most recent call last):
  File "parser.py", line 10, in <module>
    system2 = BSS.IO.readMolecules(["testme.prm7", "testme.rst7"])
  File "/home/julien/sire.app/lib/python3.5/site-packages/BioSimSpace-2018.1.1+574.gf3d18bc-py3.5.egg/BioSimSpace/IO/__init__.py", line 226, in readMolecules
OSError: Failed to read molecules from: ['testme.prm7', 'testme.rst7']

Ran using
Sire version: 2018.2.0 (9a638a5d9d106d77ee89c94faacad91b2ad615b3/Lester Hedges/2019-01-24T10:12:48+00:00 | UNCLEAN)

Inputs and script attached
test-parser.tar.gz

BioSimSpace - clearer parsing error reports?

In the BSS tutorial first notebook the following incorrectly formatted instructions (top file missing)
!python nodes/minimisation.py --steps=1000 --files input/ala.crd
will generate a cryptic Sire traceback for the user.

Traceback (most recent call last):
File "nodes/minimisation.py", line 69, in
system = BSS.readMolecules(node.getInput("files"))
File "/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.340.g3404973-py3.5.egg/BioSimSpace/init.py", line 46, in readMolecules
return Sire.IO.MoleculeParser.read( files )
UserWarning: Exception 'SireError::program_bug' thrown by the thread 'master'.
There are no lead parsers!
(...)

It would be good to catch this and report a more helpful error message for the user (such as "you provided a .crd file but no .top file" etc...)

Should we wrap Sire System?

At the moment the Sire System is one of the core objects used by BioSimSpace. This is what is created by BioSimSpace.IO.readMolecules and also what is passed to and returned from Process objects, e.g. you can get the current system with Process.getSystem().

The System object contains a mind-boggling amount of functionality, which might be overwhelming for novice users. For example, if I create a system in IPython, then type system. tab, I see 143 methods, some of which are undocumented (those that are refer to other Sire objects). Would it be helpful to have our own BioSimSpace.System object that contains a Sire System internally as a private member. This wrapper class could be used to selectively expose a limited range of functionality from Sire.System with clear documentation. There could always be a BioSimsPace.System.getSireSystem() (or similar) method to expose the full Sire System to power users.

What do you think? (This doesn't break the current API.) This could also apply to other functionality from Sire. Basically we want to allow the user to make use of Sire, but without actually knowing that they are using it, i.e. pretty much the same approach as for the rest of BioSimSpace :-)

I bring this up because while writing the documentation for v1.0 I have been cleaning the API to make it as stripped back as possible. All unnecessary implementation detail is now hidden from the user and only the core BioSimSpace 'objects' (classes and functions) are exposed in the help and when working interactively. This makes it much easier for a user to quickly see what's available, then search for help with that particular package/function/class, i.e. tab completion isn't littered with extraneous information, such as variables from external modules. (In the workshop I noticed a lot of people using Jupyter's tab completion to search the BIoSimSpace package tree for functionality.)

BSS install

Did a fresh install after compiling Sire 2018.2.0
Looks like mock and cython must be installed manually before running the install
Any reason why this can't be handled automatically?

Adding conda-forge channel
Disabling conda auto update
Installing package: mdtraj
Installing package: mdanalysis
Installing package: openbabel
Upgrading pip
mdanalysis 0.18.0 requires mock, which is not installed.
cftime 1.0.0b1 requires cython, which is not installed.
mkl-random 1.0.1 requires cython, which is not installed.
mkl-fft 1.0.4 requires cython, which is not installed.
Installing package: pypdb
Installing package: watchdog
Installing package: jupyter
Installing package: duecredit
Installing package: mock
Installing package: pygtail
Installing package: fileupload
Activating notebook extension: fileupload
Enabling notebook extension fileupload/extension...
- Validating: OK
Installing package: nglview
Activating notebook extension: nglview
Enabling notebook extension nglview-js-widgets/extension...
- Validating: OK
Cleaning conda environment

Done!

If you have problems with Jupyter permissions, try removing '$HOME/.jupyter' or '$HOME/.local/share/jupyter'

For optional package support...

demo amber.py is failing on devel for me

I assume this error is related to the fact that I currently have the 17.3 release installed and not the devel branch of Sire?

Starting minimisation...
Traceback (most recent call last):
  File "amber.py", line 33, in <module>
    process.start()
  File "/Users/toni_brain/Projects/git/BioSimSpace/python/BioSimSpace/Process/amber.py", line 389, in start
    "%s.out"  % self._name, "%s.err"  % self._name)
Boost.Python.ArgumentError: Python argument types in
    Process.run(str, list, str, str)
did not match C++ signature:
    run(QString command, QStringList arguments)
    run(QString command, QString arg)
    run(QString command)

Known parameterisation and solvation limitations

This issue is used to compile a list of known issues with the BioSimSpace.Parameters and BioSimSpace.Solvent packages.

BioSimSpace.Parameters

  • Doesn't yet support fixing of names in PDB input file, e.g. for HIS in 1Z1M example.

  • Currently only supports basic Antechamber protocol for GAFF/GAFF2. Working on re-implementing the protocol from FESetup. See the param method here for details. Would be nice to improve on this if possible.

  • Since parameterisation can be slow, we run the protocol as a background process and return a handle to the user. Not sure what should happen when the user wants to parameterise a bunch of molecules at once. (Return a list of process handles, or a handle to a process wrapper that runs each in series?)

BioSimSpace. Solvent

  • Currently no way to decouple parameterisation and solvation with tLEaP. As such, we only use gmx solvate. (Does this matter? Are there things tLEaP can do that gmx solvate can't?)

SOMD

I'm currently working on the SOMD molecular dynamics driver that will be part of the BioSimSpace.Process package. (This is separate to the SOMD free energy driver.) I've run into a few issues that I'll document here.

  1. No access to thermodynamic time series data, e.g. energy, temperature, pressure, etc. As such, the only functionality of the Process.Somd class is getTrajectory and getSystem (which calls getTrajectory and grabs the last frame). This makes SOMD of limited use for interactive simulation, i.e. no ability to extract and monitor data as the simulation runs. (Perhaps data can be computed from within Sire using some of the restart files?)
  2. You can only run simulations at fixed temperature, so no heating/cooling protocols are possible.
  3. The OpenMMD.py script that is part of SOMD uses Sire.Units when setting default parameters, e.g. the integration time step. However, no units are used when reading parameters from a configuration file so the parser will have to be modified in order to support any user specified values that come from BioSimSpace.Protocol objects. At present, the parser just reads the configuration values as strings, then blindly passes them to any function in which they are needed (which then complain that the arguments are of the wrong type).

Check atom names in BSS generated pert files

SOMD may require that each atom in a pert file has a unique Sire AtomName. As BSS does not rename input atoms, it may be necessary to generate unique atom names when writing prm7 and pert files for a SOMD free energy calculation. Thus the SOMD prm7 may also require SOMD specific atom names, together with heuristics for settings the atomic mass of perturbed elements.

Crystal waters

As anticipated, it turns out that the presence of crystal waters are extremely important for obtaining the correct binding mode of certain ligands. BioSimSpace needs to be modified so that they can be handled during the setup stage:

  • Crystal waters typically appear as oxygen atoms. We need to add hydrogens (and possibly dummies) in the appropriate geometry for the water model of choice. (Not sure if tLEaP or gmx solvate can do this for you.)

  • The crystal waters will need to be present during the solvation step so that the additional waters are added around them.

BioSimSpace tutorial - interactive MD - proposal for Protocol API changes

Initialise a short equlibration protocol.

protocol = BSS.Protocol.Equilibration(runtime=0.05, temperature_start=0, temperature_end=300, restrain_backbone=True)

--> We should modify the API to have users specify parameters with units e.g. runtime=0.05 ps

To address questions from the audience this morning we could also add a str method to a Protocol class so that users can easily print out all the parameters actually set by the Protocol (rather than having to explicitly use getTimeStep() etc...

Add descriptions to supported file extensions

Based on talking to completely inexperienced users of MD simulations, it was suggested that the file formats should also have a brief description of what underlying software package they relate to and whether they are a topology type file or a coordinate type file.

Gromacs

This thread is for discussing issues regarding ruinning Gromacs simulations with BioSimSpace.

At present, I'm having significant issues getting even basic simulations, e.g. steepest descent minimisation, to run using BioSimSpace. As a test case, I've been using the simple solvated Kigaki system described in this tutorial. I have added example top and gro files to the repository.

Major issues include:

  • Defining nrexcl for different groups, e.g. nrexcl = 2 means to exclude non-bonded interactions up to two bonds away (I think). This is not preserved in a topology file written by Sire and seems to be hard to calculate for systems converted to the Gromacs format, e.g. originally in Amber format. In my experiences, incorrect values of nrexcl make the simulation entirely unstable, i.e. positive potential energies (the system blows up).

  • Gromacs mixes topology and configuration information. For example, in solvated simulations, information related to the configuration of the constraint algorithm is included in the water force-field file. Also, a directive in an mdp configuration file could be used to modify parts of an existing topology.

  • Solvated simulations aren't working properly since we don't currently support the exclusions tag, or deal with constraints (see above). For example, the following part of the Tip3P itp file is needed for a stable simulation.

#ifndef FLEXIBLE

[ settles ]
; OW    funct   doh dhh
1       1       0.09572 0.15139

[ exclusions ]
1   2   3
2   1   3
3   1   2

#else

typo in install script

I believe there is an error in the install script, line 225, an excess double quote in the end of the line. The installation proceeds nicely after removing it.
echo "export OPENMM_PLUGIN_DIR="$SIRE_DIR/lib/plugins/
I thought it is too little to create a pull request for such, someone can sort it.

Inconsistencies in name of GROMACS executable

Typically, this is called gmx and is what is searched for by BioSimSpace. However, it looks like people often rename this depending on their cluster environment, e.g. gmx_mpi. Perhaps we should provide an option to allow this to be set (you can already for with Process.Gromacs) while being careful to preserve interoperability. We don't want people hard coding this in their nodes, so perhaps a command-line option or environment variable would be best.

MD error with FESetup output

Running MD simulations from minimised and equilibrated FESetup output crashes using sander from amber2018.

The error zip file is attached.
The code that lead to the error is:

import BioSimSpace as BSS
system = BSS.IO.readMolecules(['FESetup2/_complexes/cats:CatS_155/solvated.rst7', 'FESetup2/_complexes/cats:CatS_155/solvated.parm7'])
protocol = BSS.Protocol.Production(runtime=20*BSS.Units.Time.nanosecond, frames=1000)
process = BSS.MD.run(system, protocol)
print(process.isError())
process.getOutput()

md.zip

nglview

I am still struggling to get nglview to work for me, as in nothing actually gets displayed.

Using: Safari Version 11.0.3 (13604.5.6)
OSX 10.13.3
nglview version: '1.1.2'

I followed the instruction in the readme, but no molecule gets displayed. @chryswoods I know you have it working for you. Could you summarise versions you are using? Thanks!

BioSimSpace install script

Hi @lohedges ,

I tried to install BSS from the install.sh script

julien@ubuntu:~/software/devel/BioSimSpace$ ./install.sh --branch=devel
Where would you like to install BioSimSpace? [/home/julien/BioSimSpace.app]:
Installing into directory: /home/julien/BioSimSpace.app
--> Downloading Sire binary
chmod: cannot access '/home/julien/BioSimSpace.app/sire.run': No such file or directory
--> Installing Sire application
rm: cannot remove '/home/julien/BioSimSpace.app/sire.run': No such file or directory
--> Downloading BioSimSpace
unzip: cannot find or open devel.zip, devel.zip.zip or devel.zip.ZIP.
unzip: cannot find or open tests.zip, tests.zip.zip or tests.zip.ZIP.
rm: cannot remove 'devel.zip': No such file or directory
rm: cannot remove 'tests.zip': No such file or directory
./install.sh: line 154: cd: BioSimSpace-devel/python: No such file or directory

Not sure why....I am downloading the sire binary now and will try to install BSS manually.

Add support for reading perturbed topologies and pert files

It seems that BioSimSpace does not open perturbed topologies correctly (it completely gets rid of the second molecule). This is obvious if we open a saved morph and save it again:

import BioSimSpace as _BSS

morph = _BSS.IO.readMolecules(["morph.gro87", "morph.grotop"])
_BSS.IO.saveMolecules("morph_resaved", morph, "Gro87,GroTop")

Input and output files:
Morphs.zip

recognising multiple molecules in pdb output from flare

If ligand poses are generated with Flare, they can be written to a single pdb file. When this is read with the devel version of sire+devel BioSimSpace they are not recognised as multiple molecules.

The ligand file is attached. The code to replicate the issue is:

import BioSimSpace as BSS
mols = BSS.IO.readMolecules('ligands_docked.pdb')
mols.nMolecules()

Last line gives the answer of 1, instead of 7 or 8, can't quite remember how many there should be.

ligands_docked.txt

BSS inputs for SOMD cannot be loaded by Sire in some instances

This was discussed previously on the Sire git page here michellab/Sire#233

BioSimSpace currently creates parm7 files that cannot be loaded by the Sire crdtop parser in some cases.

The attached tarball contains inputs and instructions to attempt to start a somd calculation using as input parm7/rst7 files generated by BioSimSpace

cd test-bss
bash ../CMD-BSS
(...)
Exception 'SireError::program_bug' thrown by the thread 'master:main'.
 A 1,4 pair has a coulombic scaling factor of 0.0 in the top file which would mean an infinite energy ! 
Thrown from FILE: /home/julien/software/devel/Sire/corelib/src/libs/SireIO/amber.cpp, LINE: 940, FUNCTION: int setDihedrals(SireMol::MolEditor&, int, const QList<int>&, const QList<double>&, const QList<double>&, const QList<double>&, const QList<double>&, const QList<double>&, SireMM::FourAtomFunctions&, const SireBase::PropertyName&, SireMM::FourAtomFunctions&, const SireBase::PropertyName&, QHash<SireMol::AtomNum, QList<SireMol::AtomNum> >&, QHash<SireMol::AtomNum, QHash<SireMol::AtomNum, double> >&, QHash<SireMol::AtomNum, QHash<SireMol::AtomNum, double> >&, double, double, SireMol::AmberParameters&, const SireBase::PropertyName&, int)

By contrast the same FEP input created by FESetup doesn't trigger an error
This can be verified by running

cd test-fesetup
bash ../CMD-FESETUP

Inspection of the BSS and FESetup produced prm7 files shows that although the number of entries for the parameter FLAG SCEE_SCALE_FACTOR are the same, the BSS generated topology contains more 0 values (7) than the FESetup generated topology (2).

test-somd-1a-to5.tar.gz

Core dump on ssh without X forwarding

importing BioSimSpace without X forwarding on an ssh session results in a core dump:

/home/ppxasjsm/BioSimSpace.app/sire.app/lib/python3.5/site-packages/BioSimSpace-0+unknown-py3.5.egg/BioSimSpace/__init__.py:85: UserWarning: Cannot find 'gmx' executable. Please download and install GROMACS from: http://gromacs.org
/home/ppxasjsm/BioSimSpace.app/sire.app/lib/python3.5/site-packages/BioSimSpace-0+unknown-py3.5.egg/BioSimSpace/IO/__init__.py:47: UserWarning: BioSimSpace.IO: Please install GROMACS (http://www.gromacs.org) for GROMACS topology file support.
/home/ppxasjsm/BioSimSpace.app/sire.app/lib/python3.5/site-packages/BioSimSpace-0+unknown-py3.5.egg/BioSimSpace/Solvent/__init__.py:45: UserWarning: 'BioSimSpace.Solvent' is not supported. Please install GROMACS: http://www.gromacs.org

In [2]: QXcbConnection: Could not connect to display 
Aborted (core dumped)

Importing nglview or matlplib on its own is fine and does not lead the core dump.

Forward and backward mapping not symmetric

Taking two compounds then the number of matched atoms should be the same going forwards and backwards.

Example to reproduce this:

import BioSimSpace as BSS
mol1 = BSS.IO.readMolecules('CatS_79.pdb').getMolecules()[0]
mol2 = BSS.IO.readMolecules('CatS_195.pdb').getMolecules()[0]
mapping = BSS.Align.matchAtoms(mol1, mol2)
print (len(mapping))
mapping_back = BSS.Align.matchAtoms(mol2, mol1)
print (len(mapping_back))

Output:

32
61

Files needed are attached.

mapping.zip

BioSimSpace won't import

After reinstalling mdtraj I now can't import BioSimSpace because "plt" is not defined (see below). This was all working yesterday evening (as was mdtraj)...

:-> docker run -it --rm -p 8888:8888 chryswoods/bss-workshop bash
jovyan@b8d6a5813033:~$ update_workshops
Updating BioSimSpace and all workshops...
  -- [u] BioSimSpace
Already up-to-date.

  -- [u] xswaps
Already up-to-date.

Everything updated :-)
jovyan@b8d6a5813033:~$ conda install mdtraj
Solving environment: done

## Package Plan ##

  environment location: /opt/conda

  added / updated specs: 
    - mdtraj


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    mdtraj-1.9.1               |           py35_1         5.9 MB  conda-forge

The following packages will be UPDATED:

    mdtraj: 1.9.1-py35_0 omnia --> 1.9.1-py35_1 conda-forge

Proceed ([y]/n)? y


Downloading and Extracting Packages
mdtraj 1.9.1: #################################################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
jovyan@b8d6a5813033:~$ ipython
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:53:06) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import BioSimSpace
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-99da57a799ef> in <module>()
----> 1 import BioSimSpace

/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/__init__.py in <module>()
     28 
     29 import BioSimSpace.Gateway
---> 30 import BioSimSpace.Notebook
     31 import BioSimSpace.Process
     32 import BioSimSpace.Protocol

/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/Notebook/__init__.py in <module>()
----> 1 from .plot import Plot
      2 from .view import View

/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/Notebook/plot.py in <module>()
     18 
     19 # Set font sizes.
---> 20 plt.rc('font', size=SMALL_SIZE)          # controls default text sizes
     21 plt.rc('axes', titlesize=SMALL_SIZE)     # fontsize of the axes title
     22 plt.rc('axes', labelsize=MEDIUM_SIZE)    # fontsize of the x and y labels

NameError: name 'plt' is not defined

In [2]:                                                                                   
Do you really want to exit ([y]/n)? y
jovyan@b8d6a5813033:~$ python
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:53:06) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import BioSimSpace
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/__init__.py", line 30, in <module>
    import BioSimSpace.Notebook
  File "/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/Notebook/__init__.py", line 1, in <module>
    from .plot import Plot
  File "/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/Notebook/plot.py", line 20, in <module>
    plt.rc('font', size=SMALL_SIZE)          # controls default text sizes
NameError: name 'plt' is not defined
>>> 

amber.py demo hangs with minimisation OSX

It seems that there is an issue with threading, because I can't seem to go beyond the minimisation in the demo when running sire as
python amber.py

The error I get:

Loading molecules...

Initialising minimisation process...

Created AMBER input files: ['minimise/minimise.amber', 'minimise/minimise.rst7', 'minimise/minimise.prm7']

Starting minimisation...
^CTraceback (most recent call last):
  File "amber.py", line 41, in <module>
    process.wait()
  File "/Users/toni_brain/Projects/git/BioSimSpace/python/BioSimSpace/Process/amber.py", line 652, in wait
    self._watcher._observer.join()
  File "/Users/toni_brain/sire.app_dev_17.3/lib/python3.5/threading.py", line 1054, in join
    self._wait_for_tstate_lock()
  File "/Users/toni_brain/sire.app_dev_17.3/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock
    elif lock.acquire(block, timeout):
KeyboardInterrupt

Clearer equilibration protocol options.

At present, BSS.Protocol.Equilibration can run equilibration at fixed temperature, or perform heating / cooling by setting the temperature_start and temperature_end keyword arguments. To run at constant temperature, the user can omit the temperature_end argument, or set it to the same value as temperature_start.

Perhaps it would be better to have another keyword, temperature, that takes precedence over the other two, i.e. a fixed temperature equilibration will be performed if this argument is set (the others can be omitted, or will be ignored if they are set, perhaps with a warning given).

namespace convention

It would be good to discuss conventions for exposing methods.
For instance why MolWithResName or readMolecules() have been brought to the top level layer of BSS in BioSimSpace/python/BioSimSpace/init.py
This is important to clarify before other developers contribute code to the library.

Float dialog box broken

When you create a float input, the integer dialog box is on the screen and cannot specify a floating point value

behaviour of setup.py

Hi,

I think it would be good that when running setup.py clean nothing actually happens other than cleaning things and not a whole conda installation cycle is run such as this one:

running clean

Setting up python environment...
Updating conda

==============================================================
Sending anonymous Sire usage statistics to http://siremol.org.
For more information, see http://siremol.org/analytics
To disable, set the environment variable 'SIRE_DONT_PHONEHOME' to 1
To see the information sent, set the environment variable 
SIRE_VERBOSE_PHONEHOME equal to 1. To silence this message, set
the environment variable SIRE_SILENT_PHONEHOME to 1.
==============================================================

Adding conda-forge channel
Disabling conda auto update
Installing package: mdtraj


Problems with amber and gfortran

Process hangs, when amber is not executed correctly in the amber.py demo script.

The issue I had was that I didn't have gfortran installed and therefore my amber installation was actually broken after an update of OSX.

An error file was written when executing amber.py, but BioSimSpace did not register the error.
Output:

/Users/toni_brain/Software/FESetup1.1/amber14/bin/sander -O -i minimise.amber -p
 minimise.prm7 -c minimise.rst7 -o stdout -r minimise.restart.crd -inf minimise.nrg
dyld: Library not loaded: /opt/local/lib/libgcc/libgfortran.3.dylib
  Referenced from: /Users/toni_brain/Software/FESetup1.1/amber14/bin/sander
  Reason: image not found
Abort trap: 6```

The problem was solved by installing gfortran and the amber16

BioSimSpace and mdtraj are clashing...

I am having many issues with BioSimSpace and mdtraj. BioSimSpace is failing to load as it can't detect mdtraj (see below). This can be fixed by reinstalling mdtraj using conda, but this then throws up another bug (which I will put as another issue).

I am running this in docker, which uses the latest BioSimSpace from devel. You can update either by running "update_workshops" or by changing into /home/biosimspace and using git pull etc.

Run from docker using docker run -it --rm -p 8888:8888 chryswoods/bss-biosimspace to start a notebook, or add bash on the end to jump straight into a bash shell. I see this with python, ipython and the notebook.

:-> docker run -it --rm -p 8888:8888 chryswoods/bss-workshop bash
jovyan@3573955eb31f:~$ ipython
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:53:06) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import BioSimSpace

Trying to install mdtraj from package mdtraj using /opt/conda/bin/conda...

Solving environment: done

## Package Plan ##

  environment location: /opt/conda

  added / updated specs: 
    - mdtraj


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    mdtraj-1.9.1               |           py35_1         5.9 MB  conda-forge

The following packages will be UPDATED:

    mdtraj: 1.9.1-py35_0 omnia --> 1.9.1-py35_1 conda-forge


Downloading and Extracting Packages
mdtraj 1.9.1: #################################################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/Trajectory/trajectory.py in <module>()
     16 try:
---> 17     mdtraj = try_import("mdtraj")
     18 except ImportError:

/opt/conda/lib/python3.5/site-packages/Sire/__init__.py in try_import(name, package_registry)
    107         _install_package(name, package_registry)
--> 108         return try_import(name, package_registry=None)
    109 

/opt/conda/lib/python3.5/site-packages/Sire/__init__.py in try_import(name, package_registry)
    109 
--> 110     raise ImportError("Failed to install module %s" % name)
    111 

ImportError: Failed to install module mdtraj

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-1-99da57a799ef> in <module>()
----> 1 import BioSimSpace

/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/__init__.py in <module>()
     25         return False      # Probably standard Python interpreter
     26 
---> 27 from BioSimSpace.Driver import MD
     28 
     29 import BioSimSpace.Gateway

/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/Driver/__init__.py in <module>()
----> 1 from .md import MD

/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/Driver/md.py in <module>()
      9 import Sire.System
     10 
---> 11 from ..Process import *
     12 from ..Protocol import *
     13 from ..Protocol.protocol import Protocol

/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/Process/__init__.py in <module>()
----> 1 from .amber import Amber
      2 from .namd import Namd

/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/Process/amber.py in <module>()
     11 from . import process
     12 from ..Protocol import *
---> 13 from ..Trajectory import Trajectory
     14 
     15 from math import ceil, floor

/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/Trajectory/__init__.py in <module>()
----> 1 from .trajectory import Trajectory

/opt/conda/lib/python3.5/site-packages/BioSimSpace-0+untagged.321.g64c461a-py3.5.egg/BioSimSpace/Trajectory/trajectory.py in <module>()
     17     mdtraj = try_import("mdtraj")
     18 except ImportError:
---> 19     raise ImportError("MDTraj is not installed. Please install mdtraj in order to use BioSimSpace.")
     20 
     21 try:

ImportError: MDTraj is not installed. Please install mdtraj in order to use BioSimSpace.

Package inconsistency warning

Lastest clean install of feature branch results in this:

In [1]: import BioSimSpace                                                                               
/home/ppxasjsm/Software/sire.app_feature-map/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/home/ppxasjsm/Software/sire.app_feature-map/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/home/ppxasjsm/Software/sire.app_feature-map/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/home/ppxasjsm/Software/sire.app_feature-map/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)

I assume this is something I should worry about?

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.