Topic Options
#37266 - 01/11/19 04:10 PM Python subroutine
ca4930 Offline
Forum Member

Registered: 09/19/18
Posts: 3
I'd like to incorporate a python subroutine in my charmm script. Can I do this via USERSB? If so how?


Edited by ca4930 (01/11/19 04:41 PM)

Top
#37267 - 01/11/19 04:45 PM Re: Python subroutine [Re: ca4930]
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8280
Loc: 39 03 48 N, 77 06 54 W
The system command should return control to the CHARMM script when it completes. If you want to pass some data back to CHARMM, the python script should write a stream file, which can then be read by a subsequent CHARMM command.

In principle, you can use Fortran to call system() under Linux, but you'd still have an issue with using any data produced, as Fortran cannot read python data objects directly.
_________________________
Rick Venable
computational chemist


Top

Moderator:  John Legato, lennart