Provides methods to read PolyMC output and write PolyMC input files
git clone [email protected]:eskoruppa/IOPolyMC.git
pip install IOPolyMC/.
Import package
import iopolymc as io
Several methods to read and write xyz files
io.read_xyz(filename: str) -> dict
returns a dictionary with the keys 'pos' and 'types'.
io.load_xyz(filename: str,savenpy=True,loadnpy=True)
Same as read_xyz, except that it saves the configuration to a numpy binary upon first read and reads from binary upon future reading of that file. Loads only from binary if the .xyz file has not been changed since the binary was created.
io.read_xyz_atomtypes(filename: str) -> dict
Returns list of contained atom types.
io.write_xyz(outfn: str,data: dict,add_extension=True,append=False) -> None
Writes xyz file. The argument data has to be a dictionary containing the keys 'pos' and 'types'. 'pos' needs to be a list of configurations, one for each snapshot.
io.read_idb(filename: str) -> dict
io.write_idb(filename: str, idbdict: dict, decimals=3)
io.read_restart(filename: str) -> List[dict]
io.write_restart(filename: str, snapshots: List[dict])
io.read_state(filename: str) -> dict
io.load_state(filename: str) -> dict
io.read_spec(filename: str) -> dict
io.scan_path(path: str, ext: str, recursive=False) -> List[str]
io.read_thetas(filename: str) -> np.ndarray
io.load_thetas(filename: str) -> np.ndarray
io.gen_pdb(outfn: str, positions: np.ndarray,triads: np.ndarray,bpdicts: dict, sequence = None, center=True)
io.state2pdb(statefn: str, outfn: str, snapshot: int ,bpdicts_fn=None, sequence=None, center=True)
io.read_input(filename: str) -> dict
io.write_input(filename: str,args: dict)
io.querysims(path: str, recursive=False, extension='in',sims=None,select=None) -> List[dict]
io.simfiles(infile: str,extension='in') -> List[str]
io.pts2config(pts : np.ndarray, disc_len : float, closed = False, numbp = None, translate_first = True) -> np.ndarray
io.config2triads(config : np.ndarray) -> np.ndarray
io.pts2xyz(outfn : str, pts : np.ndarray, disc_len : float, closed = False, numbp = None, translate_first = True, sequence = None, default_type = 'C', snapshotid = 0)
io.pts2restart(outfn : str, pts : np.ndarray, disc_len : float, closed = False, numbp = None, translate_first = True, sequence = None, default_type = 'a', snapshotid = 0)
io.unique_oligomers(num_bp: int,omit_equiv=True) -> List[str]