Giter VIP home page Giter VIP logo

Comments (14)

drroe avatar drroe commented on August 17, 2024

On Fri, Feb 6, 2015 at 10:20 AM, Hai Nguyen [email protected]
wrote:

python setup.py install

Note that although this step checks for Cython (which is nice), it doesn't
check for python development libraries. There's a check in
$AMBERHOME/AmberTools/src/configure2 around line 2898 you can probably
borrow for this.

I've made some changes to cpptraj that will break your version, but I'm
going to fork pytraj and see if I can fix them so you don't have to before
I push to the cpptraj github. Until I run successfully I will leave github
cpptraj as-is. I'll keep you up to date.

Thanks for writing some tests - it will make our lives much easier!

-Dan

add libcpptraj to LD_LIBRARY_PATH before running pytraj
2.

Run simple test

(from anywhere: python -c 'import pytraj; pytraj.run_tests()'

from pytraj root folder:
- cd tests
- python ./run_simple_test.py

Note: pytraj's compiling time (linking to libcpptraj.so) is currently few
times slower than compiling libcpptraj. :D

Let me know if you have any question. thx.

Hai


Reply to this email directly or view it on GitHub
#5.


Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 307
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-6208 (Fax)

from cpptraj.

hainm avatar hainm commented on August 17, 2024
  • " it doesn't check for python development libraries"
    --> Can you elaborate this? (travis has been testing pytraj code and I am not aware of this issue before)
  • I've made more than 100 test cases for pytraj. You can run all of them by:
    • cd tests
    • python ./RunAllAndFindFailure.py
      • log and output.txt are the results of running above test. You can grep "ERROR" or "FAIL" in log to check which tests are failed.
      • you can run individual test too (example: python ./test_Action_Strip.py)

Thanks for your help.

Hai

from cpptraj.

swails avatar swails commented on August 17, 2024

--> Can you elaborate this? (travis has been testing pytraj code and I am not aware of this issue before)

By default, most Linux operating systems do not come pre-installed with Python.h or libpython2.7.so. Obviously the Travis VMs do, since they are designed for testing these programs :). And really, Cython is just a glorified translator to go from Python-like syntax to CPython C-API C code, so you still need to have the Python development headers available to install it.

This package is usually called something like python-dev or python-devel (depending on your OS).

The sander API suffers from the same limitation -- if the Python development headers are absent, it simply cannot be built.

from cpptraj.

hainm avatar hainm commented on August 17, 2024

thx Jason.

Hai

from cpptraj.

swails avatar swails commented on August 17, 2024

To clarify -- this is probably unnecessary for the setup.py script in the pytraj Github repository. Anyone that wants to install and use pytraj will know they need the Python development headers. For inclusion with AmberTools, this check will be necessary, though.

from cpptraj.

drroe avatar drroe commented on August 17, 2024

On Fri, Feb 6, 2015 at 12:13 PM, Jason Swails [email protected]
wrote:

Anyone that wants to install and use pytraj will know they need the Python
development headers.

I think you give people too much credit. :-)

-Dan


Reply to this email directly or view it on GitHub
#5 (comment).


Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 307
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-6208 (Fax)

from cpptraj.

swails avatar swails commented on August 17, 2024

Only when it means less work for me :).

In this case, though, I think anybody that comes to Github to get the pytraj source code so they can compile it knows full well that python-dev is required, or they will quickly find out without an error message from setup.py.

from cpptraj.

drroe avatar drroe commented on August 17, 2024

On Fri, Feb 6, 2015 at 11:41 AM, Daniel Roe [email protected] wrote:

I've made some changes to cpptraj that will break your version, but I'm
going to fork pytraj and see if I can fix them so you don't have to before
I push to the cpptraj github. Until I run successfully I will leave github
cpptraj as-is. I'll keep you up to date.

OK, so this will be a bigger change than I thought. Recently I had to
refactor the way cpptraj handles coordinate metadata (i.e. do the coords
have velocity info, temperature, etc). The way I had handled this
previously was that the TrajectoryIO class would report this via separate
function calls, which would percolate up through the TrajectoryFile classes
and finally get stored in Topology during a trajectory run, so things like
Actions and output trajectories would know something about the coordinates.
This was fine when there were only a few pieces of metadata, but since more
have been added it made sense to me to encapsulate this information in a
new class (CoordinateInfo) which could be passed around as necessary,
meaning if we add a new piece of metadata (e.g. time values) we don't have
to modify several interfaces.

However, since this was a substantial interface change, it has now broken
things like Trajin.pyx and TrajectoryIO.pyx etc which relied on it. I have
forked over a copy of pytraj but it seems to me it might be easier for you
to make these changes. However, if you don't have the time I can take a
crack at it. The only reason I bring it up is I'm pretty much a python n00b.

So bottom line, I will try working on this unless I hear from you. If you
do want to work on it, these cpptraj changes are currently in the Amber GIT
master. I will not change the github version of cpptraj until it will work
with pytraj.

-Dan

Thanks for writing some tests - it will make our lives much easier!

-Dan

add libcpptraj to LD_LIBRARY_PATH before running pytraj
2.

Run simple test

(from anywhere: python -c 'import pytraj; pytraj.run_tests()'

from pytraj root folder:
- cd tests
- python ./run_simple_test.py

Note: pytraj's compiling time (linking to libcpptraj.so) is currently few
times slower than compiling libcpptraj. :D

Let me know if you have any question. thx.

Hai


Reply to this email directly or view it on GitHub
#5.


Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 307
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-6208 (Fax)


Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 307
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-6208 (Fax)

from cpptraj.

hainm avatar hainm commented on August 17, 2024

@Mojyt

  • Since I get used to read cpptraj code and have been working with Cython, I think I can keep catching your changes. So, I can do the changes myself. (I have not have access to Amber GIT yet, but James's helping downloading cpptraj).
  • BTW, I just saw "hdf5" in config.h (great +1)
  • Is there any easy way to add Frame object to CpptrajState? It seems to me that "AddTrajin" method of this class add trajectory from a file.

Ideally, pytraj user would do some actions with Frame objects, then will combine them into a class objects that CpptrajState can accept (for example using "AddFrame" method of DataSet_Coords_TRJ). CpptrajState would take care of "massive" action, analysis, output stuff ..
Current CpptrajState class only have "AddTrajin" from files.

If this is not easy, I can translate CpptrajState.cpp to Cython code. Let me know if I miss anything. thx.

Hai

from cpptraj.

hainm avatar hainm commented on August 17, 2024

@Mojyt
I've just finishing made change for my pytraj local code to be compatible with cpptraj in Amber git. All test cases are passed. I think you can push new changes to github now.

Hai

from cpptraj.

drroe avatar drroe commented on August 17, 2024

OK, pushed. Hopefully all goes well...

On Fri, Feb 6, 2015 at 3:37 PM, Hai Nguyen [email protected] wrote:

@Mojyt https://github.com/mojyt
I've just finishing made change for my pytraj local code to be compatible
with cpptraj in Amber git. All test cases are passed. I think you can push
new changes to github now.

Hai


Reply to this email directly or view it on GitHub
#5 (comment).


Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 307
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-6208 (Fax)

from cpptraj.

hainm avatar hainm commented on August 17, 2024

@Mojyt: yes. went really well https://travis-ci.org/hainm/pytraj/builds/49823926

from cpptraj.

swails avatar swails commented on August 17, 2024

On Fri, Feb 6, 2015 at 10:03 PM, Hai Nguyen [email protected]
wrote:

@Mojyt https://github.com/mojyt: yes. went really well
https://travis-ci.org/hainm/pytraj/builds/49823926

​It looked like there were some failures (from the Travis-CI log):

55.81s$ python RunAllAndFindFailure.py
​​

​​
​​ File "./test_Trajout.py", line 63, in test_load
​​ File "pytraj/FrameArray.pyx", line 46, in
pytraj.FrameArray.FrameArray.cinit
(/home/travis/build/hainm/pytraj/pytraj/FrameArray.cpp:3065)
​ File "./test_Action_Strip.py", line 92, in test_1
​File "./test_alias_topology.py", line 13, in test_0

Is this expected?

​​

Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher

from cpptraj.

hainm avatar hainm commented on August 17, 2024

Hi, yes, this is unrelated to what Dan has changed. I made some changes to the code and forgot to commit.

Thanks
Hai

from cpptraj.

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.