Comments (4)
may be we need to make a method
traj.update_coords(mask, xyz)
traj[0:3].update_coords(mask, xyz)
from pytraj.
This isn't inconsistent IMO. numpy behaves similarly (although it is a view rather than a copy). But the Python list
behaves just like this:
x = [0, 1, 2, 3, 4, 5]
x[1:3] # Returns a copy of just [1, 2]
x[1:3] = [2, 2] # Sets x to [0, 2, 2, 3, 4, 5]
What you have now is intuitive to me.
from pytraj.
@swails: great. I will keep them. thanks.
from pytraj.
closed since problem solved.
from pytraj.
Related Issues (20)
- Incorrect box dimensions when writing .rst7 from .dcd HOT 4
- Support trajin -type option for loading trajectory?
- Typo in Output of _explain() Function HOT 1
- Pytraj nastruct needs to be updated to handle [nxyz] data HOT 9
- wrong major groove calculation HOT 8
- calculated basepair matches in pytraj HOT 2
- Installation error of pytraj with pip HOT 4
- energy_decompostion throws "Fortran runtime error: Bad value during integer read" HOT 1
- Has anyone tried a Python 3.11 conda package build yet? HOT 11
- Spurious Test Failures with Cpptraj HOT 9
- ModuleNotFoundError: No module named 'pytraj.core.topology_objects' HOT 15
- Help: error building pytraj native library when make install 91% HOT 10
- Function to find the atoms of a given mask that appear in a region of xyz coordinate space? HOT 10
- hbond pmap_mpi output format HOT 7
- Make binary wheel for pytraj? HOT 5
- pytraj.plot module not found HOT 2
- Reporting Issues with Pytraj using tutorials HOT 28
- pytraj segmentation fault with cython 3.0 and cpptraj commit f1d21f688de5ea5c55e650abe6efdbc352bdc613 HOT 1
- pmap parallel error HOT 6
- How do I import pytraj? HOT 4
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 pytraj.