Coder Social home page Coder Social logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 25, 2024
There exists a workaround if you know your selections. Then you can explicitly
construct the KDTree NeighborSearch from atom selection. (In fact, this is 
faster
than MDAnalysis selection parsing and may be rather useful when iterating over a
whole trajectory):

  import MDAnalysis.KDTree.NeighborSearch as kdNS

  u = Universe(psf,dcd)
  water = u.selectAtoms('name OH2')
  protein = u.selectAtoms('protein')

  # The following has to be done every time step:   
  ns_w = kdNS.AtomNeighborSearch(water)
  solvation_shell = ns_w.search_list(protein,4.0)  # water oxygens within 4A of 
protein

(see also the doc strings for MDAnalysis.KDTree.NeighborSearch)

Original comment by orbeckst on 28 Aug 2008 at 1:00

from mdanalysis.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 25, 2024
Changed the title because the problem is really that selectAtoms() from Universe
behaves different from seletAtoms() from a arbitrary AtomSelection. In the code 
the
problem is that the atom selection does not know about any other atoms than 
itself.
Hence any selection that references atoms outside the AtomGroup fails.

Original comment by orbeckst on 2 Sep 2008 at 4:15

  • Changed title: distance selections from AtomGroups do not work (UNSTABLE)

from mdanalysis.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 25, 2024
changed title (removed 'UNSTABLE') because this issue is also present in 0.6.0

Original comment by orbeckst on 1 Apr 2010 at 11:27

  • Changed title: distance selections from AtomGroups do not work

from mdanalysis.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 25, 2024
i'm going to give this one and issue 42 a look.

Original comment by [email protected] on 3 Jul 2011 at 6:25

from mdanalysis.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 25, 2024
This is the simplest solution i could think of: when a selection is applied to 
an existing AtomGroup, it is in fact applied to its universe. Then, a common 
set of the starting Atoms and the newly selected ones is returned.

A common parent class to AtomGroup and Universe would probably be a better idea.

Original comment by [email protected] on 3 Jul 2011 at 8:39

Attachments:

from mdanalysis.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 25, 2024
@jandom: The patch is probably to costly for most cases. I can't really think 
of a good way to change the underlying code to make this work except 
introducing "named selections" as proposed in Issue 42. I'll close it for the 
time being as wontfix.

Anyone, feel free to re-open.

Original comment by orbeckst on 13 Sep 2011 at 3:33

  • Changed state: WontFix
  • Removed labels: Usability

from mdanalysis.

Related Issues (20)

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.