VMD-L Mailing List
From: Ackad, Edward (eackad_at_siue.edu)
Date: Thu Jan 16 2020 - 10:05:10 CST
- Next message: Brian Radak: "Re: Using namdEnergy from an external python script"
- Previous message: Francesco Pietra: "settings for labels"
- In reply to: Paweł Kędzierski: "Re: Using namdEnergy from an external python script"
- Next in thread: Brian Radak: "Re: Using namdEnergy from an external python script"
- Reply: Brian Radak: "Re: Using namdEnergy from an external python script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Thank you!
On Thu, Jan 16, 2020 at 3:37 AM Paweł Kędzierski <pawel.kedzierski_at_pwr.edu.pl<mailto:pawel.kedzierski_at_pwr.edu.pl>> wrote:
W dniu 15.01.2020 o 20:23, Ackad, Edward pisze:
Hi all,
I'm trying to write a python script with minimal dependencies and that uses namdEneriy to calculate the energy of a dcd file. Is there a better way than externally calling vmd to load the psf+dcd and call namdEnergy from within vmd?
Have a look at the NAMD input script generated by NAMD Energy plugin and generate something similar in your Python code. It's minimalistic and the keywords are human readable, but of course you may find their description in NAMD User Guide in case of doubts. Then, run NAMD from Python. You will depend on NAMD only and also it will be much easier to debug than Python->VMD->plugin->NAMD approach. You will need also to parse the namd output yourself but this should be as easy as:
for line in open('Eint.log'):
if line.startswith('ENERGY:'):
energy = float(line.split()[13]) # POTENTIAL
...
HTH,
Pawel
Thanks!
Eddie
--
_________________________________________________________
Edward Ackad, Ph.D<http://www.siue.edu/%7Eeackad>
Associate Professor of Physics
Computational Nanophotonics
Southern Illinois University Edwardsville
(618) 650-2390
--
_________________________________________________________
Edward Ackad, Ph.D<http://www.siue.edu/%7Eeackad>
Associate Professor of Physics
Computational Nanophotonics
Southern Illinois University Edwardsville
(618) 650-2390
- Next message: Brian Radak: "Re: Using namdEnergy from an external python script"
- Previous message: Francesco Pietra: "settings for labels"
- In reply to: Paweł Kędzierski: "Re: Using namdEnergy from an external python script"
- Next in thread: Brian Radak: "Re: Using namdEnergy from an external python script"
- Reply: Brian Radak: "Re: Using namdEnergy from an external python script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]