Comments (6)
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.
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.
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.
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.
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.
@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)
- BUG: streamlines only returns the dx_array, dy_array of last frame HOT 5
- Can mdanalysis split xtc track files into many individual pdb files? HOT 1
- `H5MDReader/Writer` undocumented limitations HOT 5
- Create `sugar` or `carbohydrate` selection using GLYCAM nomenclature
- AlignTraj doesn't accept writer kwargs
- Error when setting up BAT after selecting only heavy atoms HOT 1
- PDB Reader can stream from AWS s3 buckets with minimal modification HOT 3
- TST, MAINT: test_thread_limit_apply failure with NumPy 2.1.0.dev HOT 4
- Package tests failing due to normalilzation change HOT 1
- Add code coverage options due to many `codecov` failures recently HOT 3
- Explore solutions for codecov upload failures
- Benchmark guessers with asv HOT 2
- Unpin mypy rdkit version
- Add example for writing to NamedStream StringIO buffer
- macOS python3.11 fails to install `mdanalysis[all]` from git branch directly (not always though) HOT 10
- Build fails: incompatible function pointer types initializing HOT 9
- Issue when reading 4000+ pdb files in the same Universe HOT 10
- Use a single warning interface. HOT 5
- `H5MD` Can not read `observables/<group>/<observable>/...` HOT 11
- Downloading / Streaming Trajectories from MDDB HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdanalysis.