Skip to main content

Tools for Desmond molecular dynamics

Project description

Python Utilities for Desmond Molecular Dynamics

Introduction

DesmondTools have a set of command-line scripts and a python library written to make setting up the molecular dynamics simulations easier for Desmond.

Install

$ pip install desmondtools

Documentation

See https://sunghunbae.github.io/desmondtools/

Use of desmondtools library

from desmondtools import Multisim

# read template .msj and .cfg
md_msj = Multisim(template="desmond-md.msj")
md_cfg = Multisim(template="desmond-md.cfg")

with open(msj_file,"w") as msj:
    # modify desmond msj template
    md_msj.dot.simulate[-1].cfg_file = cfg_file_basename
    
    # Setting up restraints using the restraints keyword:
    # https://www.schrodinger.com/kb/332119
    if args.posres_force > 0.0:
        # print the restraints in the multisim log file
        md_msj.dot.simulate[-1].print_restraint = 'true'

        # add the new terms defined in "restraints.new" to existing restraints.
        # The default is restraints.existing = ignore which will 
        # delete existing terms before adding any new ones.
        # md_msj.dot.simulate[-1].restraints.existing = 'retain'

        md_msj.dot.simulate[-1].restraints.new = [
            {
                'name'              : 'posre_harm',
                'atoms'             : [ f'"{args.posres}"' ],
                'force_constants'   : [ args.posres_force, ] * 3,
            }
            ]
        # force constants in the x, y, and z direction

    md_msj.write(msj)

with open(cfg_file,"w") as cfg:
    # modify desmond cfg template
    md_cfg.dot.randomize_velocity.seed = random.randint(1000, 9999)
    md_cfg.dot.time = total_simulation_time
    md_cfg.dot.temperature = t_schedule
    md_cfg.dot.trajectory.interval = args.interval
    md_cfg.write(cfg)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

desmondtools-1.1.0.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

desmondtools-1.1.0-py3-none-any.whl (43.5 kB view details)

Uploaded Python 3

File details

Details for the file desmondtools-1.1.0.tar.gz.

File metadata

  • Download URL: desmondtools-1.1.0.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for desmondtools-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1bb51b81632b7b703f0c10a461a983f5673db1b24688e2024ec2208833f8e2bd
MD5 325296f01a78b2f818e8983dae86b51a
BLAKE2b-256 5ce92e563382bfcec583df3d975fad3f9738a13458c5c10a2b9b30a3e602f7f0

See more details on using hashes here.

File details

Details for the file desmondtools-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: desmondtools-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for desmondtools-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cabd26b3f90a9ed6f29926369392a6de19f9941bfaec2c66424486fbc4e3f5ae
MD5 20a9ed778796ce692ec3f8f5bb35989b
BLAKE2b-256 cd3f213452b6eeb4ede701ce1373e1b9bc1282f2953e4561736cae05570c8a1c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page