Skip to content

Commit

Permalink
Update hoomdxml.py (#798)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Henry committed Oct 14, 2020
1 parent 5610272 commit aefb71f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mbuild/formats/hoomdxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def write_hoomdxml(structure, filename, ref_distance=1.0, ref_mass=1.0,
xml_file.write('<?xml version="1.2" encoding="UTF-8"?>\n')
xml_file.write('<hoomd_xml version="1.2">\n')
xml_file.write('<!-- ref_distance (nm) ref_mass (amu) ref_energy (kJ/mol) -->\n')
xml_file.write('<!-- {} {} {} -->\n'.format(ref_distance, ref_mass, ref_energy))
# We need to convert back into nm and kJ
xml_file.write('<!-- {} {} {} -->\n'.format(ref_distance/10, ref_mass, ref_energy*4.184))
xml_file.write('<configuration time_step="0">\n')
_write_box_information(xml_file, structure, ref_distance)
_write_particle_information(xml_file, structure, xyz, forcefield,
Expand Down

0 comments on commit aefb71f

Please sign in to comment.