Hi,
Is it possible to access calculated properties (e.g. the potential energy of a group of particles) directly from python?
I can create a compute thermo and get the data I want printed to a log file with code like the below:
b1 = group.tag_list(name='b1', tags=[0,1,2,3,4,5,6,7,8,9] )
c1 = compute.thermo(group=b1)
analyze.log(filename='mylog.log',
quantities=['pair_lj_energy',
'pair_lj_energy',
'potential_energy',
'potential_energy_b1'],
period=10, header_prefix='#')
However what I would really like to do is to access (e.g.) the potential energy for the whole system and group b1 after the simulation has finished directly from python - something like c1.getPotentialEnergy().
Is there any way to do this?
Many thanks,
Jens