Coder Social home page Coder Social logo

bsc-cns-eapm / adaptivepele Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 13.0 35.64 MB

AdaptivePELE is a Python package aimed at enhancing the sampling of molecular simulations

Home Page: https://bsc-cns-eapm.github.io/AdaptivePELE/

License: MIT License

Python 82.21% R 1.07% Shell 7.51% MATLAB 3.04% Makefile 0.43% Batchfile 0.39% Cython 5.35%
reinforcement-learning molecular-simulation monte-carlo-simulation molecular-dynamics

adaptivepele's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

adaptivepele's Issues

Variable box radius for equilibration

Description

We have been using the equilibration of Adaptive to obtain different initial structures of a small ligand. The idea is to launch afterwards an unbiased PELE simulation starting from different initial positions to cover as many regions as possible in a specific protein cavity. The problem we found is that the default (and only) option to run this equilibration is with a 2Å radius spherical box. As a result, the structures resulting from the equilibrationCluster clusterization are all located in a very small region and they are not spread around the cavity we are interested in exploring.

Solution

The most straightforward solution would be allowing the users to change the hard-coded 2Å-spherical box with the radius they want.

When the residue name is incorrectly specified the exception catch is no clear

File "AdaptivePELE/atomset/atomset.pyx", line 663, in AdaptivePELE.atomset.atomset.PDB.initialise
File "AdaptivePELE/atomset/atomset.pyx", line 575, in AdaptivePELE.atomset.atomset.PDB._initialisePDB
ValueError: The input pdb file/string was empty, no atoms loaded!

Could it be possible to discern between not finding the input file and having the resname wrongly spelled?

Documentation on values and clustering condition difficult to understand

We have been checking the documentation on condition and cluster values (heavyside) and it is not clear to me what refers to contacts and what to rmsd values. Maybe we could set a explanation of a practical example?? Feel free to close the issue if you do not think is relevant (:

Part of docs:

heaviside (default), where thesholds (values) are assigned according to a set of step functions that vary according to a ratio of protein-ligand contacts and ligand size , r, (conditions, see below). The values and conditions of change are defined with two lists. The condition list is iterated until r > condition[i], and the used threshold is values[i]. If r <= conditions[i] for all i, it returns the last element in values. Thresholds typically vary from 5Å in the bulk to 2Å in protein pockets. This method is preferred, as it optimizes the number of clusters, giving more importance to regions with more contacts and interactions, where metastability occurs. Default values: [2,3,4,5], default conditions: [1, 0.75, 0.5].

TypeError: float argument required, not numpy.ndarray

Al acabar la primera epoca e intentar clusteritzar surt aquest error:

TypeError: float argument required, not numpy.ndarray

Traceback (most recent call last):
File "PelePlop/main.py", line 204, in
run(args.input, args.residue, args.chain, args.ligands, args.forc, args.confile, args.native, args.cpus, args.core, args.mtor, args.n, args.mae_charges, args.clean, args.only_plop)
File "PelePlop/main.py", line 117, in run
adaptive_exit.run()
File "/home/dsoler/PelePlop/Adaptive/adaptive.py", line 28, in run
ad.main(self.file)
File "/sNow/easybuild/centos/7.4.1708/Skylake/software/Python/2.7.10-foss-2015a/lib/python2.7/site-packages/AdaptivePELE-1.4-py2.7-linux-x86_64.egg/AdaptivePELE/adaptiveSampling.py", line 647, in main
outputPathConstants.clusteringOutputObject % i, writeAll)
File "/sNow/easybuild/centos/7.4.1708/Skylake/software/Python/2.7.10-foss-2015a/lib/python2.7/site-packages/AdaptivePELE-1.4-py2.7-linux-x86_64.egg/AdaptivePELE/clustering/clustering.py", line 890, in writeOutput
metric)
TypeError: float argument required, not numpy.ndarray

IndexError: too many indices for array

Passa quan estic al mig de la primera epoca els reports són del tipus:

#Task Step numberOfAcceptedPeleSteps currentEnergy Binding Energy sasaLig
1 0 0 -9438.18 -54.0062 0.00796731
1 1 1 -9433.08 -60.2906 0.00173838
1 2 2 -9436.91 -54.5299 0.00897934
1 3 3 -9438.3 -58.2817 0.00197352

Les conf files són les mateixes d'avanç.

File "/home/dsoler/PelePlop/Adaptive/adaptive.py", line 29, in run
ad.main(self.file)
File "/home/dsoler/repos/AdaptivePELE/AdaptivePELE/adaptiveSampling.py", line 670, in main
if simulationRunner.checkExitCondition(clusteringMethod, outputPathConstants.epochOutputPathTempletized % i):
File "/home/dsoler/repos/AdaptivePELE/AdaptivePELE/simulation/simulationrunner.py", line 62, in checkExitCondition
return self.parameters.exitCondition.checkExitCondition(outputFolder)
File "/home/dsoler/repos/AdaptivePELE/AdaptivePELE/simulation/simulationrunner.py", line 528, in checkExitCondition
if self.condition(report[:, self.metricCol], self.metricValue):
IndexError: too many indices for array

Templetize report name

If Adaptive & pele control files have different report name the next error arises:

We could avoid that by templetazing pele control file

File "/apps/PYTHON/2.7.13/INTEL/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/apps/PYTHON/2.7.13/INTEL/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/gpfs/home/bsc72/bsc72893/test_mutations/AdaptivePELE/AdaptivePELE/adaptiveSampling.py", line 680, in
main(args.controlFile)
File "/gpfs/home/bsc72/bsc72893/test_mutations/AdaptivePELE/AdaptivePELE/adaptiveSampling.py", line 597, in main
initialStructures = simulationRunner.equilibrate(initialStructures, outputPathConstants, spawningParams.reportFilename, outputPath, resname, topology_file)
File "/home/bsc72/bsc72893/test_mutations/AdaptivePELE/AdaptivePELE/simulation/simulationrunner.py", line 429, in equilibrate
newStructure = self.selectEquilibratedStructure(self.parameters.processors, similarityColumn, resname, trajNames, reportNames, topology=topology)
File "/home/bsc72/bsc72893/test_mutations/AdaptivePELE/AdaptivePELE/simulation/simulationrunner.py", line 576, in selectEquilibratedStructure
report_values = report[:, cols]
IndexError: too many indices for array
~

Clustering is done with spawning:independent and breaks if binding energy is not calculated

Error

If I run with 1 PELE iteration with spawning: independent I got one cluster:

Output from debbuger:

(Pdb) self.clusters
<AdaptivePELE.clustering.clustering.Clusters object at 0x2ba351320510>
(Pdb) self.clusters.clusters
[<AdaptivePELE.clustering.clustering.Cluster object at 0x2ba326549f50>]
(Pdb) self.clusters.clusters[0]
<AdaptivePELE.clustering.clustering.Cluster object at 0x2ba326549f50>
(Pdb) self.clusters.clusters[0].dict
{'threshold2': 25, 'elements': 2, 'contactThreshold': 8, 'contacts': 0.12275765036932818, 'contactMap': None, 'density': None, 'altStructure': <AdaptivePELE.clustering.clustering.AltStructures object at 0x2ba326549ed0>, 'metricCol': 5, 'metrics': array([ 1.00000e+00, 0.00000e+00, 0.00000e+00, -1.25923e+04]), 'threshold': 5, 'altSelection': True, 'pdb': <AdaptivePELE.atomset.atomset.PDB object at 0x2ba3512d4598>, 'trajPosition': (0, 1, 0), 'originalMetrics': array([ 1.00000e+00, 0.00000e+00, 0.00000e+00, -1.25923e+04])}

Then when going to the line tries to to pick up the metric 5 because in the report I have "metricColumnInReport" : 6 and dies because I do not calculate this metric.

work/NBD_Utilities/PELE/PELE_Softwares/adaptive_types/v1.6.2/AdaptivePELE/clustering/clustering.py(1065)writeOutput()
-> metric = cluster.getMetric()

def getMetric(self):

            Get the value of the prefered metric if present, otherwise return None

            :returns: float -- Value of the prefered metric

    if len(self.metrics) and self.metricCol is not None:
      return self.metrics[self.metricCol]

IndexError: 'index 5 is out of bounds for axis 0 with size 4'**

Idk if its my mistake to include "metricColumnInReport" : 6 but looks strange that I just did a 1 PELE (spawningtype:independent) iteration that I though it needs no clustering and at the same time the script is outputting 1 cluster and trying to pick up the metric 5 because in the report I have "metricColumnInReport" : 6.

Dani

Control files (I can't send u more)

adaptive.txt
pele.txt

Requirement from PELE

Hi,

I noticed in the constants /gpfs/projects/bsc72/PELE++/bin/rev12025/Pele_rev12025_mpi is required to run this. Is this a part of PELE? I didn't find any matching file in the PELE repo.

Thanks.

Wrong box center in equilibration

Description

We detected that the predefined perturbation box used in the Adaptive's equilibration is wrongly located. It should be placed at the COM of ligand according to the first input PDB structure. However, even though we set a box radius of 6Å, the resulting center of the perturbation box was too far away for PELE to accept any move of the ligand.

Support

A zip file with the simulation data to reproduce this issue.

OSERROR: File exists: './0/ligand_trajs'

I get an OSError when I run MSM analysis for second time over the same folder. We may want to handle this exceptions for the program not to crash. If you disagree, close the issue.

Error:

Traceback (most recent call last):
File "PelePlop/msm/analysis.py", line 59, in
analyse_results("/scratch/jobs/dsoler/STR_Pele/output_adaptive_long", "STR")
File "PelePlop/msm/analysis.py", line 15, in analyse_results
extractCoords.main(lig_resname=ligand_resname, non_Repeat=True, atom_Ids=atom_ids)
File "/sNow/easybuild/centos/7.4.1708/Skylake/software/Python/2.7.10-foss-2015a/lib/python2.7/site-packages/AdaptivePELE-1.4-py2.7-linux-x86_64.egg/AdaptivePELE/freeEnergies/extractCoords.py", line 291, in main
os.makedirs(os.path.join(pathFolder, constants.ligandTrajectoryFolder))
File "/sNow/easybuild/centos/7.4.1708/Skylake/software/Python/2.7.10-foss-2015a/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 17] File exists: './0/ligand_trajs'

Equilibration error due to None in similarity column

Error:

"/work/NBD_Utilities/PELE/PELE_Softwares/adaptive_types/v1.6.2_python3.6foss2018/AdaptivePELE/simulation/simulationrunner.py", line 781, in selectEquilibratedStructure
if energyColumn > similarityColumn or similarityColumn is None:
TypeError: '>' not supported between instances of 'int' and 'NoneType'

The clause if in simulation/simulationrunner.py", line 781 looks worng as if similarityColumnis none can't do the comparison (>).

Would that be possible?

Thanks!

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.